From f5437632f486b7d0a0a181c58f113c86d032b02c Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 24 Apr 2017 20:11:36 -0400 Subject: [PATCH] Upgrading server dependancies (#6215) --- glide.lock | 63 +- glide.yaml | 31 +- .../NYTimes/gziphandler/.travis.yml | 1 + .../github.com/NYTimes/gziphandler/README.md | 4 +- vendor/github.com/NYTimes/gziphandler/gzip.go | 129 +- .../NYTimes/gziphandler/gzip_go18.go | 43 + .../NYTimes/gziphandler/gzip_go18_test.go | 70 + .../NYTimes/gziphandler/gzip_test.go | 69 +- .../html2text/.gitignore | 0 .../html2text/.travis.yml | 0 .../{jaytaylor => cpanato}/html2text/LICENSE | 0 .../html2text/README.md | 34 +- .../html2text/html2text.go | 14 +- .../html2text/html2text_test.go | 0 .../html2text/testdata/utf8.html | 0 .../html2text/testdata/utf8_with_bom.xhtml | 0 .../disintegration/imaging/.travis.yml | 1 + .../github.com/disintegration/imaging/LICENSE | 2 +- .../disintegration/imaging/README.md | 181 +- .../disintegration/imaging/adjust_test.go | 60 + .../disintegration/imaging/convolution.go | 148 + .../imaging/convolution_test.go | 275 + .../disintegration/imaging/effects.go | 36 +- .../disintegration/imaging/effects_test.go | 64 + .../disintegration/imaging/example_test.go | 58 + .../disintegration/imaging/helpers.go | 44 +- .../disintegration/imaging/histogram.go | 2 +- .../disintegration/imaging/histogram_test.go | 2 +- .../disintegration/imaging/resize.go | 132 +- .../disintegration/imaging/resize_test.go | 68 +- .../imaging/testdata/lena_128.png | Bin 0 -> 50383 bytes .../imaging/testdata/lena_512.png | Bin 0 -> 476195 bytes .../imaging/testdata/out_blur_0.5.png | Bin 0 -> 29110 bytes .../imaging/testdata/out_blur_1.5.png | Bin 0 -> 21067 bytes .../imaging/testdata/out_brightness_m10.png | Bin 0 -> 31562 bytes .../imaging/testdata/out_brightness_p10.png | Bin 0 -> 31532 bytes .../imaging/testdata/out_contrast_m10.png | Bin 0 -> 30812 bytes .../imaging/testdata/out_contrast_p10.png | Bin 0 -> 32615 bytes .../imaging/testdata/out_example.jpg | Bin 0 -> 137574 bytes .../imaging/testdata/out_gamma_0.75.png | Bin 0 -> 31901 bytes .../imaging/testdata/out_gamma_1.25.png | Bin 0 -> 31295 bytes .../imaging/testdata/out_resize_catrom.png | Bin 0 -> 31179 bytes .../imaging/testdata/out_resize_lanczos.png | Bin 0 -> 32070 bytes .../imaging/testdata/out_resize_linear.png | Bin 0 -> 29475 bytes .../imaging/testdata/out_resize_nearest.png | Bin 0 -> 35790 bytes .../imaging/testdata/out_sharpen_0.5.png | Bin 0 -> 33936 bytes .../imaging/testdata/out_sharpen_1.5.png | Bin 0 -> 36632 bytes .../disintegration/imaging/tools.go | 1 + .../disintegration/imaging/tools_test.go | 2 +- .../disintegration/imaging/utils.go | 42 +- .../disintegration/imaging/utils_test.go | 24 +- .../golang/freetype/truetype/truetype.go | 13 +- .../hashicorp/hcl/json/parser/parser.go | 2 +- vendor/github.com/lib/pq/conn.go | 6 +- vendor/github.com/miekg/dns/README.md | 2 +- vendor/github.com/miekg/dns/dnssec.go | 2 +- vendor/github.com/miekg/dns/labels.go | 3 + vendor/github.com/miekg/dns/labels_test.go | 3 + vendor/github.com/miekg/dns/msg.go | 20 +- vendor/github.com/miekg/dns/msg_test.go | 124 + vendor/github.com/miekg/dns/nsecx.go | 76 +- vendor/github.com/miekg/dns/nsecx_test.go | 124 +- vendor/github.com/miekg/dns/parse_test.go | 18 + vendor/github.com/miekg/dns/scan_rr.go | 13 + vendor/github.com/miekg/dns/types.go | 8 + vendor/github.com/miekg/dns/zcompress.go | 146 +- vendor/github.com/miekg/dns/zmsg.go | 32 + vendor/github.com/miekg/dns/ztypes.go | 15 + vendor/github.com/minio/minio-go/README.md | 3 +- .../minio/minio-go/api-error-response.go | 10 + .../minio/minio-go/api-get-object.go | 37 +- vendor/github.com/minio/minio-go/api.go | 43 +- .../minio/minio-go/api_functional_v2_test.go | 2 +- .../minio/minio-go/api_functional_v4_test.go | 151 +- .../github.com/minio/minio-go/bucket-cache.go | 7 - .../minio/minio-go/copy-conditions.go | 10 +- vendor/github.com/minio/minio-go/docs/API.md | 89 +- .../minio/minio-go/examples/s3/copyobject.go | 2 +- .../examples/s3/putobject-s3-accelerate.go | 56 + .../minio/minio-go/pkg/s3utils/utils.go | 12 - .../minio/minio-go/pkg/set/stringset.go | 8 +- .../minio/minio-go/pkg/set/stringset_test.go | 25 + .../mitchellh/mapstructure/.travis.yml | 2 +- .../mitchellh/mapstructure/decode_hooks.go | 8 +- .../mitchellh/mapstructure/mapstructure.go | 11 +- .../mapstructure/mapstructure_test.go | 2 +- .../github.com/nicksnyder/go-i18n/.travis.yml | 1 + .../github.com/nicksnyder/go-i18n/README.md | 66 +- .../go-i18n/goi18n/constants_command.go | 1 - .../go-i18n/goi18n/merge_command.go | 97 +- .../go-i18n/goi18n/merge_command_flat_test.go | 36 + .../go-i18n/goi18n/merge_command_test.go | 3 +- .../go-i18n/goi18n/testdata/en-us.flat.json | 34 + .../go-i18n/goi18n/testdata/en-us.flat.toml | 25 + .../go-i18n/goi18n/testdata/en-us.flat.yaml | 25 + .../testdata/expected/flat/ar-ar.all.json | 43 + .../expected/flat/ar-ar.untranslated.json | 32 + .../testdata/expected/flat/en-us.all.json | 27 + .../expected/flat/en-us.untranslated.json | 1 + .../flat/en-us.untranslated.json.json | 0 .../testdata/expected/flat/fr-fr.all.json | 27 + .../expected/flat/fr-fr.untranslated.json | 27 + .../goi18n/testdata/input/flat/ar-ar.one.toml | 37 + .../goi18n/testdata/input/flat/ar-ar.two.json | 45 + .../testdata/input/flat/en-us.constants.json | 34 + .../goi18n/testdata/input/flat/en-us.one.yaml | 16 + .../goi18n/testdata/input/flat/en-us.two.json | 19 + .../goi18n/testdata/input/flat/fr-fr.json | 0 .../nicksnyder/go-i18n/i18n/bundle/bundle.go | 101 +- .../i18n/translation/plural_translation.go | 4 + .../i18n/translation/single_translation.go | 4 + .../go-i18n/i18n/translation/template.go | 4 + .../go-i18n/i18n/translation/translation.go | 1 + .../go-i18n/i18n/translations_test.go | 89 + .../github.com/pelletier/go-toml/marshal.go | 22 +- .../pelletier/go-toml/marshal_test.go | 48 + .../pelletier/go-toml/tomltree_write.go | 3 + .../github.com/prometheus/common/.travis.yml | 3 +- .../prometheus/common/route/route.go | 50 +- .../prometheus/common/route/route_test.go | 45 +- .../github.com/prometheus/procfs/sysfs/doc.go | 16 + .../sysfs/fixtures/fs/xfs/sda1/stats/stats | 1 + .../sysfs/fixtures/fs/xfs/sdb1/stats/stats | 1 + .../github.com/prometheus/procfs/sysfs/fs.go | 82 + .../prometheus/procfs/sysfs/fs_test.go | 66 + .../github.com/prometheus/procfs/xfs/parse.go | 2 - .../prometheus/procfs/xfs/parse_test.go | 6 +- .../github.com/prometheus/procfs/xfs/xfs.go | 5 + vendor/github.com/spf13/cast/cast.go | 6 + vendor/github.com/spf13/cast/cast_test.go | 32 + vendor/github.com/spf13/cast/caste.go | 29 + vendor/github.com/spf13/cobra/README.md | 14 +- .../spf13/cobra/bash_completions.go | 4 +- vendor/github.com/spf13/cobra/cobra.go | 2 +- .../github.com/spf13/cobra/cobra/cmd/init.go | 4 +- .../spf13/cobra/cobra/cmd/license_apache_2.go | 238 + .../cobra/cobra/cmd/license_bsd_clause_2.go | 71 + .../cobra/cobra/cmd/license_bsd_clause_3.go | 79 + .../spf13/cobra/cobra/cmd/license_gpl_2.go | 318 + .../spf13/cobra/cobra/cmd/license_gpl_3.go | 661 + .../spf13/cobra/cobra/cmd/license_mit.go | 63 + .../spf13/cobra/cobra/cmd/licenses.go | 1321 +- .../github.com/spf13/cobra/cobra/cmd/root.go | 6 +- vendor/github.com/spf13/cobra/cobra_test.go | 57 +- vendor/github.com/spf13/cobra/command.go | 278 +- vendor/github.com/spf13/cobra/command_test.go | 46 +- vendor/github.com/spf13/cobra/doc/man_docs.go | 4 +- vendor/github.com/spf13/cobra/doc/man_docs.md | 7 +- .../spf13/cobra/doc/man_docs_test.go | 5 +- .../spf13/cobra/doc/man_examples_test.go | 4 +- vendor/github.com/spf13/cobra/doc/md_docs.go | 8 + vendor/github.com/spf13/cobra/doc/md_docs.md | 18 +- .../spf13/cobra/doc/md_docs_test.go | 27 +- .../github.com/spf13/cobra/doc/yaml_docs.go | 10 +- .../github.com/spf13/cobra/doc/yaml_docs.md | 13 +- .../spf13/cobra/doc/yaml_docs_test.go | 28 +- vendor/github.com/spf13/pflag/README.md | 6 +- vendor/github.com/spf13/pflag/flag.go | 83 +- vendor/github.com/spf13/pflag/flag_test.go | 44 +- vendor/github.com/spf13/viper/viper.go | 28 +- vendor/github.com/spf13/viper/viper_test.go | 67 + vendor/github.com/tylerb/graceful/README.md | 5 - vendor/github.com/xenolf/lego/acme/client.go | 5 +- vendor/github.com/xenolf/lego/acme/http.go | 33 +- vendor/github.com/xenolf/lego/acme/jws.go | 16 +- vendor/github.com/xenolf/lego/cli.go | 2 +- .../xenolf/lego/providers/dns/azure/azure.go | 5 +- .../lego/providers/dns/dnsimple/dnsimple.go | 4 +- .../providers/dns/dnsimple/dnsimple_test.go | 4 +- vendor/golang.org/x/crypto/acme/acme.go | 180 +- vendor/golang.org/x/crypto/acme/acme_test.go | 47 +- .../x/crypto/acme/autocert/autocert.go | 57 +- .../x/crypto/acme/autocert/autocert_test.go | 100 +- .../x/crypto/acme/autocert/cache.go | 14 +- .../x/crypto/acme/autocert/cache_test.go | 3 +- .../x/crypto/acme/autocert/example_test.go | 34 + .../x/crypto/acme/autocert/listener.go | 153 + .../x/crypto/acme/autocert/renewal.go | 17 +- .../x/crypto/acme/autocert/renewal_test.go | 7 +- vendor/golang.org/x/crypto/blake2b/blake2b.go | 2 +- vendor/golang.org/x/crypto/blake2s/blake2s.go | 2 +- .../chacha20poly1305/chacha20poly1305.go | 2 +- .../golang.org/x/crypto/cryptobyte/string.go | 2 +- .../x/crypto/curve25519/cswap_amd64.s | 131 +- .../x/crypto/curve25519/curve25519.go | 23 +- .../x/crypto/curve25519/curve25519_test.go | 10 + .../x/crypto/ssh/agent/client_test.go | 4 +- .../x/crypto/ssh/agent/example_test.go | 15 +- .../x/crypto/ssh/agent/server_test.go | 4 +- vendor/golang.org/x/crypto/ssh/certs.go | 2 +- vendor/golang.org/x/crypto/ssh/client.go | 56 +- vendor/golang.org/x/crypto/ssh/client_auth.go | 49 +- .../x/crypto/ssh/client_auth_test.go | 118 +- vendor/golang.org/x/crypto/ssh/client_test.go | 42 + vendor/golang.org/x/crypto/ssh/common.go | 14 +- vendor/golang.org/x/crypto/ssh/doc.go | 3 + .../golang.org/x/crypto/ssh/example_test.go | 57 +- vendor/golang.org/x/crypto/ssh/handshake.go | 53 +- .../golang.org/x/crypto/ssh/handshake_test.go | 29 + vendor/golang.org/x/crypto/ssh/keys.go | 94 +- .../x/crypto/ssh/knownhosts/knownhosts.go | 547 + .../crypto/ssh/knownhosts/knownhosts_test.go | 307 + vendor/golang.org/x/crypto/ssh/server.go | 33 + .../golang.org/x/crypto/ssh/session_test.go | 10 +- vendor/golang.org/x/crypto/ssh/streamlocal.go | 115 + vendor/golang.org/x/crypto/ssh/tcpip.go | 196 +- .../x/crypto/ssh/terminal/util_solaris.go | 63 +- .../golang.org/x/crypto/ssh/test/cert_test.go | 3 +- .../x/crypto/ssh/test/dial_unix_test.go | 128 + .../x/crypto/ssh/test/forward_unix_test.go | 62 +- .../x/crypto/ssh/test/tcpip_test.go | 46 - .../x/crypto/ssh/test/test_unix_test.go | 10 + .../golang.org/x/crypto/ssh/testdata/keys.go | 16 + .../x/image/font/gofont/gobold/data.go | 16897 +++++++------ .../x/image/font/gofont/gobolditalic/data.go | 15446 ++++++------ .../x/image/font/gofont/goitalic/data.go | 16375 ++++++------ .../x/image/font/gofont/gomedium/data.go | 17381 ++++++------- .../image/font/gofont/gomediumitalic/data.go | 17063 +++++++------ .../x/image/font/gofont/gomono/data.go | 18969 +++++++------- .../x/image/font/gofont/gomonobold/data.go | 19989 +++++++-------- .../font/gofont/gomonobolditalic/data.go | 20304 +++++++-------- .../x/image/font/gofont/gomonoitalic/data.go | 20957 ++++++++-------- .../x/image/font/gofont/goregular/data.go | 15765 ++++++------ .../x/image/font/gofont/gosmallcaps/data.go | 8362 ++++++ .../font/gofont/gosmallcapsitalic/data.go | 8794 +++++++ .../image/font/gofont/ttfs/Go-Bold-Italic.ttf | Bin 141872 -> 150732 bytes .../x/image/font/gofont/ttfs/Go-Bold.ttf | Bin 138956 -> 144572 bytes .../x/image/font/gofont/ttfs/Go-Italic.ttf | Bin 138588 -> 146980 bytes .../font/gofont/ttfs/Go-Medium-Italic.ttf | Bin 146496 -> 155436 bytes .../x/image/font/gofont/ttfs/Go-Medium.ttf | Bin 142368 -> 146888 bytes .../font/gofont/ttfs/Go-Mono-Bold-Italic.ttf | Bin 173600 -> 176832 bytes .../x/image/font/gofont/ttfs/Go-Mono-Bold.ttf | Bin 164936 -> 168340 bytes .../image/font/gofont/ttfs/Go-Mono-Italic.ttf | Bin 169824 -> 173548 bytes .../x/image/font/gofont/ttfs/Go-Mono.ttf | Bin 160760 -> 164200 bytes .../x/image/font/gofont/ttfs/Go-Regular.ttf | Bin 134988 -> 140308 bytes .../font/gofont/ttfs/Go-Smallcaps-Italic.ttf | Bin 0 -> 140524 bytes .../x/image/font/gofont/ttfs/Go-Smallcaps.ttf | Bin 0 -> 133604 bytes vendor/golang.org/x/image/font/sfnt/cmap.go | 16 +- .../x/image/font/sfnt/example_test.go | 41 +- .../x/image/font/sfnt/postscript.go | 507 +- .../x/image/font/sfnt/proprietary_test.go | 415 +- vendor/golang.org/x/image/font/sfnt/sfnt.go | 399 +- .../golang.org/x/image/font/sfnt/sfnt_test.go | 229 +- .../golang.org/x/image/font/sfnt/truetype.go | 78 +- vendor/golang.org/x/image/tiff/reader.go | 7 - .../golang.org/x/net/http2/h2demo/h2demo.go | 96 +- vendor/golang.org/x/net/http2/h2demo/tmpl.go | 1991 ++ vendor/golang.org/x/net/http2/hpack/tables.go | 4 +- .../x/net/http2/hpack/tables_test.go | 26 + vendor/golang.org/x/net/http2/server.go | 36 +- vendor/golang.org/x/net/http2/server_test.go | 2 +- vendor/golang.org/x/net/nettest/conntest.go | 1 + vendor/golang.org/x/net/trace/trace.go | 13 - vendor/golang.org/x/net/trace/trace_go16.go | 21 + vendor/golang.org/x/net/trace/trace_go17.go | 21 + vendor/golang.org/x/sys/unix/README.md | 173 + vendor/golang.org/x/sys/unix/dirent.go | 102 + vendor/golang.org/x/sys/unix/endian_big.go | 9 + vendor/golang.org/x/sys/unix/endian_little.go | 9 + vendor/golang.org/x/sys/unix/linux/Dockerfile | 48 + vendor/golang.org/x/sys/unix/linux/mkall.go | 379 + .../{mksysnum_linux.pl => linux/mksysnum.pl} | 15 +- .../unix/{types_linux.go => linux/types.go} | 70 +- vendor/golang.org/x/sys/unix/mkall.sh | 143 +- vendor/golang.org/x/sys/unix/mkerrors.sh | 43 +- vendor/golang.org/x/sys/unix/mkpost.go | 76 +- vendor/golang.org/x/sys/unix/mksyscall.pl | 12 +- .../x/sys/unix/mksyscall_solaris.pl | 2 +- .../golang.org/x/sys/unix/mksysnum_darwin.pl | 2 +- .../x/sys/unix/mksysnum_dragonfly.pl | 2 +- .../golang.org/x/sys/unix/mksysnum_freebsd.pl | 2 +- .../golang.org/x/sys/unix/mksysnum_netbsd.pl | 2 +- .../golang.org/x/sys/unix/mksysnum_openbsd.pl | 2 +- .../golang.org/x/sys/unix/syscall_darwin.go | 36 +- .../x/sys/unix/syscall_dragonfly.go | 35 +- .../golang.org/x/sys/unix/syscall_freebsd.go | 36 +- vendor/golang.org/x/sys/unix/syscall_linux.go | 51 +- .../golang.org/x/sys/unix/syscall_netbsd.go | 36 +- .../golang.org/x/sys/unix/syscall_openbsd.go | 36 +- .../golang.org/x/sys/unix/syscall_solaris.go | 38 +- vendor/golang.org/x/sys/unix/types_darwin.go | 2 +- .../golang.org/x/sys/unix/types_dragonfly.go | 2 +- vendor/golang.org/x/sys/unix/types_freebsd.go | 2 +- vendor/golang.org/x/sys/unix/types_netbsd.go | 2 +- vendor/golang.org/x/sys/unix/types_openbsd.go | 2 +- vendor/golang.org/x/sys/unix/types_solaris.go | 2 +- .../x/sys/unix/zerrors_linux_386.go | 245 +- .../x/sys/unix/zerrors_linux_amd64.go | 238 +- .../x/sys/unix/zerrors_linux_arm.go | 314 +- .../x/sys/unix/zerrors_linux_arm64.go | 161 +- .../x/sys/unix/zerrors_linux_mips.go | 308 +- .../x/sys/unix/zerrors_linux_mips64.go | 156 +- .../x/sys/unix/zerrors_linux_mips64le.go | 156 +- .../x/sys/unix/zerrors_linux_mipsle.go | 49 +- .../x/sys/unix/zerrors_linux_ppc64.go | 141 +- .../x/sys/unix/zerrors_linux_ppc64le.go | 191 +- .../x/sys/unix/zerrors_linux_s390x.go | 51 +- .../x/sys/unix/zsyscall_linux_386.go | 2 +- .../x/sys/unix/zsyscall_linux_amd64.go | 2 +- .../x/sys/unix/zsyscall_linux_arm.go | 2 +- .../x/sys/unix/zsyscall_linux_arm64.go | 2 +- .../x/sys/unix/zsyscall_linux_mips.go | 2 +- .../x/sys/unix/zsyscall_linux_mips64.go | 2 +- .../x/sys/unix/zsyscall_linux_mips64le.go | 2 +- .../x/sys/unix/zsyscall_linux_mipsle.go | 2 +- .../x/sys/unix/zsyscall_linux_ppc64.go | 2 +- .../x/sys/unix/zsyscall_linux_ppc64le.go | 2 +- .../x/sys/unix/zsyscall_linux_s390x.go | 2 +- .../x/sys/unix/zsysnum_linux_386.go | 4 +- .../x/sys/unix/zsysnum_linux_amd64.go | 4 +- .../x/sys/unix/zsysnum_linux_arm.go | 4 +- .../x/sys/unix/zsysnum_linux_arm64.go | 4 +- .../x/sys/unix/zsysnum_linux_mips.go | 4 +- .../x/sys/unix/zsysnum_linux_mips64.go | 4 +- .../x/sys/unix/zsysnum_linux_mips64le.go | 4 +- .../x/sys/unix/zsysnum_linux_mipsle.go | 4 +- .../x/sys/unix/zsysnum_linux_ppc64.go | 4 +- .../x/sys/unix/zsysnum_linux_ppc64le.go | 4 +- .../x/sys/unix/zsysnum_linux_s390x.go | 4 +- .../golang.org/x/sys/unix/ztypes_linux_386.go | 19 +- .../x/sys/unix/ztypes_linux_amd64.go | 47 +- .../golang.org/x/sys/unix/ztypes_linux_arm.go | 19 +- .../x/sys/unix/ztypes_linux_arm64.go | 49 +- .../x/sys/unix/ztypes_linux_mips.go | 16 +- .../x/sys/unix/ztypes_linux_mips64.go | 26 +- .../x/sys/unix/ztypes_linux_mips64le.go | 26 +- .../x/sys/unix/ztypes_linux_mipsle.go | 16 +- .../x/sys/unix/ztypes_linux_ppc64.go | 51 +- .../x/sys/unix/ztypes_linux_ppc64le.go | 51 +- .../x/sys/unix/ztypes_linux_s390x.go | 19 +- .../x/sys/windows/syscall_windows.go | 8 +- .../x/sys/windows/zsyscall_windows.go | 21 +- .../x/sys/windows/ztypes_windows.go | 6 +- vendor/golang.org/x/text/cases/cases.go | 4 +- .../x/text/feature/plural/common.go | 70 + .../x/text/feature/plural/data_test.go | 192 + .../gen_plural.go => feature/plural/gen.go} | 54 +- .../x/text/feature/plural/gen_common.go | 74 + .../x/text/feature/plural/plural.go | 234 + .../x/text/feature/plural/plural_test.go | 203 + .../x/text/feature/plural/tables.go | 541 + vendor/golang.org/x/text/gen.go | 1 + .../x/text/internal/catmsg/varint.go | 62 + .../x/text/internal/catmsg/varint_test.go | 123 + .../text/internal/export/idna/example_test.go | 7 +- .../x/text/internal/export/idna/idna.go | 13 +- .../x/text/internal/format/plural/plural.go | 38 - .../x/text/internal/number/common.go | 56 +- .../x/text/internal/number/data_test.go | 194 - .../x/text/internal/number/decimal.go | 416 - .../x/text/internal/number/extfloat.go | 671 - .../golang.org/x/text/internal/number/ftoa.go | 448 - .../golang.org/x/text/internal/number/gen.go | 10 +- .../x/text/internal/number/gen_common.go | 54 +- .../golang.org/x/text/internal/number/itoa.go | 111 - .../x/text/internal/number/number.go | 2 +- .../x/text/internal/number/plural.go | 119 - .../x/text/internal/number/plural_test.go | 110 - .../x/text/internal/number/tables.go | 537 +- .../x/text/secure/precis/profile_test.go | 7 + .../x/text/secure/precis/profiles.go | 17 +- .../x/text/unicode/norm/composition.go | 18 +- vendor/golang.org/x/text/unicode/norm/iter.go | 31 +- .../x/text/unicode/norm/iter_test.go | 2 +- .../x/text/unicode/norm/normalize.go | 16 +- .../x/text/unicode/norm/normalize_test.go | 78 +- vendor/golang.org/x/time/rate/rate.go | 3 +- vendor/golang.org/x/time/rate/rate_test.go | 3 +- vendor/gopkg.in/gomail.v2/.travis.yml | 8 - vendor/gopkg.in/gomail.v2/CHANGELOG.md | 20 - vendor/gopkg.in/gomail.v2/CONTRIBUTING.md | 20 - vendor/gopkg.in/gomail.v2/LICENSE | 20 - vendor/gopkg.in/gomail.v2/README.md | 97 - vendor/gopkg.in/gomail.v2/auth.go | 67 - vendor/gopkg.in/gomail.v2/auth_test.go | 156 - vendor/gopkg.in/gomail.v2/doc.go | 5 - vendor/gopkg.in/gomail.v2/example_test.go | 215 - vendor/gopkg.in/gomail.v2/message.go | 302 - vendor/gopkg.in/gomail.v2/message_test.go | 630 - vendor/gopkg.in/gomail.v2/mime.go | 19 - vendor/gopkg.in/gomail.v2/mime_go14.go | 16 - vendor/gopkg.in/gomail.v2/send.go | 117 - vendor/gopkg.in/gomail.v2/send_test.go | 80 - vendor/gopkg.in/gomail.v2/smtp.go | 175 - vendor/gopkg.in/gomail.v2/smtp_test.go | 254 - vendor/gopkg.in/gomail.v2/writeto.go | 242 - vendor/gopkg.in/yaml.v2/decode.go | 1 - vendor/gopkg.in/yaml.v2/emitterc.go | 1 - vendor/gopkg.in/yaml.v2/parserc.go | 1 - 389 files changed, 123993 insertions(+), 97347 deletions(-) create mode 100644 vendor/github.com/NYTimes/gziphandler/gzip_go18.go create mode 100644 vendor/github.com/NYTimes/gziphandler/gzip_go18_test.go rename vendor/github.com/{jaytaylor => cpanato}/html2text/.gitignore (100%) rename vendor/github.com/{jaytaylor => cpanato}/html2text/.travis.yml (100%) rename vendor/github.com/{jaytaylor => cpanato}/html2text/LICENSE (100%) rename vendor/github.com/{jaytaylor => cpanato}/html2text/README.md (73%) rename vendor/github.com/{jaytaylor => cpanato}/html2text/html2text.go (96%) rename vendor/github.com/{jaytaylor => cpanato}/html2text/html2text_test.go (100%) rename vendor/github.com/{jaytaylor => cpanato}/html2text/testdata/utf8.html (100%) rename vendor/github.com/{jaytaylor => cpanato}/html2text/testdata/utf8_with_bom.xhtml (100%) create mode 100644 vendor/github.com/disintegration/imaging/convolution.go create mode 100644 vendor/github.com/disintegration/imaging/convolution_test.go create mode 100644 vendor/github.com/disintegration/imaging/example_test.go create mode 100644 vendor/github.com/disintegration/imaging/testdata/lena_128.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/lena_512.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_blur_0.5.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_blur_1.5.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_brightness_m10.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_brightness_p10.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_contrast_m10.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_contrast_p10.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_example.jpg create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_gamma_0.75.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_gamma_1.25.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_resize_catrom.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_resize_lanczos.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_resize_linear.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_resize_nearest.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_sharpen_0.5.png create mode 100644 vendor/github.com/disintegration/imaging/testdata/out_sharpen_1.5.png create mode 100644 vendor/github.com/miekg/dns/msg_test.go create mode 100644 vendor/github.com/minio/minio-go/examples/s3/putobject-s3-accelerate.go create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/merge_command_flat_test.go create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.toml create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/en-us.flat.yaml create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/ar-ar.all.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/ar-ar.untranslated.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.all.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.untranslated.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/en-us.untranslated.json.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/fr-fr.all.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/expected/flat/fr-fr.untranslated.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/ar-ar.one.toml create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/ar-ar.two.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.constants.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.one.yaml create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/en-us.two.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/goi18n/testdata/input/flat/fr-fr.json create mode 100644 vendor/github.com/nicksnyder/go-i18n/i18n/translations_test.go create mode 100644 vendor/github.com/prometheus/procfs/sysfs/doc.go create mode 100644 vendor/github.com/prometheus/procfs/sysfs/fixtures/fs/xfs/sda1/stats/stats create mode 100644 vendor/github.com/prometheus/procfs/sysfs/fixtures/fs/xfs/sdb1/stats/stats create mode 100644 vendor/github.com/prometheus/procfs/sysfs/fs.go create mode 100644 vendor/github.com/prometheus/procfs/sysfs/fs_test.go create mode 100644 vendor/github.com/spf13/cobra/cobra/cmd/license_apache_2.go create mode 100644 vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_2.go create mode 100644 vendor/github.com/spf13/cobra/cobra/cmd/license_bsd_clause_3.go create mode 100644 vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_2.go create mode 100644 vendor/github.com/spf13/cobra/cobra/cmd/license_gpl_3.go create mode 100644 vendor/github.com/spf13/cobra/cobra/cmd/license_mit.go create mode 100644 vendor/golang.org/x/crypto/acme/autocert/example_test.go create mode 100644 vendor/golang.org/x/crypto/acme/autocert/listener.go create mode 100644 vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts.go create mode 100644 vendor/golang.org/x/crypto/ssh/knownhosts/knownhosts_test.go create mode 100644 vendor/golang.org/x/crypto/ssh/streamlocal.go create mode 100644 vendor/golang.org/x/crypto/ssh/test/dial_unix_test.go delete mode 100644 vendor/golang.org/x/crypto/ssh/test/tcpip_test.go create mode 100644 vendor/golang.org/x/image/font/gofont/gosmallcaps/data.go create mode 100644 vendor/golang.org/x/image/font/gofont/gosmallcapsitalic/data.go create mode 100644 vendor/golang.org/x/image/font/gofont/ttfs/Go-Smallcaps-Italic.ttf create mode 100644 vendor/golang.org/x/image/font/gofont/ttfs/Go-Smallcaps.ttf create mode 100644 vendor/golang.org/x/net/http2/h2demo/tmpl.go create mode 100644 vendor/golang.org/x/net/trace/trace_go16.go create mode 100644 vendor/golang.org/x/net/trace/trace_go17.go create mode 100644 vendor/golang.org/x/sys/unix/README.md create mode 100644 vendor/golang.org/x/sys/unix/dirent.go create mode 100644 vendor/golang.org/x/sys/unix/endian_big.go create mode 100644 vendor/golang.org/x/sys/unix/endian_little.go create mode 100644 vendor/golang.org/x/sys/unix/linux/Dockerfile create mode 100644 vendor/golang.org/x/sys/unix/linux/mkall.go rename vendor/golang.org/x/sys/unix/{mksysnum_linux.pl => linux/mksysnum.pl} (78%) rename vendor/golang.org/x/sys/unix/{types_linux.go => linux/types.go} (88%) create mode 100644 vendor/golang.org/x/text/feature/plural/common.go create mode 100644 vendor/golang.org/x/text/feature/plural/data_test.go rename vendor/golang.org/x/text/{internal/number/gen_plural.go => feature/plural/gen.go} (91%) create mode 100644 vendor/golang.org/x/text/feature/plural/gen_common.go create mode 100644 vendor/golang.org/x/text/feature/plural/plural.go create mode 100644 vendor/golang.org/x/text/feature/plural/plural_test.go create mode 100644 vendor/golang.org/x/text/feature/plural/tables.go create mode 100644 vendor/golang.org/x/text/internal/catmsg/varint.go create mode 100644 vendor/golang.org/x/text/internal/catmsg/varint_test.go delete mode 100644 vendor/golang.org/x/text/internal/format/plural/plural.go delete mode 100644 vendor/golang.org/x/text/internal/number/data_test.go delete mode 100644 vendor/golang.org/x/text/internal/number/decimal.go delete mode 100644 vendor/golang.org/x/text/internal/number/extfloat.go delete mode 100644 vendor/golang.org/x/text/internal/number/ftoa.go delete mode 100644 vendor/golang.org/x/text/internal/number/itoa.go delete mode 100644 vendor/golang.org/x/text/internal/number/plural.go delete mode 100644 vendor/golang.org/x/text/internal/number/plural_test.go delete mode 100644 vendor/gopkg.in/gomail.v2/.travis.yml delete mode 100644 vendor/gopkg.in/gomail.v2/CHANGELOG.md delete mode 100644 vendor/gopkg.in/gomail.v2/CONTRIBUTING.md delete mode 100644 vendor/gopkg.in/gomail.v2/LICENSE delete mode 100644 vendor/gopkg.in/gomail.v2/README.md delete mode 100644 vendor/gopkg.in/gomail.v2/auth.go delete mode 100644 vendor/gopkg.in/gomail.v2/auth_test.go delete mode 100644 vendor/gopkg.in/gomail.v2/doc.go delete mode 100644 vendor/gopkg.in/gomail.v2/example_test.go delete mode 100644 vendor/gopkg.in/gomail.v2/message.go delete mode 100644 vendor/gopkg.in/gomail.v2/message_test.go delete mode 100644 vendor/gopkg.in/gomail.v2/mime.go delete mode 100644 vendor/gopkg.in/gomail.v2/mime_go14.go delete mode 100644 vendor/gopkg.in/gomail.v2/send.go delete mode 100644 vendor/gopkg.in/gomail.v2/send_test.go delete mode 100644 vendor/gopkg.in/gomail.v2/smtp.go delete mode 100644 vendor/gopkg.in/gomail.v2/smtp_test.go delete mode 100644 vendor/gopkg.in/gomail.v2/writeto.go diff --git a/glide.lock b/glide.lock index d82047f8a9..0836890ea3 100644 --- a/glide.lock +++ b/glide.lock @@ -1,5 +1,5 @@ -hash: 193ce14426dc6d4ae2da1c1aad08389a157529f829ed12948095239e18e045a5 -updated: 2017-03-30T22:26:27.084209918-07:00 +hash: 024025a74451af061cc996e2b9192bad74cfd0952515fab332e3ad2968606909 +updated: 2017-04-24T11:23:43.046980248-04:00 imports: - name: github.com/alecthomas/log4go version: 3fbce08846379ec7f4f6bc7fce6dd01ce28fae4c @@ -8,10 +8,12 @@ imports: version: 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9 subpackages: - quantile +- name: github.com/cpanato/html2text + version: d788b7d6dc58bea298b318059332a25442583880 - name: github.com/dgryski/dgoogauth version: 96977cbd42e27be71f9f731db6634123de7e861a - name: github.com/disintegration/imaging - version: 243d2d8673c1225a6afceeb9b3b4423d485dc8df + version: ac27d1805a555e1754fa177216ee07f4e63c30b5 - name: github.com/dyatlov/go-opengraph version: 41a3523719dfbe7e8f853fbd4061867543db5270 subpackages: @@ -25,12 +27,12 @@ imports: - name: github.com/go-sql-driver/mysql version: a0583e0143b1624142adab07e0e97fe106d99561 - name: github.com/golang/freetype - version: d9be45aaf7452cc30c0ceb1b1bf7efe1d17b7c87 + version: b12e98108289d6367ecd1a819deee597b2c3fa57 subpackages: - raster - truetype - name: github.com/golang/protobuf - version: c9c7427a2a70d2eb3bafa0ab2dc163e45f143317 + version: 2bba0603135d7d7f5cb73b2125beeda19c09f4ef subpackages: - proto - name: github.com/gorilla/context @@ -46,7 +48,7 @@ imports: subpackages: - simplelru - name: github.com/hashicorp/hcl - version: 630949a3c5fa3c613328e1b8256052cbc2327c9b + version: 7fa7fff964d035e8a162cce3a164b3ad02ad651b subpackages: - hcl/ast - hcl/parser @@ -58,12 +60,10 @@ imports: - json/token - name: github.com/inconshreveable/mousetrap version: 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75 -- name: github.com/jaytaylor/html2text - version: f3b8a7ca0a23f0a806b2e1ad1247de39ecde54bf - name: github.com/jehiah/go-strftime version: 834e15c05a45371503440cc195bbd05c9a0968d9 - name: github.com/lib/pq - version: 472a0745531a17dbac346e828b4c60e73ddff30c + version: 2704adc878c21e1329f46f6e56a1c387d788ff94 subpackages: - oid - name: github.com/magiconair/properties @@ -79,33 +79,33 @@ imports: subpackages: - pbutil - name: github.com/miekg/dns - version: b54e1be39a9c14cd0bcea6df97eb15b3ec5e8cde + version: 6ebcb714d36901126ee2807031543b38c56de963 - name: github.com/minio/minio-go - version: 52cc94e879db78c2e2c6e160869df943137ec4cd + version: dcaae9ec4d0b0a81d17f22f6d7a186491f6a55ec subpackages: - pkg/policy - pkg/s3signer - pkg/s3utils - pkg/set - name: github.com/mitchellh/mapstructure - version: 53818660ed4955e899c0bcafa97299a388bd7c8e + version: cc8532a8e9a55ea36402aa21efdf403a60d34096 - name: github.com/mssola/user_agent version: 85b2f5798558a46fc23443c596e781712f4b7792 - name: github.com/nicksnyder/go-i18n - version: f757c9f9b69c16ff69d38dbf224be28a7b6537bb + version: fed5740db6b83ee8ba7c1b07ff063115bc6f4b96 subpackages: - i18n - i18n/bundle - i18n/language - i18n/translation - name: github.com/NYTimes/gziphandler - version: 3b0c4852c5b9710340f1ed7b1a529c46a3bc0fc1 + version: 22d4470af89e09998fc16b35029df973932df4ae - name: github.com/pborman/uuid version: a97ce2ca70fa5a848076093f05e639a89ca34d06 - name: github.com/pelletier/go-buffruneio version: c37440a7cf42ac63b919c752ca73a85067e05992 - name: github.com/pelletier/go-toml - version: e32a2e04744250647a72bf17da1b09befc03b6b1 + version: fe206efb84b2bc8e8cfafe6b4c1826622be969e3 - name: github.com/prometheus/client_golang version: c5b7fccd204277076155f10851dad72b76a49317 subpackages: @@ -115,11 +115,11 @@ imports: subpackages: - go - name: github.com/prometheus/common - version: 49fee292b27bfff7f354ee0f64e1bc4850462edf + version: 9e0844febd9e2856f839c9cb974fbd676d1755a8 subpackages: - expfmt - name: github.com/prometheus/procfs - version: a1dba9ce8baed984a2495b658c82687f8157b98f + version: 332f6238064950a97bc3ed3f5421f6418537e707 - name: github.com/rsc/letsencrypt version: 76104d26167d38b6a0010f42bfc8ec5487742e8b - name: github.com/rwcarlsen/goexif @@ -136,31 +136,31 @@ imports: subpackages: - mem - name: github.com/spf13/cast - version: ce135a4ebeee6cfe9a26c93ee0d37825f26113c7 + version: acbeb36b902d72a7a4c18e8f3241075e7ab763e4 - name: github.com/spf13/cobra - version: 7be4beda01ec05d0b93d80b3facd2b6f44080d94 + version: f4f10f6873175e78bb1503da7e78c260a7f3ef63 - name: github.com/spf13/jwalterweatherman version: fa7ca7e836cf3a8bb4ebf799f472c12d7e903d66 - name: github.com/spf13/pflag - version: 9ff6c6923cfffbcd502984b8e0c80539a94968b7 + version: 2300d0f8576fe575f71aaa5b9bbe4e1b0dc2eb51 - name: github.com/spf13/viper - version: 84f94806c67f59dd7ae87bc5351f7a9c94a4558d + version: 0967fc9aceab2ce9da34061253ac10fb99bba5b2 - name: github.com/tylerb/graceful - version: d72b0151351a13d0421b763b88f791469c4f5dc7 + version: 4654dfbb6ad53cb5e27f37d99b02e16c1872fbbb - name: github.com/xenolf/lego - version: 0e2937900b224325f4476745a9b53aef246b7410 + version: 5dfe609afb1ebe9da97c9846d97a55415e5a5ccd subpackages: - acme - name: github.com/xtgo/uuid version: a0b114877d4caeffbd7f87e3757c17fce570fea7 - name: golang.org/x/crypto - version: 459e26527287adbc2adcc5d0d49abff9a5f315a7 + version: 3543873453996aaab2fc6b3928a35fc5ca2b5afb subpackages: - bcrypt - blowfish - ocsp - name: golang.org/x/image - version: c0851fbc5b9272dd7d08a021e9e3d2a21027b51f + version: 3210c0296b49a552ad9668ede9c61008df821b94 subpackages: - bmp - font @@ -168,29 +168,27 @@ imports: - tiff - tiff/lzw - name: golang.org/x/net - version: 78ebe5c8b6a27ec13109c73c22193d618270e1e1 + version: d212a1ef2de2f5d441c327b8f26cf3ea3ea9f265 subpackages: - context - html - html/atom - publicsuffix - name: golang.org/x/sys - version: 8fd966b47dbdd4faa03de0d06e3d733baeb9a1a9 + version: ea9bcade75cb975a0b9738936568ab388b845617 subpackages: - unix - name: golang.org/x/text - version: 65f4f820a7954b82e5c9325e1e088a4fda098f36 + version: a9a820217f98f7c8a207ec1e45a874e1fe12c478 subpackages: - transform - unicode/norm - name: golang.org/x/time - version: f51c12702a4d776e4c1fa9b0fabab841babae631 + version: c06e80d9300e4443158a03817b8a8cb37d230320 subpackages: - rate - name: gopkg.in/asn1-ber.v1 version: 4e86f4367175e39f69d9358a5f17b4dda270378d -- name: gopkg.in/gomail.v2 - version: 41f3572897373c5538c50a2402db15db079fa4fd - name: gopkg.in/square/go-jose.v1 version: aa2e30fdd1fe9dd3394119af66451ae790d50e0d subpackages: @@ -199,8 +197,7 @@ imports: - name: gopkg.in/throttled/throttled.v2 version: b5675e93f9d999b22f92d859a5bf2138d3641af4 subpackages: - - store - store/memstore - name: gopkg.in/yaml.v2 - version: a3f3340b5840cee44f372bddb5880fcbc419b46a + version: cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b testImports: [] diff --git a/glide.yaml b/glide.yaml index edf6c51767..f2337dc6b6 100644 --- a/glide.yaml +++ b/glide.yaml @@ -5,7 +5,12 @@ import: repo: https://github.com/mattermost/log4go.git - package: github.com/dgryski/dgoogauth - package: github.com/disintegration/imaging - version: v1.0.0 + version: v1.1.0 +- package: github.com/dyatlov/go-opengraph + subpackages: + - opengraph +- package: github.com/fsnotify/fsnotify + version: v1.4.2 - package: github.com/go-gorp/gorp version: 0c9bc0918534d133cedb439a24adc7cbe66e4a9d - package: github.com/go-ldap/ldap @@ -23,17 +28,27 @@ import: - package: github.com/mattermost/rsc subpackages: - qr +- package: github.com/minio/minio-go + version: v2.0.4 - package: github.com/mssola/user_agent version: v0.4.1 - package: github.com/nicksnyder/go-i18n - version: v1.7.0 + version: v1.8.0 subpackages: - i18n - package: github.com/pborman/uuid version: v1.0 +- package: github.com/rsc/letsencrypt - package: github.com/rwcarlsen/goexif subpackages: - exif +- package: github.com/segmentio/analytics-go + version: 2.1.1 +- package: github.com/spf13/cobra +- package: github.com/spf13/pflag +- package: github.com/spf13/viper +- package: github.com/tylerb/graceful + version: v1.2.15 - package: golang.org/x/crypto subpackages: - bcrypt @@ -43,12 +58,10 @@ import: - package: gopkg.in/throttled/throttled.v2 version: v2.0.3 subpackages: - - store + - store/memstore - package: github.com/segmentio/analytics-go version: 2.1.1 - package: github.com/rsc/letsencrypt -- package: github.com/minio/minio-go - version: v2.0.3 - package: github.com/prometheus/client_golang version: v0.8.0 subpackages: @@ -75,9 +88,5 @@ import: - package: github.com/dyatlov/go-opengraph subpackages: - opengraph -- package: github.com/jaytaylor/html2text -- package: gopkg.in/gomail.v2 - version: 2.0.0 -- package: github.com/spf13/viper -- package: github.com/fsnotify/fsnotify - version: v1.4.2 +- package: github.com/cpanato/html2text + diff --git a/vendor/github.com/NYTimes/gziphandler/.travis.yml b/vendor/github.com/NYTimes/gziphandler/.travis.yml index f918f8d761..d2b67f69c1 100644 --- a/vendor/github.com/NYTimes/gziphandler/.travis.yml +++ b/vendor/github.com/NYTimes/gziphandler/.travis.yml @@ -2,4 +2,5 @@ language: go go: - 1.7 + - 1.8 - tip diff --git a/vendor/github.com/NYTimes/gziphandler/README.md b/vendor/github.com/NYTimes/gziphandler/README.md index b1d55e26ec..6d72460707 100644 --- a/vendor/github.com/NYTimes/gziphandler/README.md +++ b/vendor/github.com/NYTimes/gziphandler/README.md @@ -38,12 +38,12 @@ func main() { ## Documentation -The docs can be found at [godoc.org] [docs], as usual. +The docs can be found at [godoc.org][docs], as usual. ## License -[Apache 2.0] [license]. +[Apache 2.0][license]. diff --git a/vendor/github.com/NYTimes/gziphandler/gzip.go b/vendor/github.com/NYTimes/gziphandler/gzip.go index 23efacc45a..cccf79de7e 100644 --- a/vendor/github.com/NYTimes/gziphandler/gzip.go +++ b/vendor/github.com/NYTimes/gziphandler/gzip.go @@ -4,6 +4,7 @@ import ( "bufio" "compress/gzip" "fmt" + "io" "net" "net/http" "strconv" @@ -21,10 +22,16 @@ const ( type codings map[string]float64 -// The default qvalue to assign to an encoding if no explicit qvalue is set. -// This is actually kind of ambiguous in RFC 2616, so hopefully it's correct. -// The examples seem to indicate that it is. -const DEFAULT_QVALUE = 1.0 +const ( + // DefaultQValue is the default qvalue to assign to an encoding if no explicit qvalue is set. + // This is actually kind of ambiguous in RFC 2616, so hopefully it's correct. + // 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 +) // gzipWriterPools stores a sync.Pool for each compression level for reuse of // gzip.Writers. Use poolIndex to covert a compression level to an index into @@ -63,35 +70,88 @@ func addLevelPool(level int) { // GzipResponseWriter provides an http.ResponseWriter interface, which gzips // bytes before writing them to the underlying response. This doesn't close the // writers, so don't forget to do that. +// It can be configured to skip response smaller than minSize. type GzipResponseWriter struct { http.ResponseWriter index int // Index for gzipWriterPools. gw *gzip.Writer + + code int // Saves the WriteHeader value. + + minSize int // Specifed the minimum response size to gzip. If the response length is bigger than this value, it is compressed. + buf []byte // Holds the first part of the write before reaching the minSize or the end of the write. } // Write appends data to the gzip writer. func (w *GzipResponseWriter) Write(b []byte) (int, error) { - // Lazily create the gzip.Writer, this allows empty bodies to be actually - // empty, for example in the case of status code 204 (no content). - if w.gw == nil { - w.init() - } - + // If content type is not set. if _, ok := w.Header()[contentType]; !ok { - // If content type is not set, infer it from the uncompressed body. + // It infer it from the uncompressed body. w.Header().Set(contentType, http.DetectContentType(b)) } - return w.gw.Write(b) + + // GZIP responseWriter is initialized. Use the GZIP responseWriter. + if w.gw != nil { + n, err := w.gw.Write(b) + return n, err + } + + // Save the write into a buffer for later use in GZIP responseWriter (if content is long enough) or at close with regular responseWriter. + w.buf = append(w.buf, b...) + + // If the global writes are bigger than the minSize, compression is enable. + if len(w.buf) >= w.minSize { + err := w.startGzip() + if err != nil { + return 0, err + } + } + + return len(b), nil } -// WriteHeader will check if the gzip writer needs to be lazily initiated and -// then pass the code along to the underlying ResponseWriter. -func (w *GzipResponseWriter) WriteHeader(code int) { - if w.gw == nil && - code != http.StatusNotModified && code != http.StatusNoContent { - w.init() +// startGzip initialize any GZIP specific informations. +func (w *GzipResponseWriter) startGzip() error { + + // Set the GZIP header. + w.Header().Set(contentEncoding, "gzip") + + // if the Content-Length is already set, then calls to Write on gzip + // will fail to set the Content-Length header since its already set + // See: https://github.com/golang/go/issues/14975. + w.Header().Del(contentLength) + + // Write the header to gzip response. + w.writeHeader() + + // Initialize the GZIP response. + w.init() + + // Flush the buffer into the gzip reponse. + n, err := w.gw.Write(w.buf) + + // This should never happen (per io.Writer docs), but if the write didn't + // accept the entire buffer but returned no specific error, we have no clue + // what's going on, so abort just to be safe. + if err == nil && n < len(w.buf) { + return io.ErrShortWrite } - w.ResponseWriter.WriteHeader(code) + + w.buf = nil + return err +} + +// WriteHeader just saves the response code until close or GZIP effective writes. +func (w *GzipResponseWriter) WriteHeader(code int) { + w.code = code +} + +// writeHeader uses the saved code to send it to the ResponseWriter. +func (w *GzipResponseWriter) writeHeader() { + if w.code == 0 { + w.code = http.StatusOK + } + w.ResponseWriter.WriteHeader(w.code) } // init graps a new gzip writer from the gzipWriterPool and writes the correct @@ -102,15 +162,22 @@ func (w *GzipResponseWriter) init() { gzw := gzipWriterPools[w.index].Get().(*gzip.Writer) gzw.Reset(w.ResponseWriter) w.gw = gzw - w.ResponseWriter.Header().Set(contentEncoding, "gzip") - // if the Content-Length is already set, then calls to Write on gzip - // will fail to set the Content-Length header since its already set - // See: https://github.com/golang/go/issues/14975 - w.ResponseWriter.Header().Del(contentLength) } // Close will close the gzip.Writer and will put it back in the gzipWriterPool. func (w *GzipResponseWriter) Close() error { + // Buffer not nil means the regular response must be returned. + if w.buf != nil { + w.writeHeader() + // Make the write into the regular response. + _, writeErr := w.ResponseWriter.Write(w.buf) + // Returns the error if any at write. + if writeErr != nil { + return fmt.Errorf("gziphandler: write to regular responseWriter at close gets error: %q", writeErr.Error()) + } + } + + // If the GZIP responseWriter is not set no needs to close it. if w.gw == nil { return nil } @@ -163,9 +230,18 @@ func MustNewGzipLevelHandler(level int) func(http.Handler) http.Handler { // if an invalid gzip compression level is given, so if one can ensure the level // is valid, the returned error can be safely ignored. func NewGzipLevelHandler(level int) (func(http.Handler) http.Handler, error) { + return NewGzipLevelAndMinSize(level, DefaultMinSize) +} + +// NewGzipLevelAndMinSize behave as NewGzipLevelHandler except it let the caller +// specify the minimum size before compression. +func NewGzipLevelAndMinSize(level, minSize int) (func(http.Handler) http.Handler, error) { if level != gzip.DefaultCompression && (level < gzip.BestSpeed || level > gzip.BestCompression) { return nil, fmt.Errorf("invalid compression level requested: %d", level) } + if minSize < 0 { + return nil, fmt.Errorf("minimum size must be more than zero") + } return func(h http.Handler) http.Handler { index := poolIndex(level) @@ -176,6 +252,9 @@ func NewGzipLevelHandler(level int) (func(http.Handler) http.Handler, error) { gw := &GzipResponseWriter{ ResponseWriter: w, index: index, + minSize: minSize, + + buf: []byte{}, } defer gw.Close() @@ -238,7 +317,7 @@ func parseEncodings(s string) (codings, error) { func parseCoding(s string) (coding string, qvalue float64, err error) { for n, part := range strings.Split(s, ";") { part = strings.TrimSpace(part) - qvalue = DEFAULT_QVALUE + qvalue = DefaultQValue if n == 0 { coding = strings.ToLower(part) diff --git a/vendor/github.com/NYTimes/gziphandler/gzip_go18.go b/vendor/github.com/NYTimes/gziphandler/gzip_go18.go new file mode 100644 index 0000000000..fa9665b7e8 --- /dev/null +++ b/vendor/github.com/NYTimes/gziphandler/gzip_go18.go @@ -0,0 +1,43 @@ +// +build go1.8 + +package gziphandler + +import "net/http" + +// Push initiates an HTTP/2 server push. +// Push returns ErrNotSupported if the client has disabled push or if push +// is not supported on the underlying connection. +func (w *GzipResponseWriter) Push(target string, opts *http.PushOptions) error { + pusher, ok := w.ResponseWriter.(http.Pusher) + if ok && pusher != nil { + return pusher.Push(target, setAcceptEncodingForPushOptions(opts)) + } + return http.ErrNotSupported +} + +// setAcceptEncodingForPushOptions sets "Accept-Encoding" : "gzip" for PushOptions without overriding existing headers. +func setAcceptEncodingForPushOptions(opts *http.PushOptions) *http.PushOptions { + + if opts == nil { + opts = &http.PushOptions{ + Header: http.Header{ + acceptEncoding: []string{"gzip"}, + }, + } + return opts + } + + if opts.Header == nil { + opts.Header = http.Header{ + acceptEncoding: []string{"gzip"}, + } + return opts + } + + if encoding := opts.Header.Get(acceptEncoding); encoding == "" { + opts.Header.Add(acceptEncoding, "gzip") + return opts + } + + return opts +} diff --git a/vendor/github.com/NYTimes/gziphandler/gzip_go18_test.go b/vendor/github.com/NYTimes/gziphandler/gzip_go18_test.go new file mode 100644 index 0000000000..412b2918e2 --- /dev/null +++ b/vendor/github.com/NYTimes/gziphandler/gzip_go18_test.go @@ -0,0 +1,70 @@ +// +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 index 80f54c77d4..b9e687c8e7 100644 --- a/vendor/github.com/NYTimes/gziphandler/gzip_test.go +++ b/vendor/github.com/NYTimes/gziphandler/gzip_test.go @@ -16,8 +16,12 @@ import ( "github.com/stretchr/testify/assert" ) -func TestParseEncodings(t *testing.T) { +const ( + smallTestBody = "aaabbcaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbccc" + testBody = "aaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbcccaaabbbccc" +) +func TestParseEncodings(t *testing.T) { examples := map[string]codings{ // Examples from RFC 2616 @@ -39,8 +43,6 @@ func TestParseEncodings(t *testing.T) { } func TestGzipHandler(t *testing.T) { - testBody := "aaabbbccc" - // This just exists to provide something for GzipHandler to wrap. handler := newTestHandler(testBody) @@ -80,7 +82,6 @@ func TestGzipHandler(t *testing.T) { } func TestNewGzipLevelHandler(t *testing.T) { - testBody := "aaabbbccc" handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) io.WriteString(w, testBody) @@ -102,7 +103,6 @@ func TestNewGzipLevelHandler(t *testing.T) { 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()) - } } @@ -135,7 +135,7 @@ func TestGzipHandlerNoBody(t *testing.T) { {http.StatusNoContent, "", 0}, {http.StatusNotModified, "", 0}, // Body is going to get gzip'd no matter what. - {http.StatusOK, "gzip", 23}, + {http.StatusOK, "", 0}, } for num, test := range tests { @@ -170,7 +170,7 @@ func TestGzipHandlerNoBody(t *testing.T) { } func TestGzipHandlerContentLength(t *testing.T) { - b := []byte("testtesttesttesttesttesttesttesttesttesttesttesttest") + 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) @@ -215,6 +215,48 @@ func TestGzipHandlerContentLength(t *testing.T) { 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 @@ -240,6 +282,19 @@ func TestGzipDoubleClose(t *testing.T) { 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 BenchmarkGzipHandler_S2k(b *testing.B) { benchmark(b, false, 2048) } diff --git a/vendor/github.com/jaytaylor/html2text/.gitignore b/vendor/github.com/cpanato/html2text/.gitignore similarity index 100% rename from vendor/github.com/jaytaylor/html2text/.gitignore rename to vendor/github.com/cpanato/html2text/.gitignore diff --git a/vendor/github.com/jaytaylor/html2text/.travis.yml b/vendor/github.com/cpanato/html2text/.travis.yml similarity index 100% rename from vendor/github.com/jaytaylor/html2text/.travis.yml rename to vendor/github.com/cpanato/html2text/.travis.yml diff --git a/vendor/github.com/jaytaylor/html2text/LICENSE b/vendor/github.com/cpanato/html2text/LICENSE similarity index 100% rename from vendor/github.com/jaytaylor/html2text/LICENSE rename to vendor/github.com/cpanato/html2text/LICENSE diff --git a/vendor/github.com/jaytaylor/html2text/README.md b/vendor/github.com/cpanato/html2text/README.md similarity index 73% rename from vendor/github.com/jaytaylor/html2text/README.md rename to vendor/github.com/cpanato/html2text/README.md index ac11247393..57abf3ff3a 100644 --- a/vendor/github.com/jaytaylor/html2text/README.md +++ b/vendor/github.com/cpanato/html2text/README.md @@ -1,8 +1,12 @@ # html2text -[![Documentation](https://godoc.org/github.com/jaytaylor/html2text?status.svg)](https://godoc.org/github.com/jaytaylor/html2text) -[![Build Status](https://travis-ci.org/jaytaylor/html2text.svg?branch=master)](https://travis-ci.org/jaytaylor/html2text) -[![Report Card](https://goreportcard.com/badge/github.com/jaytaylor/html2text)](https://goreportcard.com/report/github.com/jaytaylor/html2text) +[![Documentation](https://godoc.org/github.com/cpanato/html2text?status.svg)](https://godoc.org/github.com/cpanato/html2text) +[![Build Status](https://travis-ci.org/cpanato/html2text.svg?branch=master)](https://travis-ci.org/cpanato/html2text) +[![Report Card](https://goreportcard.com/badge/github.com/jaytaylor/html2text)](https://goreportcard.com/report/github.com/cpanato/html2text) + +### Initial information + This project was forked from [github.com/jaytaylor/html2text](https://github.com/jaytaylor/html2text) in order to use another clean bom library due the original one has no license. + ### Converts HTML into text @@ -23,7 +27,7 @@ It requires go 1.x or newer ;) ## Download the package ```bash -go get github.com/jaytaylor/html2text +go get github.com/cpanato/html2text ``` ## Example usage @@ -34,7 +38,7 @@ package main import ( "fmt" - "github.com/jaytaylor/html2text" + "github.com/cpanato/html2text" ) func main() { @@ -45,17 +49,17 @@ func main() { - + - +

Welcome to your new account on my service!

- +

Here is some more information: - +