diff options
author | 6543 <6543@obermui.de> | 2021-07-04 04:06:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-04 04:06:10 +0200 |
commit | fae07cbc8fece383c88ed7b13474a94133c4accf (patch) | |
tree | 65e3279dc5655d22302c9b79c48ecd3d1a06ffcd | |
parent | [skip ci] Updated licenses and gitignores (diff) | |
download | forgejo-fae07cbc8fece383c88ed7b13474a94133c4accf.tar.xz forgejo-fae07cbc8fece383c88ed7b13474a94133c4accf.zip |
Update Vendor (#16325)
* Add Dependencie Update Script
* update gitea.com/lunny/levelqueue
* update github.com/PuerkitoBio/goquery
* update github.com/alecthomas/chroma
* update github.com/blevesearch/bleve/v2
* update github.com/caddyserver/certmagic
* update github.com/go-enry/go-enry/v2
* update github.com/go-redis/redis/v8
* update github.com/hashicorp/golang-lru
* update github.com/klauspost/compress
* update github.com/markbates/goth
* update github.com/mholt/archiver/v3
* update github.com/microcosm-cc/bluemonday
* update github.com/minio/minio-go/v7
* update github.com/olivere/elastic/v7
* update github.com/xanzy/go-gitlab
* update github.com/yuin/goldmark
319 files changed, 33574 insertions, 21056 deletions
diff --git a/contrib/update_dependencies.sh b/contrib/update_dependencies.sh new file mode 100644 index 0000000000..f6f26c66cb --- /dev/null +++ b/contrib/update_dependencies.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +grep 'git' go.mod | grep '\.com' | grep -v indirect | grep -v replace | cut -f 2 | cut -d ' ' -f 1 | while read line; do + go get -u "$line" + make vendor + git add . + git commit -S -m "update $line" +done @@ -14,15 +14,15 @@ require ( github.com/Microsoft/go-winio v0.5.0 // indirect github.com/NYTimes/gziphandler v1.1.1 github.com/ProtonMail/go-crypto v0.0.0-20210512092938-c05353c2d58c // indirect - github.com/PuerkitoBio/goquery v1.6.1 - github.com/RoaringBitmap/roaring v0.7.3 // indirect - github.com/alecthomas/chroma v0.9.1 + github.com/PuerkitoBio/goquery v1.7.0 + github.com/RoaringBitmap/roaring v0.8.0 // indirect + github.com/alecthomas/chroma v0.9.2 github.com/andybalholm/brotli v1.0.3 // indirect github.com/andybalholm/cascadia v1.2.0 // indirect - github.com/blevesearch/bleve/v2 v2.0.5 + github.com/blevesearch/bleve/v2 v2.0.6 github.com/boombuler/barcode v1.0.1 // indirect github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b // indirect - github.com/caddyserver/certmagic v0.13.1 + github.com/caddyserver/certmagic v0.14.0 github.com/chi-middleware/proxy v1.1.1 github.com/couchbase/go-couchbase v0.0.0-20210224140812-5740cd35f448 // indirect github.com/couchbase/gomemcached v0.1.2 // indirect @@ -39,11 +39,11 @@ require ( github.com/go-asn1-ber/asn1-ber v1.5.3 // indirect github.com/go-chi/chi v1.5.4 github.com/go-chi/cors v1.2.0 - github.com/go-enry/go-enry/v2 v2.7.0 + github.com/go-enry/go-enry/v2 v2.7.1 github.com/go-git/go-billy/v5 v5.3.1 github.com/go-git/go-git/v5 v5.4.3-0.20210630082519-b4368b2a2ca4 github.com/go-ldap/ldap/v3 v3.3.0 - github.com/go-redis/redis/v8 v8.10.0 + github.com/go-redis/redis/v8 v8.11.0 github.com/go-sql-driver/mysql v1.6.0 github.com/go-swagger/go-swagger v0.27.0 github.com/go-testfixtures/testfixtures/v3 v3.6.1 @@ -51,6 +51,7 @@ require ( github.com/gogs/chardet v0.0.0-20191104214054-4b6791f73a28 github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14 github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 + github.com/golang/snappy v0.0.4 // indirect github.com/google/go-github/v32 v32.1.0 github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.2.0 @@ -60,7 +61,7 @@ require ( github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-retryablehttp v0.7.0 // indirect github.com/hashicorp/go-version v1.3.1 - github.com/hashicorp/golang-lru v0.5.1 + github.com/hashicorp/golang-lru v0.5.4 github.com/huandu/xstrings v1.3.2 github.com/issue9/identicon v1.2.0 github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7 @@ -68,21 +69,21 @@ require ( github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/kevinburke/ssh_config v1.1.0 // indirect github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4 - github.com/klauspost/compress v1.13.0 + github.com/klauspost/compress v1.13.1 + github.com/klauspost/cpuid/v2 v2.0.7 // indirect github.com/klauspost/pgzip v1.2.5 // indirect github.com/lafriks/xormstore v1.4.0 github.com/lib/pq v1.10.2 - github.com/libdns/libdns v0.2.1 // indirect github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96 github.com/markbates/goth v1.67.1 github.com/mattn/go-isatty v0.0.13 github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mattn/go-sqlite3 v1.14.7 github.com/mholt/archiver/v3 v3.5.0 - github.com/microcosm-cc/bluemonday v1.0.9 - github.com/miekg/dns v1.1.42 // indirect + github.com/microcosm-cc/bluemonday v1.0.14 + github.com/miekg/dns v1.1.43 // indirect github.com/minio/md5-simd v1.1.2 // indirect - github.com/minio/minio-go/v7 v7.0.10 + github.com/minio/minio-go/v7 v7.0.12 github.com/minio/sha256-simd v1.0.0 // indirect github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect github.com/msteinert/pam v0.0.0-20201130170657-e61372126161 @@ -90,9 +91,9 @@ require ( github.com/niklasfasching/go-org v1.5.0 github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/oliamb/cutter v0.2.2 - github.com/olivere/elastic/v7 v7.0.24 + github.com/olivere/elastic/v7 v7.0.25 github.com/pelletier/go-toml v1.9.0 // indirect - github.com/pierrec/lz4/v4 v4.1.7 // indirect + github.com/pierrec/lz4/v4 v4.1.8 // indirect github.com/pkg/errors v0.9.1 github.com/pquerna/otp v1.3.0 github.com/prometheus/client_golang v1.11.0 @@ -112,23 +113,25 @@ require ( github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae github.com/unrolled/render v1.4.0 github.com/urfave/cli v1.22.5 - github.com/xanzy/go-gitlab v0.50.0 + github.com/xanzy/go-gitlab v0.50.1 github.com/yohcop/openid-go v1.0.0 - github.com/yuin/goldmark v1.3.7 + github.com/yuin/goldmark v1.3.9 github.com/yuin/goldmark-highlighting v0.0.0-20210516132338-9216f9c5aa01 github.com/yuin/goldmark-meta v1.0.0 go.etcd.io/bbolt v1.3.6 // indirect go.jolheiser.com/hcaptcha v0.0.4 go.jolheiser.com/pwn v0.0.3 + go.uber.org/atomic v1.8.0 // indirect go.uber.org/multierr v1.7.0 // indirect - go.uber.org/zap v1.17.0 // indirect + go.uber.org/zap v1.18.1 // indirect golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e golang.org/x/net v0.0.0-20210614182718-04defd469f4e - golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c + golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c golang.org/x/text v0.3.6 - golang.org/x/time v0.0.0-20210608053304-ed9ce3a009e4 // indirect + golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 // indirect golang.org/x/tools v0.1.0 + google.golang.org/protobuf v1.27.1 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df gopkg.in/ini.v1 v1.62.0 @@ -71,17 +71,17 @@ github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/ github.com/ProtonMail/go-crypto v0.0.0-20210512092938-c05353c2d58c h1:bNpaLLv2Y4kslsdkdCwAYu8Bak1aGVtxwi8Z/wy4Yuo= github.com/ProtonMail/go-crypto v0.0.0-20210512092938-c05353c2d58c/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= -github.com/PuerkitoBio/goquery v1.6.1 h1:FgjbQZKl5HTmcn4sKBgvx8vv63nhyhIpv7lJpFGCWpk= -github.com/PuerkitoBio/goquery v1.6.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= +github.com/PuerkitoBio/goquery v1.7.0 h1:O5SP3b9JWqMSVMG69zMfj577zwkSNpxrFf7ybS74eiw= +github.com/PuerkitoBio/goquery v1.7.0/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= -github.com/RoaringBitmap/roaring v0.7.1/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= -github.com/RoaringBitmap/roaring v0.7.3 h1:RwirWpvFONt2EwHHEHhER7S4BHZkyj3qL5LXLlnQPZ4= github.com/RoaringBitmap/roaring v0.7.3/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= +github.com/RoaringBitmap/roaring v0.8.0 h1:3naGkGvYAANr3ntyV+OpyhH+/rDaE2om9coNpIIdWAA= +github.com/RoaringBitmap/roaring v0.8.0/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= @@ -89,8 +89,8 @@ github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= github.com/alecthomas/chroma v0.7.2-0.20200305040604-4f3623dce67a/go.mod h1:fv5SzZPFJbwp2NXJWpFIX7DZS4HgV1K4ew4Pc2OZD9s= github.com/alecthomas/chroma v0.8.2/go.mod h1:sko8vR34/90zvl5QdcUdvzL3J8NKjAUx9va9jPuFNoM= -github.com/alecthomas/chroma v0.9.1 h1:cBmvQqRImzR5aWqdMxYZByND4S7BCS/g0svZb28h0Dc= -github.com/alecthomas/chroma v0.9.1/go.mod h1:eMuEnpA18XbG/WhOWtCzJHS7WqEtDAI+HxdwoW0nVSk= +github.com/alecthomas/chroma v0.9.2 h1:yU1sE2+TZbLIQPMk30SolL2Hn53SR/Pv750f7qZ/XMs= +github.com/alecthomas/chroma v0.9.2/go.mod h1:eMuEnpA18XbG/WhOWtCzJHS7WqEtDAI+HxdwoW0nVSk= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= @@ -126,22 +126,23 @@ github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:W github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= -github.com/aws/aws-sdk-go v1.38.3/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.38.17/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bits-and-blooms/bitset v1.1.10/go.mod h1:w0XsmFg8qg6cmpTtJ0z3pKgjTDBMMnI/+I2syrE6XBE= github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blevesearch/bleve/v2 v2.0.1/go.mod h1:OBP2Pktqik8vEiUlGhuWjYx7KiO4zD542+DHqICwM5w= -github.com/blevesearch/bleve/v2 v2.0.5 h1:184yM7uei4Cmw2SdKSdMWYg46OFRKsr+s8hBYc2FbuU= -github.com/blevesearch/bleve/v2 v2.0.5/go.mod h1:ZjWibgnbRX33c+vBRgla9QhPb4QOjD6fdVJ+R1Bk8LM= +github.com/blevesearch/bleve/v2 v2.0.6 h1:2dV2S4pyUqQHftUFzM0htUCWC8MeRg2qsmgIvjnKlgU= +github.com/blevesearch/bleve/v2 v2.0.6/go.mod h1:UhqLjgDhN4mji6F1dL3fPghcqaBV6r6bXwKCdaBa3Is= github.com/blevesearch/bleve_index_api v1.0.0 h1:Ds3XeuTxjXCkG6pgIwWDRyooJKNIuOKemnN0N0IkhTU= github.com/blevesearch/bleve_index_api v1.0.0/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4= github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo= @@ -158,32 +159,31 @@ github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs= github.com/blevesearch/upsidedown_store_api v1.0.1 h1:1SYRwyoFLwG3sj0ed89RLtM15amfX2pXlYbFOnF8zNU= github.com/blevesearch/upsidedown_store_api v1.0.1/go.mod h1:MQDVGpHZrpe3Uy26zJBf/a8h0FZY6xJbthIMm8myH2Q= -github.com/blevesearch/vellum v1.0.3/go.mod h1:2u5ax02KeDuNWu4/C+hVQMD6uLN4txH1JbtpaDNLJRo= -github.com/blevesearch/vellum v1.0.4 h1:o6t7NxTnThp1es52uQvOJJx+9yK/nKXlWC5xl4LCz1U= -github.com/blevesearch/vellum v1.0.4/go.mod h1:cMhywHI0de50f7Nj42YgvyD6bFJ2WkNRvNBlNMrEVgY= +github.com/blevesearch/vellum v1.0.5 h1:L5dJ7hKauRVbuH7I8uqLeSK92CPPY6FfrbAmLhAug8A= +github.com/blevesearch/vellum v1.0.5/go.mod h1:atE0EH3fvk43zzS7t1YNdNC7DbmcC3uz+eMD5xZ2OyQ= github.com/blevesearch/zapx/v11 v11.1.10/go.mod h1:DTjbcBqrr/Uo82UBilDC8lEew42gN/OcIyiTNFtSijc= -github.com/blevesearch/zapx/v11 v11.2.0 h1:GBkCJYsyj3eIU4+aiLPxoMz1PYvDbQZl/oXHIBZIP60= -github.com/blevesearch/zapx/v11 v11.2.0/go.mod h1:gN/a0alGw1FZt/YGTo1G6Z6XpDkeOfujX5exY9sCQQM= +github.com/blevesearch/zapx/v11 v11.2.1 h1:udluDHdr99gGSeL3vZLtJbML0OJ98mK1Peivtm5OYho= +github.com/blevesearch/zapx/v11 v11.2.1/go.mod h1:TBkJF5Qq0EwZbbBQmkW6/AQVSYwXXpp0xwtQ5wXHVMI= github.com/blevesearch/zapx/v12 v12.1.10/go.mod h1:14NmKnPrnKAIyiEJM566k/Jk+FQpuiflT5d3uaaK3MI= -github.com/blevesearch/zapx/v12 v12.2.0 h1:dyRcSoZVO1jktL4UpGkCEF1AYa3xhKPirh4/N+Va+Ww= -github.com/blevesearch/zapx/v12 v12.2.0/go.mod h1:fdjwvCwWWwJW/EYTYGtAp3gBA0geCYGLcVTtJEZnY6A= +github.com/blevesearch/zapx/v12 v12.2.1 h1:nbeecR8M3dEcIIYfKDaSRpJ9E205E7BvjhVwf/l5ajI= +github.com/blevesearch/zapx/v12 v12.2.1/go.mod h1:sSXvgEs7MKqqDIRSpyFd6ZJUEVlhxuDB0d8/WT2WlgA= github.com/blevesearch/zapx/v13 v13.1.10/go.mod h1:YsVY6YGpTEAlJOMjdL7EsdBLvjWd8kPa2gwJDNpqLJo= -github.com/blevesearch/zapx/v13 v13.2.0 h1:mUqbaqQABp8nBE4t4q2qMyHCCq4sykoV8r7aJk4ih3s= -github.com/blevesearch/zapx/v13 v13.2.0/go.mod h1:o5rAy/lRS5JpAbITdrOHBS/TugWYbkcYZTz6VfEinAQ= +github.com/blevesearch/zapx/v13 v13.2.1 h1:6K797fvkurY6heEMPhyUlq3VULIpkD1sbBqqQUMFf4g= +github.com/blevesearch/zapx/v13 v13.2.1/go.mod h1:Fblcy4ykPy7XiaZ2svvpQaYgEqI+8vkdvMVx5zcawF4= github.com/blevesearch/zapx/v14 v14.1.10/go.mod h1:hsULl5eJSxs5NEfBsmeT9qrqdCP+/ecpVZKt60M4V64= -github.com/blevesearch/zapx/v14 v14.2.0 h1:UsfRqvM9RJxKNKrkR1U7aYc1cv9MWx719fsAjbF6joI= -github.com/blevesearch/zapx/v14 v14.2.0/go.mod h1:GNgZusc1p4ot040cBQMRGEZobvwjCquiEKYh1xLFK9g= +github.com/blevesearch/zapx/v14 v14.2.1 h1:V3RzDc7XZ51Kv9ZhhzMlHCSoY4+jxqy9VBqHxTqW4pg= +github.com/blevesearch/zapx/v14 v14.2.1/go.mod h1:veKtVCDzl4vvYeT5zULXEXqPR948uilzixzmmdtpCkU= github.com/blevesearch/zapx/v15 v15.1.10/go.mod h1:4ypq25bwtSQKzwEF1UERyIhmGTbMT3brY/n4NC5gRnM= -github.com/blevesearch/zapx/v15 v15.2.0 h1:ZpibwcrrOaeslkOw3sJ7npP7KDgRHI/DkACjKTqFwyM= -github.com/blevesearch/zapx/v15 v15.2.0/go.mod h1:MmQceLpWfME4n1WrBFIwplhWmaQbQqLQARpaKUEOs/A= +github.com/blevesearch/zapx/v15 v15.2.1 h1:ZaqQiWLo0srtPvy3ozgpR9+Oabs3HQrF4uJM0HiKVBY= +github.com/blevesearch/zapx/v15 v15.2.1/go.mod h1:pUCN72ZJkVd7dU9lA4Fd8E3+fl5wv3JPpThk4FQ5bpA= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs= github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b h1:L/QXpzIa3pOvUGt1D1lA5KjYhPBAN/3iWdP7xeFS9F0= github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= -github.com/caddyserver/certmagic v0.13.1 h1:A5qLxh9J6/CYWEOHaj135IWAjCY0193ONxEy8jbOlPw= -github.com/caddyserver/certmagic v0.13.1/go.mod h1:+zhQtEgLOyXRA/KRduHXNhGGdTeqRM4ePj8eBGD/2CQ= +github.com/caddyserver/certmagic v0.14.0 h1:XW1o32s7smIYEJSc6g+N8YXljpjRo5ZE2zi3CIYTs74= +github.com/caddyserver/certmagic v0.14.0/go.mod h1:oRQOZmUVKwlpgNidslysHt05osM9uMrJ4YMk+Ot4P4Q= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -302,8 +302,8 @@ github.com/go-chi/chi/v5 v5.0.1 h1:ALxjCrTf1aflOlkhMnCUP86MubbWFrzB3gkRPReLpTo= github.com/go-chi/chi/v5 v5.0.1/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/go-chi/cors v1.2.0 h1:tV1g1XENQ8ku4Bq3K9ub2AtgG+p16SmzeMSGTwrOKdE= github.com/go-chi/cors v1.2.0/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58= -github.com/go-enry/go-enry/v2 v2.7.0 h1:bcAZfvX0LmAEMl8OEd8MPsfJCN2Io4mNU1an1Hh48VA= -github.com/go-enry/go-enry/v2 v2.7.0/go.mod h1:GVzIiAytiS5uT/QiuakK7TF1u4xDab87Y8V5EJRpsIQ= +github.com/go-enry/go-enry/v2 v2.7.1 h1:WCqtfyteIz61GYk9lRVy8HblvIv4cP9GIiwm/6txCbU= +github.com/go-enry/go-enry/v2 v2.7.1/go.mod h1:GVzIiAytiS5uT/QiuakK7TF1u4xDab87Y8V5EJRpsIQ= github.com/go-enry/go-oniguruma v1.2.1 h1:k8aAMuJfMrqm/56SG2lV9Cfti6tC4x8673aHCcBk+eo= github.com/go-enry/go-oniguruma v1.2.1/go.mod h1:bWDhYP+S6xZQgiRL7wlTScFYBe023B6ilRZbCAD5Hf4= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= @@ -424,8 +424,8 @@ github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZ github.com/go-redis/redis v6.15.2+incompatible h1:9SpNVG76gr6InJGxoZ6IuuxaCOQwDAhzyXg+Bs+0Sb4= github.com/go-redis/redis v6.15.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= github.com/go-redis/redis/v8 v8.4.0/go.mod h1:A1tbYoHSa1fXwN+//ljcCYYJeLmVrwL9hbQN45Jdy0M= -github.com/go-redis/redis/v8 v8.10.0 h1:OZwrQKuZqdJ4QIM8wn8rnuz868Li91xA3J2DEq+TPGA= -github.com/go-redis/redis/v8 v8.10.0/go.mod h1:vXLTvigok0VtUX0znvbcEW1SOt4OA9CU1ZfnOtKOaiM= +github.com/go-redis/redis/v8 v8.11.0 h1:O1Td0mQ8UFChQ3N9zFQqo6kTU2cJ+/it88gDB+zg0wo= +github.com/go-redis/redis/v8 v8.11.0/go.mod h1:DLomh7y2e3ggQXQLd1YgmvIfecPJoFl7WU5SOQ/r06M= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= @@ -508,8 +508,9 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -522,8 +523,9 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-github/v32 v32.1.0 h1:GWkQOdXqviCPx7Q7Fj+KyPoGm4SwHRh8rheoPhd27II= github.com/google/go-github/v32 v32.1.0/go.mod h1:rIEpZD9CTDQwDK9GDrtMTycQNA4JU3qBsCizh3q2WCI= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= @@ -598,8 +600,9 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -700,16 +703,17 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.10/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.13.0 h1:2T7tUoQrQT+fQWdaY5rjWztFGAFwbGD04iPJg90ZiOs= -github.com/klauspost/compress v1.13.0/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.13.1 h1:wXr2uRxZTJXHLly6qhJabee5JqIhTRoLBhDOA74hDEQ= +github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s= github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= -github.com/klauspost/cpuid/v2 v2.0.6 h1:dQ5ueTiftKxp0gyjKSx5+8BtPWkyQbd95m8Gys/RarI= github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.7 h1:U89pAFid7wpIWvTFJnMKgU+Sabb7DLEgHI7Xt8apo3Y= +github.com/klauspost/cpuid/v2 v2.0.7/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/pgzip v1.2.4/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -737,7 +741,6 @@ github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/libdns/libdns v0.2.0/go.mod h1:yQCXzk1lEZmmCPa857bnk4TsOiqYasqpyOEeSObbb40= github.com/libdns/libdns v0.2.1 h1:Wu59T7wSHRgtA0cfxC+n1c/e+O3upJGWytknkmFEDis= github.com/libdns/libdns v0.2.1/go.mod h1:yQCXzk1lEZmmCPa857bnk4TsOiqYasqpyOEeSObbb40= github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96 h1:uNwtsDp7ci48vBTTxDuwcoTXz4lwtDTe7TjCQ0noaWY= @@ -790,17 +793,17 @@ github.com/mholt/acmez v0.1.3 h1:J7MmNIk4Qf9b8mAGqAh4XkNeowv3f1zW816yf4zt7Qk= github.com/mholt/acmez v0.1.3/go.mod h1:8qnn8QA/Ewx8E3ZSsmscqsIjhhpxuy9vqdgbX2ceceM= github.com/mholt/archiver/v3 v3.5.0 h1:nE8gZIrw66cu4osS/U7UW7YDuGMHssxKutU8IfWxwWE= github.com/mholt/archiver/v3 v3.5.0/go.mod h1:qqTTPUK/HZPFgFQ/TJ3BzvTpF/dPtFVJXdQbCmeMxwc= -github.com/microcosm-cc/bluemonday v1.0.9 h1:dpCwruVKoyrULicJwhuY76jB+nIxRVKv/e248Vx/BXg= -github.com/microcosm-cc/bluemonday v1.0.9/go.mod h1:B2riunDr9benLHghZB7hjIgdwSUzzs0pjCxFrWYEZFU= +github.com/microcosm-cc/bluemonday v1.0.14 h1:Djd+GeTanVeA23todvVC0AO5hsI+vAwQMLTy794Zr5I= +github.com/microcosm-cc/bluemonday v1.0.14/go.mod h1:beubO5lmWoy1tU8niaMyXNriNgROO37H3U/tsrcZsy0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.42 h1:gWGe42RGaIqXQZ+r3WUGEKBEtvPHY2SXo4dqixDNxuY= github.com/miekg/dns v1.1.42/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= -github.com/minio/minio-go/v7 v7.0.10 h1:1oUKe4EOPUEhw2qnPQaPsJ0lmVTYLFu03SiItauXs94= -github.com/minio/minio-go/v7 v7.0.10/go.mod h1:td4gW1ldOsj1PbSNS+WYK43j+P1XVhX/8W8awaYlBFo= +github.com/minio/minio-go/v7 v7.0.12 h1:/4pxUdwn9w0QEryNkrrWaodIESPRX+NxpO0Q6hVdaAA= +github.com/minio/minio-go/v7 v7.0.12/go.mod h1:S23iSP5/gbMwtxeY5FM71R+TkAYyzEdoNEDDwpt8yWs= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= @@ -850,8 +853,8 @@ github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/oliamb/cutter v0.2.2 h1:Lfwkya0HHNU1YLnGv2hTkzHfasrSMkgv4Dn+5rmlk3k= github.com/oliamb/cutter v0.2.2/go.mod h1:4BenG2/4GuRBDbVm/OPahDVqbrOemzpPiG5mi1iryBU= -github.com/olivere/elastic/v7 v7.0.24 h1:9ZcCQP3Pvgese7TaypYiVAL49sCEphyIwkVxtRf8jb8= -github.com/olivere/elastic/v7 v7.0.24/go.mod h1:OuWmD2DiuYhddWegBKPWQuelVKBLrW0fa/VUYgxuGTY= +github.com/olivere/elastic/v7 v7.0.25 h1:q3ef8PqC4PyT3b8BAcjDVo48KNzr0HVKosMqMsF+oME= +github.com/olivere/elastic/v7 v7.0.25/go.mod h1:ySKeM+7yrE9HmsUi6+vSp0anvWiDOuPa9kpuknxjKbU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -877,8 +880,8 @@ github.com/pelletier/go-toml v1.9.0 h1:NOd0BRdOKpPf0SxkL3HxSQOG7rNh+4kl6PHcBPFs7 github.com/pelletier/go-toml v1.9.0/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4/v4 v4.0.3/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pierrec/lz4/v4 v4.1.7 h1:UDV9geJWhFIufAliH7HQlz9wP3JA0t748w+RwbWMLow= -github.com/pierrec/lz4/v4 v4.1.7/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.8 h1:ieHkV+i2BRzngO4Wd/3HGowuZStgq6QkPsD1eolNAO4= +github.com/pierrec/lz4/v4 v4.1.8/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -961,6 +964,8 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck= @@ -1037,8 +1042,8 @@ github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU= github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/xanzy/go-gitlab v0.50.0 h1:t7IoYTrnLSbdEZN7d8X/5zcr+ZM4TZQ2mXa8MqWlAZQ= -github.com/xanzy/go-gitlab v0.50.0/go.mod h1:Q+hQhV508bDPoBijv7YjK/Lvlb4PhVhJdKqXVQrUoAE= +github.com/xanzy/go-gitlab v0.50.1 h1:eH1G0/ZV1j81rhGrtbcePjbM5Ern7mPA4Xjt+yE+2PQ= +github.com/xanzy/go-gitlab v0.50.1/go.mod h1:Q+hQhV508bDPoBijv7YjK/Lvlb4PhVhJdKqXVQrUoAE= github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -1058,8 +1063,8 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.6/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.3.7 h1:NSaHgaeJFCtWXCBkBKXw0rhgMuJ0VoE9FB5mWldcrQ4= -github.com/yuin/goldmark v1.3.7/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.3.9 h1:XsVHmzm4P6g84IBbAj+WYMF/IEZ3J9+3I1wlqCNa/SQ= +github.com/yuin/goldmark v1.3.9/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark-highlighting v0.0.0-20210516132338-9216f9c5aa01 h1:0SJnXjE4jDClMW6grE0xpNhwpqbPwkBTn8zpVw5C0SI= github.com/yuin/goldmark-highlighting v0.0.0-20210516132338-9216f9c5aa01/go.mod h1:TwKQPa5XkCCRC2GRZ5wtfNUTQ2+9/i19mGRijFeJ4BE= github.com/yuin/goldmark-meta v1.0.0 h1:ScsatUIT2gFS6azqzLGUjgOnELsBOxMXerM3ogdJhAM= @@ -1091,19 +1096,14 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw= -go.opentelemetry.io/otel v0.20.0 h1:eaP0Fqu7SXHwvjiqDq83zImeehOHX8doTvU9AwXON8g= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/metric v0.20.0 h1:4kzhXFP+btKm4jwxpjIqjs41A7MakRFUS86bqLHTIw8= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiWzF6Vaeaw= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/trace v0.20.0 h1:1DL6EXUdcg95gukhuRRvLDO/4X5THh/5dIV52lqtnbw= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= +go.uber.org/atomic v1.8.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -1113,8 +1113,9 @@ go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9E go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= -go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.18.1 h1:CSUJ2mjFszzEWt4CdKISEuChVIXGBn3lAPwkRGyVrc4= +go.uber.org/zap v1.18.1/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1136,8 +1137,7 @@ golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= @@ -1165,6 +1165,7 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= @@ -1202,7 +1203,6 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1232,7 +1232,8 @@ golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= golang.org/x/net v0.0.0-20210331060903-cb1fcc7394e5/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -1246,8 +1247,8 @@ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c h1:pkQiBZBvdos9qq4wBAHqlzuZHEXo07pqV06ef90u1WI= -golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 h1:3B43BWw0xEBsLZ/NO1VALz6fppU3481pik+2Ksv45z8= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1291,7 +1292,6 @@ golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1333,7 +1333,6 @@ golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1342,6 +1341,7 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1356,8 +1356,8 @@ golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210608053304-ed9ce3a009e4 h1:1asO3s7vR+9MvZSNRwUBBTjecxbGtfvmxjy2VWbFR5g= -golang.org/x/time v0.0.0-20210608053304-ed9ce3a009e4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 h1:Vv0JUPWTyeqUq42B2WJ1FeIDjjvGKoA2Ss+Ts0lAVbs= +golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1387,13 +1387,13 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1526,8 +1526,9 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= diff --git a/vendor/github.com/PuerkitoBio/goquery/.travis.yml b/vendor/github.com/PuerkitoBio/goquery/.travis.yml index 29e9e64ab2..8430c86a2a 100644 --- a/vendor/github.com/PuerkitoBio/goquery/.travis.yml +++ b/vendor/github.com/PuerkitoBio/goquery/.travis.yml @@ -4,11 +4,6 @@ arch: language: go go: - - 1.2.x - - 1.3.x - - 1.4.x - - 1.5.x - - 1.6.x - 1.7.x - 1.8.x - 1.9.x @@ -16,21 +11,13 @@ go: - 1.11.x - 1.12.x - 1.13.x + - 1.14.x + - 1.15.x - tip jobs: exclude: - arch: ppc64le - go: 1.2.x - - arch: ppc64le - go: 1.3.x - - arch: ppc64le - go: 1.4.x - - arch: ppc64le - go: 1.5.x - - arch: ppc64le - go: 1.6.x - - arch: ppc64le go: 1.7.x - arch: ppc64le go: 1.8.x diff --git a/vendor/github.com/PuerkitoBio/goquery/LICENSE b/vendor/github.com/PuerkitoBio/goquery/LICENSE index f743d3728a..25372c2b60 100644 --- a/vendor/github.com/PuerkitoBio/goquery/LICENSE +++ b/vendor/github.com/PuerkitoBio/goquery/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2012-2016, Martin Angers & Contributors +Copyright (c) 2012-2021, Martin Angers & Contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/vendor/github.com/PuerkitoBio/goquery/README.md b/vendor/github.com/PuerkitoBio/goquery/README.md index ac9b2c206c..924cef77cd 100644 --- a/vendor/github.com/PuerkitoBio/goquery/README.md +++ b/vendor/github.com/PuerkitoBio/goquery/README.md @@ -1,5 +1,5 @@ # goquery - a little like that j-thing, only in Go -[![build status](https://secure.travis-ci.org/PuerkitoBio/goquery.svg?branch=master)](http://travis-ci.org/PuerkitoBio/goquery) [![GoDoc](https://godoc.org/github.com/PuerkitoBio/goquery?status.png)](http://godoc.org/github.com/PuerkitoBio/goquery) [![Sourcegraph Badge](https://sourcegraph.com/github.com/PuerkitoBio/goquery/-/badge.svg)](https://sourcegraph.com/github.com/PuerkitoBio/goquery?badge) +[![builds.sr.ht status](https://builds.sr.ht/~mna/goquery/commits/fedora.yml.svg)](https://builds.sr.ht/~mna/goquery/commits/fedora.yml?) [![build status](https://secure.travis-ci.org/PuerkitoBio/goquery.svg?branch=master)](http://travis-ci.org/PuerkitoBio/goquery) [![Go Reference](https://pkg.go.dev/badge/github.com/PuerkitoBio/goquery.svg)](https://pkg.go.dev/github.com/PuerkitoBio/goquery) [![Sourcegraph Badge](https://sourcegraph.com/github.com/PuerkitoBio/goquery/-/badge.svg)](https://sourcegraph.com/github.com/PuerkitoBio/goquery?badge) goquery brings a syntax and a set of features similar to [jQuery][] to the [Go language][go]. It is based on Go's [net/html package][html] and the CSS Selector library [cascadia][]. Since the net/html parser returns nodes, and not a full-featured DOM tree, jQuery's stateful manipulation functions (like height(), css(), detach()) have been left off. @@ -19,7 +19,7 @@ Syntax-wise, it is as close as possible to jQuery, with the same function names ## Installation -Please note that because of the net/html dependency, goquery requires Go1.1+. +Please note that because of the net/html dependency, goquery requires Go1.1+ and is tested on Go1.7+. $ go get github.com/PuerkitoBio/goquery @@ -37,6 +37,7 @@ Please note that because of the net/html dependency, goquery requires Go1.1+. **Note that goquery's API is now stable, and will not break.** +* **2021-06-14 (v1.7.0)** : Add `Single` and `SingleMatcher` functions to optimize first-match selection (thanks [@gdollardollar](https://github.com/gdollardollar)). * **2021-01-11 (v1.6.1)** : Fix panic when calling `{Prepend,Append,Set}Html` on a `Selection` that contains non-Element nodes. * **2020-10-08 (v1.6.0)** : Parse html in context of the container node for all functions that deal with html strings (`AfterHtml`, `AppendHtml`, etc.). Thanks to [@thiemok][thiemok] and [@davidjwilkins][djw] for their work on this. * **2020-02-04 (v1.5.1)** : Update module dependencies. @@ -50,7 +51,7 @@ Please note that because of the net/html dependency, goquery requires Go1.1+. * **2016-08-28 (v1.0.1)** : Optimize performance for large documents. * **2016-07-27 (v1.0.0)** : Tag version 1.0.0. * **2016-06-15** : Invalid selector strings internally compile to a `Matcher` implementation that never matches any node (instead of a panic). So for example, `doc.Find("~")` returns an empty `*Selection` object. -* **2016-02-02** : Add `NodeName` utility function similar to the DOM's `nodeName` property. It returns the tag name of the first element in a selection, and other relevant values of non-element nodes (see godoc for details). Add `OuterHtml` utility function similar to the DOM's `outerHTML` property (named `OuterHtml` in small caps for consistency with the existing `Html` method on the `Selection`). +* **2016-02-02** : Add `NodeName` utility function similar to the DOM's `nodeName` property. It returns the tag name of the first element in a selection, and other relevant values of non-element nodes (see [doc][] for details). Add `OuterHtml` utility function similar to the DOM's `outerHTML` property (named `OuterHtml` in small caps for consistency with the existing `Html` method on the `Selection`). * **2015-04-20** : Add `AttrOr` helper method to return the attribute's value or a default value if absent. Thanks to [piotrkowalczuk][piotr]. * **2015-02-04** : Add more manipulation functions - Prepend* - thanks again to [Andrew Stone][thatguystone]. * **2014-11-28** : Add more manipulation functions - ReplaceWith*, Wrap* and Unwrap - thanks again to [Andrew Stone][thatguystone]. @@ -79,7 +80,7 @@ jQuery often has many variants for the same function (no argument, a selector st Utility functions that are not in jQuery but are useful in Go are implemented as functions (that take a `*Selection` as parameter), to avoid a potential naming clash on the `*Selection`'s methods (reserved for jQuery-equivalent behaviour). -The complete [godoc reference documentation can be found here][doc]. +The complete [package reference documentation can be found here][doc]. Please note that Cascadia's selectors do not necessarily match all supported selectors of jQuery (Sizzle). See the [cascadia project][cascadia] for details. Invalid selector strings compile to a `Matcher` that fails to match any node. Behaviour of the various functions that take a selector string as argument follows from that fact, e.g. (where `~` is an invalid selector string): @@ -123,12 +124,11 @@ func ExampleScrape() { } // Find the review items - doc.Find(".sidebar-reviews article .content-block").Each(func(i int, s *goquery.Selection) { - // For each item found, get the band and title - band := s.Find("a").Text() - title := s.Find("i").Text() - fmt.Printf("Review %d: %s - %s\n", i, band, title) - }) + doc.Find(".left-content article .post-title").Each(func(i int, s *goquery.Selection) { + // For each item found, get the title + title := s.Find("a").Text() + fmt.Printf("Review %d: %s\n", i, title) + }) } func main() { @@ -161,8 +161,9 @@ There are a number of ways you can support the project: * Pull requests: please discuss new code in an issue first, unless the fix is really trivial. - Make sure new code is tested. - Be mindful of existing code - PRs that break existing code have a high probability of being declined, unless it fixes a serious issue. - -If you desperately want to send money my way, I have a BuyMeACoffee.com page: +* Sponsor the developer + - See the Github Sponsor button at the top of the repo on github + - or via BuyMeACoffee.com, below <a href="https://www.buymeacoffee.com/mna" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a> @@ -177,10 +178,10 @@ The [BSD 3-Clause license][bsd], the same as the [Go language][golic]. Cascadia' [bsd]: http://opensource.org/licenses/BSD-3-Clause [golic]: http://golang.org/LICENSE [caslic]: https://github.com/andybalholm/cascadia/blob/master/LICENSE -[doc]: http://godoc.org/github.com/PuerkitoBio/goquery +[doc]: https://pkg.go.dev/github.com/PuerkitoBio/goquery [index]: http://api.jquery.com/index/ [gonet]: https://github.com/golang/net/ -[html]: http://godoc.org/golang.org/x/net/html +[html]: https://pkg.go.dev/golang.org/x/net/html [wiki]: https://github.com/PuerkitoBio/goquery/wiki/Tips-and-tricks [thatguystone]: https://github.com/thatguystone [piotr]: https://github.com/piotrkowalczuk diff --git a/vendor/github.com/PuerkitoBio/goquery/type.go b/vendor/github.com/PuerkitoBio/goquery/type.go index 6ad51dbc53..6646c143b0 100644 --- a/vendor/github.com/PuerkitoBio/goquery/type.go +++ b/vendor/github.com/PuerkitoBio/goquery/type.go @@ -7,7 +7,6 @@ import ( "net/url" "github.com/andybalholm/cascadia" - "golang.org/x/net/html" ) @@ -122,6 +121,45 @@ type Matcher interface { Filter([]*html.Node) []*html.Node } +// Single compiles a selector string to a Matcher that stops after the first +// match is found. +// +// By default, Selection.Find and other functions that accept a selector string +// to select nodes will use all matches corresponding to that selector. By +// using the Matcher returned by Single, at most the first match will be +// selected. +// +// For example, those two statements are semantically equivalent: +// +// sel1 := doc.Find("a").First() +// sel2 := doc.FindMatcher(goquery.Single("a")) +// +// The one using Single is optimized to be potentially much faster on large +// documents. +// +// Only the behaviour of the MatchAll method of the Matcher interface is +// altered compared to standard Matchers. This means that the single-selection +// property of the Matcher only applies for Selection methods where the Matcher +// is used to select nodes, not to filter or check if a node matches the +// Matcher - in those cases, the behaviour of the Matcher is unchanged (e.g. +// FilterMatcher(Single("div")) will still result in a Selection with multiple +// "div"s if there were many "div"s in the Selection to begin with). +func Single(selector string) Matcher { + return singleMatcher{compileMatcher(selector)} +} + +// SingleMatcher returns a Matcher matches the same nodes as m, but that stops +// after the first match is found. +// +// See the documentation of function Single for more details. +func SingleMatcher(m Matcher) Matcher { + if _, ok := m.(singleMatcher); ok { + // m is already a singleMatcher + return m + } + return singleMatcher{m} +} + // compileMatcher compiles the selector string s and returns // the corresponding Matcher. If s is an invalid selector string, // it returns a Matcher that fails all matches. @@ -133,6 +171,30 @@ func compileMatcher(s string) Matcher { return cs } +type singleMatcher struct { + Matcher +} + +func (m singleMatcher) MatchAll(n *html.Node) []*html.Node { + // Optimized version - stops finding at the first match (cascadia-compiled + // matchers all use this code path). + if mm, ok := m.Matcher.(interface{ MatchFirst(*html.Node) *html.Node }); ok { + node := mm.MatchFirst(n) + if node == nil { + return nil + } + return []*html.Node{node} + } + + // Fallback version, for e.g. test mocks that don't provide the MatchFirst + // method. + nodes := m.Matcher.MatchAll(n) + if len(nodes) > 0 { + return nodes[:1:1] + } + return nil +} + // invalidMatcher is a Matcher that always fails to match. type invalidMatcher struct{} diff --git a/vendor/github.com/RoaringBitmap/roaring/parallel.go b/vendor/github.com/RoaringBitmap/roaring/parallel.go index 805f146bac..9208e3e380 100644 --- a/vendor/github.com/RoaringBitmap/roaring/parallel.go +++ b/vendor/github.com/RoaringBitmap/roaring/parallel.go @@ -354,7 +354,7 @@ func ParOr(parallelism int, bitmaps ...*Bitmap) *Bitmap { if lKey == MaxUint16 && hKey == 0 { return New() } else if len(bitmaps) == 1 { - return bitmaps[0] + return bitmaps[0].Clone() } keyRange := int(hKey) - int(lKey) + 1 diff --git a/vendor/github.com/alecthomas/chroma/.golangci.yml b/vendor/github.com/alecthomas/chroma/.golangci.yml index 9a735377a2..ba7557339e 100644 --- a/vendor/github.com/alecthomas/chroma/.golangci.yml +++ b/vendor/github.com/alecthomas/chroma/.golangci.yml @@ -25,6 +25,17 @@ linters: - testpackage - godot - nestif + - paralleltest + - nlreturn + - cyclop + - exhaustivestruct + - gci + - gofumpt + - errorlint + - exhaustive + - ifshort + - wrapcheck + - stylecheck linters-settings: govet: @@ -36,6 +47,11 @@ linters-settings: goconst: min-len: 8 min-occurrences: 3 + forbidigo: + forbid: + - (Must)?NewLexer + exclude_godoc_examples: false + issues: max-per-linter: 0 diff --git a/vendor/github.com/alecthomas/chroma/README.md b/vendor/github.com/alecthomas/chroma/README.md index e47c88c874..95d54e61ac 100644 --- a/vendor/github.com/alecthomas/chroma/README.md +++ b/vendor/github.com/alecthomas/chroma/README.md @@ -41,7 +41,7 @@ C | C, C#, C++, Caddyfile, Caddyfile Directives, Cap'n Proto, Cassandra CQL, Cey D | D, Dart, Diff, Django/Jinja, Docker, DTD, Dylan E | EBNF, Elixir, Elm, EmacsLisp, Erlang F | Factor, Fish, Forth, Fortran, FSharp -G | GAS, GDScript, Genshi, Genshi HTML, Genshi Text, Gherkin, GLSL, Gnuplot, Go, Go HTML Template, Go Text Template, GraphQL, Groovy +G | GAS, GDScript, Genshi, Genshi HTML, Genshi Text, Gherkin, GLSL, Gnuplot, Go, Go HTML Template, Go Text Template, GraphQL, Groff, Groovy H | Handlebars, Haskell, Haxe, HCL, Hexdump, HLB, HTML, HTTP, Hy I | Idris, Igor, INI, Io J | J, Java, JavaScript, JSON, Julia, Jungle @@ -50,10 +50,10 @@ L | Lighttpd configuration file, LLVM, Lua M | Mako, markdown, Mason, Mathematica, Matlab, MiniZinc, MLIR, Modula-2, MonkeyC, MorrowindScript, Myghty, MySQL N | NASM, Newspeak, Nginx configuration file, Nim, Nix O | Objective-C, OCaml, Octave, OpenSCAD, Org Mode -P | PacmanConf, Perl, PHP, PHTML, Pig, PkgConfig, PL/pgSQL, plaintext, Pony, PostgreSQL SQL dialect, PostScript, POVRay, PowerShell, Prolog, PromQL, Protocol Buffer, Puppet, Python, Python 3 +P | PacmanConf, Perl, PHP, PHTML, Pig, PkgConfig, PL/pgSQL, plaintext, Pony, PostgreSQL SQL dialect, PostScript, POVRay, PowerShell, Prolog, PromQL, Protocol Buffer, Puppet, Python 2, Python Q | QBasic -R | R, Racket, Ragel, react, ReasonML, reg, reStructuredText, Rexx, Ruby, Rust -S | SAS, Sass, Scala, Scheme, Scilab, SCSS, Smalltalk, Smarty, Snobol, Solidity, SPARQL, SQL, SquidConf, Standard ML, Stylus, Swift, SYSTEMD, systemverilog +R | R, Racket, Ragel, Raku, react, ReasonML, reg, reStructuredText, Rexx, Ruby, Rust +S | SAS, Sass, Scala, Scheme, Scilab, SCSS, Smalltalk, Smarty, Snobol, Solidity, SPARQL, SQL, SquidConf, Standard ML, Stylus, Svelte, Swift, SYSTEMD, systemverilog T | TableGen, TASM, Tcl, Tcsh, Termcap, Terminfo, Terraform, TeX, Thrift, TOML, TradingView, Transact-SQL, Turing, Turtle, Twig, TypeScript, TypoScript, TypoScriptCssData, TypoScriptHtmlData V | VB.net, verilog, VHDL, VimL, vue W | WDTE @@ -210,10 +210,10 @@ using the included Python 3 script `pygments2chroma.py`. I use something like the following: ```sh -python3 ~/Projects/chroma/_tools/pygments2chroma.py \ +python3 _tools/pygments2chroma.py \ pygments.lexers.jvm.KotlinLexer \ - > ~/Projects/chroma/lexers/kotlin.go \ - && gofmt -s -w ~/Projects/chroma/lexers/*.go + > lexers/k/kotlin.go \ + && gofmt -s -w lexers/k/kotlin.go ``` See notes in [pygments-lexers.txt](https://github.com/alecthomas/chroma/blob/master/pygments-lexers.txt) @@ -255,12 +255,30 @@ A command-line interface to Chroma is included. It can be installed with: go get -u github.com/alecthomas/chroma/cmd/chroma ``` +The CLI can be used as a preprocessor to colorise output of `less(1)`, +see documentation for the `LESSOPEN` environment variable. + +The `--fail` flag can be used to suppress output and return with exit status +1 to facilitate falling back to some other preprocessor in case chroma +does not resolve a specific lexer to use for the given file. For example: + +```shell +export LESSOPEN='| p() { chroma --fail "$1" || cat "$1"; }; p "%s"' +``` + +Replace `cat` with your favourite fallback preprocessor. + +When invoked as `.lessfilter`, the `--fail` flag is automatically turned +on under the hood for easy integration with [lesspipe shipping with +Debian and derivatives](https://manpages.debian.org/lesspipe#USER_DEFINED_FILTERS); +for that setup the `chroma` executable can be just symlinked to `~/.lessfilter`. + <a id="markdown-whats-missing-compared-to-pygments" name="whats-missing-compared-to-pygments"></a> ## What's missing compared to Pygments? - Quite a few lexers, for various reasons (pull-requests welcome): - Pygments lexers for complex languages often include custom code to - handle certain aspects, such as Perl6's ability to nest code inside + handle certain aspects, such as Raku's ability to nest code inside regular expressions. These require time and effort to convert. - I mostly only converted languages I had heard of, to reduce the porting cost. - Some more esoteric features of Pygments are omitted for simplicity. diff --git a/vendor/github.com/alecthomas/chroma/formatters/html/html.go b/vendor/github.com/alecthomas/chroma/formatters/html/html.go index a0854afa80..5121529ebb 100644 --- a/vendor/github.com/alecthomas/chroma/formatters/html/html.go +++ b/vendor/github.com/alecthomas/chroma/formatters/html/html.go @@ -131,7 +131,7 @@ var ( } defaultPreWrapper = preWrapper{ start: func(code bool, styleAttr string) string { - return fmt.Sprintf("<pre%s>", styleAttr) + return fmt.Sprintf(`<pre tabindex="0"%s>`, styleAttr) }, end: func(code bool) string { return "</pre>" diff --git a/vendor/github.com/alecthomas/chroma/go.sum b/vendor/github.com/alecthomas/chroma/go.sum index 273999b343..12000b74af 100644 --- a/vendor/github.com/alecthomas/chroma/go.sum +++ b/vendor/github.com/alecthomas/chroma/go.sum @@ -11,15 +11,12 @@ github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dlclark/regexp2 v1.2.0 h1:8sAhBGEM0dRWogWqWyQeIJnxjWO6oIjl8FKqREDsGfk= -github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -28,7 +25,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= diff --git a/vendor/github.com/alecthomas/chroma/lexer.go b/vendor/github.com/alecthomas/chroma/lexer.go index 1269d338b1..fe625198e6 100644 --- a/vendor/github.com/alecthomas/chroma/lexer.go +++ b/vendor/github.com/alecthomas/chroma/lexer.go @@ -2,6 +2,7 @@ package chroma import ( "fmt" + "strings" ) var ( @@ -98,9 +99,11 @@ type Lexer interface { // Lexers is a slice of lexers sortable by name. type Lexers []Lexer -func (l Lexers) Len() int { return len(l) } -func (l Lexers) Swap(i, j int) { l[i], l[j] = l[j], l[i] } -func (l Lexers) Less(i, j int) bool { return l[i].Config().Name < l[j].Config().Name } +func (l Lexers) Len() int { return len(l) } +func (l Lexers) Swap(i, j int) { l[i], l[j] = l[j], l[i] } +func (l Lexers) Less(i, j int) bool { + return strings.ToLower(l[i].Config().Name) < strings.ToLower(l[j].Config().Name) +} // PrioritisedLexers is a slice of lexers sortable by priority. type PrioritisedLexers []Lexer diff --git a/vendor/github.com/alecthomas/chroma/lexers/README.md b/vendor/github.com/alecthomas/chroma/lexers/README.md index 2421710ef5..b4ed292b1e 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/README.md +++ b/vendor/github.com/alecthomas/chroma/lexers/README.md @@ -3,6 +3,9 @@ The tests in this directory feed a known input `testdata/<name>.actual` into the parser for `<name>` and check that its output matches `<name>.exported`. +It is also possible to perform several tests on a same parser `<name>`, by placing know inputs `*.actual` into a +directory `testdata/<name>/`. + ## Running the tests Run the tests as normal: diff --git a/vendor/github.com/alecthomas/chroma/lexers/c/c.go b/vendor/github.com/alecthomas/chroma/lexers/c/c.go index a81e7a88e0..3698c4f297 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/c/c.go +++ b/vendor/github.com/alecthomas/chroma/lexers/c/c.go @@ -10,8 +10,8 @@ var C = internal.Register(MustNewLazyLexer( &Config{ Name: "C", Aliases: []string{"c"}, - Filenames: []string{"*.c", "*.h", "*.idc"}, - MimeTypes: []string{"text/x-chdr", "text/x-csrc"}, + Filenames: []string{"*.c", "*.h", "*.idc", "*.x[bp]m"}, + MimeTypes: []string{"text/x-chdr", "text/x-csrc", "image/x-xbitmap", "image/x-xpixmap"}, EnsureNL: true, }, cRules, @@ -43,7 +43,7 @@ func cRules() Rules { {`[~!%^&*+=|?:<>/-]`, Operator, nil}, {`[()\[\],.]`, Punctuation, nil}, {Words(``, `\b`, `asm`, `auto`, `break`, `case`, `const`, `continue`, `default`, `do`, `else`, `enum`, `extern`, `for`, `goto`, `if`, `register`, `restricted`, `return`, `sizeof`, `static`, `struct`, `switch`, `typedef`, `union`, `volatile`, `while`), Keyword, nil}, - {`(bool|int|long|float|short|double|char|unsigned|signed|void)\b`, KeywordType, nil}, + {`(bool|int|long|float|short|double|char((8|16|32)_t)?|unsigned|signed|void|u?int(_fast|_least|)(8|16|32|64)_t)\b`, KeywordType, nil}, {Words(``, `\b`, `inline`, `_inline`, `__inline`, `naked`, `restrict`, `thread`, `typename`), KeywordReserved, nil}, {`(__m(128i|128d|128|64))\b`, KeywordReserved, nil}, {Words(`__`, `\b`, `asm`, `int8`, `based`, `except`, `int16`, `stdcall`, `cdecl`, `fastcall`, `int32`, `declspec`, `finally`, `int64`, `try`, `leave`, `wchar_t`, `w64`, `unaligned`, `raise`, `noop`, `identifier`, `forceinline`, `assume`), KeywordReserved, nil}, diff --git a/vendor/github.com/alecthomas/chroma/lexers/circular/phtml.go b/vendor/github.com/alecthomas/chroma/lexers/circular/phtml.go index f0824b5c74..fc2e2eaf94 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/circular/phtml.go +++ b/vendor/github.com/alecthomas/chroma/lexers/circular/phtml.go @@ -13,11 +13,12 @@ var PHTML = internal.Register(DelegatingLexer(h.HTML, MustNewLazyLexer( &Config{ Name: "PHTML", Aliases: []string{"phtml"}, - Filenames: []string{"*.phtml"}, - MimeTypes: []string{"application/x-php", "application/x-httpd-php", "application/x-httpd-php3", "application/x-httpd-php4", "application/x-httpd-php5"}, + Filenames: []string{"*.phtml", "*.php", "*.php[345]", "*.inc"}, + MimeTypes: []string{"application/x-php", "application/x-httpd-php", "application/x-httpd-php3", "application/x-httpd-php4", "application/x-httpd-php5", "text/x-php"}, DotAll: true, CaseInsensitive: true, EnsureNL: true, + Priority: 2, }, phtmlRules, ).SetAnalyser(func(text string) float32 { diff --git a/vendor/github.com/alecthomas/chroma/lexers/d/dylan.go b/vendor/github.com/alecthomas/chroma/lexers/d/dylan.go index 0e51f453bc..feda74870e 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/d/dylan.go +++ b/vendor/github.com/alecthomas/chroma/lexers/d/dylan.go @@ -6,7 +6,7 @@ import ( ) // Dylan lexer. -var Dylan = internal.Register(MustNewLexer( +var Dylan = internal.Register(MustNewLazyLexer( &Config{ Name: "Dylan", Aliases: []string{"dylan"}, @@ -14,61 +14,63 @@ var Dylan = internal.Register(MustNewLexer( MimeTypes: []string{"text/x-dylan"}, CaseInsensitive: true, }, - Rules{ - "root": { - {`\s+`, Whitespace, nil}, - {`//.*?\n`, CommentSingle, nil}, - {`([a-z0-9-]+:)([ \t]*)(.*(?:\n[ \t].+)*)`, ByGroups(NameAttribute, Whitespace, LiteralString), nil}, - Default(Push("code")), - }, - "code": { - {`\s+`, Whitespace, nil}, - {`//.*?\n`, CommentSingle, nil}, - {`/\*`, CommentMultiline, Push("comment")}, - {`"`, LiteralString, Push("string")}, - {`'(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\\'\n])'`, LiteralStringChar, nil}, - {`#b[01]+`, LiteralNumberBin, nil}, - {`#o[0-7]+`, LiteralNumberOct, nil}, - {`[-+]?(\d*\.\d+([ed][-+]?\d+)?|\d+(\.\d*)?e[-+]?\d+)`, LiteralNumberFloat, nil}, - {`[-+]?\d+`, LiteralNumberInteger, nil}, - {`#x[0-9a-f]+`, LiteralNumberHex, nil}, + func() Rules { + return Rules{ + "root": { + {`\s+`, Whitespace, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`([a-z0-9-]+:)([ \t]*)(.*(?:\n[ \t].+)*)`, ByGroups(NameAttribute, Whitespace, LiteralString), nil}, + Default(Push("code")), + }, + "code": { + {`\s+`, Whitespace, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/\*`, CommentMultiline, Push("comment")}, + {`"`, LiteralString, Push("string")}, + {`'(\\.|\\[0-7]{1,3}|\\x[a-f0-9]{1,2}|[^\\\'\n])'`, LiteralStringChar, nil}, + {`#b[01]+`, LiteralNumberBin, nil}, + {`#o[0-7]+`, LiteralNumberOct, nil}, + {`[-+]?(\d*\.\d+([ed][-+]?\d+)?|\d+(\.\d*)?e[-+]?\d+)`, LiteralNumberFloat, nil}, + {`[-+]?\d+`, LiteralNumberInteger, nil}, + {`#x[0-9a-f]+`, LiteralNumberHex, nil}, - {`(\?\\?)([\w!&*<>|^$%@+~?/=-]+)(:)(token|name|variable|expression|body|case-body|\*)`, - ByGroups(Operator, NameVariable, Operator, NameBuiltin), nil}, - {`(\?)(:)(token|name|variable|expression|body|case-body|\*)`, - ByGroups(Operator, Operator, NameVariable), nil}, - {`(\?\\?)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(Operator, NameVariable), nil}, + {`(\?\\?)([\w!&*<>|^$%@+~?/=-]+)(:)(token|name|variable|expression|body|case-body|\*)`, + ByGroups(Operator, NameVariable, Operator, NameBuiltin), nil}, + {`(\?)(:)(token|name|variable|expression|body|case-body|\*)`, + ByGroups(Operator, Operator, NameVariable), nil}, + {`(\?\\?)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(Operator, NameVariable), nil}, - {`(=>|::|#\(|#\[|##|\?\?|\?=|\?|[(){}\[\],.;])`, Punctuation, nil}, - {`:=`, Operator, nil}, - {`#[tf]`, Literal, nil}, - {`#"`, LiteralStringSymbol, Push("symbol")}, - {`#[a-z0-9-]+`, Keyword, nil}, - {`#(all-keys|include|key|next|rest)`, Keyword, nil}, - {`[\w!&*<>|^$%@+~?/=-]+:`, KeywordConstant, nil}, - {`<[\w!&*<>|^$%@+~?/=-]+>`, NameClass, nil}, - {`\*[\w!&*<>|^$%@+~?/=-]+\*`, NameVariableGlobal, nil}, - {`\$[\w!&*<>|^$%@+~?/=-]+`, NameConstant, nil}, - {`(let|method|function)([ \t]+)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(NameBuiltin, Whitespace, NameVariable), nil}, - {`(error|signal|return|break)`, NameException, nil}, - {`(\\?)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(Operator, Name), nil}, - }, - "comment": { - {`[^*/]`, CommentMultiline, nil}, - {`/\*`, CommentMultiline, Push()}, - {`\*/`, CommentMultiline, Pop(1)}, - {`[*/]`, CommentMultiline, nil}, - }, - "symbol": { - {`"`, LiteralStringSymbol, Pop(1)}, - {`[^\\"]+`, LiteralStringSymbol, nil}, - }, - "string": { - {`"`, LiteralString, Pop(1)}, - {`\\([\\abfnrtv"\']|x[a-f0-9]{2,4}|[0-7]{1,3})`, LiteralStringEscape, nil}, - {`[^\\"\n]+`, LiteralString, nil}, - {`\\\n`, LiteralString, nil}, - {`\\`, LiteralString, nil}, - }, + {`(=>|::|#\(|#\[|##|\?\?|\?=|\?|[(){}\[\],.;])`, Punctuation, nil}, + {`:=`, Operator, nil}, + {`#[tf]`, Literal, nil}, + {`#"`, LiteralStringSymbol, Push("symbol")}, + {`#[a-z0-9-]+`, Keyword, nil}, + {`#(all-keys|include|key|next|rest)`, Keyword, nil}, + {`[\w!&*<>|^$%@+~?/=-]+:`, KeywordConstant, nil}, + {`<[\w!&*<>|^$%@+~?/=-]+>`, NameClass, nil}, + {`\*[\w!&*<>|^$%@+~?/=-]+\*`, NameVariableGlobal, nil}, + {`\$[\w!&*<>|^$%@+~?/=-]+`, NameConstant, nil}, + {`(let|method|function)([ \t]+)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(NameBuiltin, Whitespace, NameVariable), nil}, + {`(error|signal|return|break)`, NameException, nil}, + {`(\\?)([\w!&*<>|^$%@+~?/=-]+)`, ByGroups(Operator, Name), nil}, + }, + "comment": { + {`[^*/]`, CommentMultiline, nil}, + {`/\*`, CommentMultiline, Push()}, + {`\*/`, CommentMultiline, Pop(1)}, + {`[*/]`, CommentMultiline, nil}, + }, + "symbol": { + {`"`, LiteralStringSymbol, Pop(1)}, + {`[^\\"]+`, LiteralStringSymbol, nil}, + }, + "string": { + {`"`, LiteralString, Pop(1)}, + {`\\([\\abfnrtv"\']|x[a-f0-9]{2,4}|[0-7]{1,3})`, LiteralStringEscape, nil}, + {`[^\\"\n]+`, LiteralString, nil}, + {`\\\n`, LiteralString, nil}, + {`\\`, LiteralString, nil}, + }, + } }, )) diff --git a/vendor/github.com/alecthomas/chroma/lexers/f/fish.go b/vendor/github.com/alecthomas/chroma/lexers/f/fish.go index 3678cfa2b9..c35090000f 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/f/fish.go +++ b/vendor/github.com/alecthomas/chroma/lexers/f/fish.go @@ -17,11 +17,32 @@ var Fish = internal.Register(MustNewLazyLexer( )) func fishRules() Rules { + keywords := []string{ + `begin`, `end`, `if`, `else`, `while`, `break`, `for`, `return`, `function`, `block`, + `case`, `continue`, `switch`, `not`, `and`, `or`, `set`, `echo`, `exit`, `pwd`, `true`, + `false`, `cd`, `cdh`, `count`, `test`, + } + keywordsPattern := Words(`\b`, `\b`, keywords...) + + builtins := []string{ + `alias`, `bg`, `bind`, `breakpoint`, `builtin`, `argparse`, `abbr`, `string`, `command`, + `commandline`, `complete`, `contains`, `dirh`, `dirs`, `disown`, `emit`, `eval`, `exec`, + `fg`, `fish`, `fish_add_path`, `fish_breakpoint_prompt`, `fish_command_not_found`, + `fish_config`, `fish_git_prompt`, `fish_greeting`, `fish_hg_prompt`, `fish_indent`, + `fish_is_root_user`, `fish_key_reader`, `fish_mode_prompt`, `fish_opt`, `fish_pager`, + `fish_prompt`, `fish_right_prompt`, `fish_status_to_signal`, `fish_svn_prompt`, + `fish_title`, `fish_update_completions`, `fish_vcs_prompt`, `fishd`, `funced`, + `funcsave`, `functions`, `help`, `history`, `isatty`, `jobs`, `math`, `mimedb`, `nextd`, + `open`, `prompt_pwd`, `realpath`, `popd`, `prevd`, `psub`, `pushd`, `random`, `read`, + `set_color`, `source`, `status`, `suspend`, `trap`, `type`, `ulimit`, `umask`, `vared`, + `fc`, `getopts`, `hash`, `kill`, `printf`, `time`, `wait`, + } + return Rules{ "root": { Include("basic"), - Include("data"), Include("interp"), + Include("data"), }, "interp": { {`\$\(\(`, Keyword, Push("math")}, @@ -29,13 +50,20 @@ func fishRules() Rules { {`\$#?(\w+|.)`, NameVariable, nil}, }, "basic": { - {`\b(begin|end|if|else|while|break|for|in|return|function|block|case|continue|switch|not|and|or|set|echo|exit|pwd|true|false|cd|count|test)(\s*)\b`, ByGroups(Keyword, Text), nil}, - {`\b(alias|bg|bind|breakpoint|builtin|command|commandline|complete|contains|dirh|dirs|emit|eval|exec|fg|fish|fish_config|fish_indent|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|isatty|jobs|math|mimedb|nextd|open|popd|prevd|psub|pushd|random|read|set_color|source|status|trap|type|ulimit|umask|vared|fc|getopts|hash|kill|printf|time|wait)\s*\b(?!\.)`, NameBuiltin, nil}, + {Words(`(?<=(?:^|\A|;|&&|\|\||\||`+keywordsPattern+`)\s*)`, `(?=;?\b)`, keywords...), Keyword, nil}, + {`(?<=for\s+\S+\s+)in\b`, Keyword, nil}, + {Words(`\b`, `\s*\b(?!\.)`, builtins...), NameBuiltin, nil}, + {`#!.*\n`, CommentHashbang, nil}, {`#.*\n`, Comment, nil}, {`\\[\w\W]`, LiteralStringEscape, nil}, {`(\b\w+)(\s*)(=)`, ByGroups(NameVariable, Text, Operator), nil}, - {`[\[\]()=]`, Operator, nil}, + {`[\[\]()={}]`, Operator, nil}, + {`(?<=\[[^\]]+)\.\.|-(?=[^\[]+\])`, Operator, nil}, {`<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2`, LiteralString, nil}, + {`(?<=set\s+(?:--?[^\d\W][\w-]*\s+)?)\w+`, NameVariable, nil}, + {`(?<=for\s+)\w[\w-]*(?=\s+in)`, NameVariable, nil}, + {`(?<=function\s+)\w(?:[^\n])*?(?= *[-\n])`, NameFunction, nil}, + {`(?<=(?:^|\b(?:and|or|sudo)\b|;|\|\||&&|\||\(|(?:\b\w+\s*=\S+\s)) *)\w[\w-]*`, NameFunction, nil}, }, "data": { {`(?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\$])*"`, LiteralStringDouble, nil}, @@ -43,10 +71,11 @@ func fishRules() Rules { {`(?s)\$'(\\\\|\\[0-7]+|\\.|[^'\\])*'`, LiteralStringSingle, nil}, {`(?s)'.*?'`, LiteralStringSingle, nil}, {`;`, Punctuation, nil}, - {`&|\||\^|<|>`, Operator, nil}, + {`&&|\|\||&|\||\^|<|>`, Operator, nil}, {`\s+`, Text, nil}, - {`\d+(?= |\Z)`, LiteralNumber, nil}, - {"[^=\\s\\[\\]{}()$\"\\'`\\\\<&|;]+", Text, nil}, + {`\b\d+\b`, LiteralNumber, nil}, + {`--?[^\d][\w-]*`, NameAttribute, nil}, + {".+?", Text, nil}, }, "string": { {`"`, LiteralStringDouble, Pop(1)}, diff --git a/vendor/github.com/alecthomas/chroma/lexers/f/fortran_fixed.go b/vendor/github.com/alecthomas/chroma/lexers/f/fortran_fixed.go new file mode 100644 index 0000000000..7c646386dc --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/f/fortran_fixed.go @@ -0,0 +1,39 @@ +package f + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// FortranFixed lexer. +var FortranFixed = internal.Register(MustNewLazyLexer( + &Config{ + Name: "FortranFixed", + Aliases: []string{"fortranfixed"}, + Filenames: []string{"*.f", "*.F"}, + MimeTypes: []string{"text/x-fortran"}, + NotMultiline: true, + CaseInsensitive: true, + }, + func() Rules { + return Rules{ + "root": { + {`[C*].*\n`, Comment, nil}, + {`#.*\n`, CommentPreproc, nil}, + {`[\t ]*!.*\n`, Comment, nil}, + {`(.{5})`, NameLabel, Push("cont-char")}, + {`.*\n`, Using(Fortran), nil}, + }, + "cont-char": { + {` `, Text, Push("code")}, + {`0`, Comment, Push("code")}, + {`.`, GenericStrong, Push("code")}, + }, + "code": { + {`(.{66})(.*)(\n)`, ByGroups(Using(Fortran), Comment, Text), Push("root")}, + {`.*\n`, Using(Fortran), Push("root")}, + Default(Push("root")), + }, + } + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/g/groff.go b/vendor/github.com/alecthomas/chroma/lexers/g/groff.go new file mode 100644 index 0000000000..65a70934f2 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/g/groff.go @@ -0,0 +1,47 @@ +package g + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Groff lexer. +var Groff = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Groff", + Aliases: []string{"groff", "nroff", "man"}, + Filenames: []string{"*.[1-9]", "*.1p", "*.3pm", "*.man"}, + MimeTypes: []string{"application/x-troff", "text/troff"}, + }, + func() Rules { + return Rules{ + "root": { + {`(\.)(\w+)`, ByGroups(Text, Keyword), Push("request")}, + {`\.`, Punctuation, Push("request")}, + {`[^\\\n]+`, Text, Push("textline")}, + Default(Push("textline")), + }, + "textline": { + Include("escapes"), + {`[^\\\n]+`, Text, nil}, + {`\n`, Text, Pop(1)}, + }, + "escapes": { + {`\\"[^\n]*`, Comment, nil}, + {`\\[fn]\w`, LiteralStringEscape, nil}, + {`\\\(.{2}`, LiteralStringEscape, nil}, + {`\\.\[.*\]`, LiteralStringEscape, nil}, + {`\\.`, LiteralStringEscape, nil}, + {`\\\n`, Text, Push("request")}, + }, + "request": { + {`\n`, Text, Pop(1)}, + Include("escapes"), + {`"[^\n"]+"`, LiteralStringDouble, nil}, + {`\d+`, LiteralNumber, nil}, + {`\S+`, LiteralString, nil}, + {`\s+`, Text, nil}, + }, + } + }, +)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/h/http.go b/vendor/github.com/alecthomas/chroma/lexers/h/http.go index 1a0c138c4a..c515ed4c1b 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/h/http.go +++ b/vendor/github.com/alecthomas/chroma/lexers/h/http.go @@ -37,14 +37,14 @@ func httpRules() Rules { } } -func httpContentBlock(groups []string, lexer Lexer) Iterator { +func httpContentBlock(groups []string, state *LexerState) Iterator { tokens := []Token{ {Generic, groups[0]}, } return Literator(tokens...) } -func httpHeaderBlock(groups []string, lexer Lexer) Iterator { +func httpHeaderBlock(groups []string, state *LexerState) Iterator { tokens := []Token{ {Name, groups[1]}, {Text, groups[2]}, @@ -56,7 +56,7 @@ func httpHeaderBlock(groups []string, lexer Lexer) Iterator { return Literator(tokens...) } -func httpContinuousHeaderBlock(groups []string, lexer Lexer) Iterator { +func httpContinuousHeaderBlock(groups []string, state *LexerState) Iterator { tokens := []Token{ {Text, groups[1]}, {Literal, groups[2]}, diff --git a/vendor/github.com/alecthomas/chroma/lexers/internal/api.go b/vendor/github.com/alecthomas/chroma/lexers/internal/api.go index c10eb3a43c..5c7970aecc 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/internal/api.go +++ b/vendor/github.com/alecthomas/chroma/lexers/internal/api.go @@ -11,6 +11,19 @@ import ( "github.com/alecthomas/chroma" ) +var ( + ignoredSuffixes = [...]string{ + // Editor backups + "~", ".bak", ".old", ".orig", + // Debian and derivatives apt/dpkg backups + ".dpkg-dist", ".dpkg-old", + // Red Hat and derivatives rpm backups + ".rpmnew", ".rpmorig", ".rpmsave", + // Build system input/template files + ".in", + } +) + // Registry of Lexers. var Registry = struct { Lexers chroma.Lexers @@ -93,6 +106,13 @@ func Match(filename string) chroma.Lexer { for _, glob := range config.Filenames { if fnmatch.Match(glob, filename, 0) { matched = append(matched, lexer) + } else { + for _, suf := range &ignoredSuffixes { + if fnmatch.Match(glob+suf, filename, 0) { + matched = append(matched, lexer) + break + } + } } } } @@ -107,6 +127,13 @@ func Match(filename string) chroma.Lexer { for _, glob := range config.AliasFilenames { if fnmatch.Match(glob, filename, 0) { matched = append(matched, lexer) + } else { + for _, suf := range &ignoredSuffixes { + if fnmatch.Match(glob+suf, filename, 0) { + matched = append(matched, lexer) + break + } + } } } } diff --git a/vendor/github.com/alecthomas/chroma/lexers/j/javascript.go b/vendor/github.com/alecthomas/chroma/lexers/j/javascript.go index 4dba577c11..6bb3145c02 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/j/javascript.go +++ b/vendor/github.com/alecthomas/chroma/lexers/j/javascript.go @@ -61,7 +61,7 @@ var JavascriptRules = Rules{ } // Javascript lexer. -var Javascript = internal.Register(MustNewLexer( +var Javascript = internal.Register(MustNewLexer( // nolint: forbidigo &Config{ Name: "JavaScript", Aliases: []string{"js", "javascript"}, diff --git a/vendor/github.com/alecthomas/chroma/lexers/lexers.go b/vendor/github.com/alecthomas/chroma/lexers/lexers.go index de2d7ce3f8..2b429212e5 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/lexers.go +++ b/vendor/github.com/alecthomas/chroma/lexers/lexers.go @@ -3,7 +3,7 @@ // Sub-packages contain lexer implementations. package lexers -// nolint: golint +// nolint import ( "github.com/alecthomas/chroma" _ "github.com/alecthomas/chroma/lexers/a" diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/markdown.go b/vendor/github.com/alecthomas/chroma/lexers/m/markdown.go index 9ee157be07..e50e4702e7 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/markdown.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/markdown.go @@ -40,7 +40,7 @@ func markdownRules() Rules { }, "inline": { {`\\.`, Text, nil}, - {`(\s)([*_][^*_]+[*_])(\W|\n)`, ByGroups(Text, GenericEmph, Text), nil}, + {`(\s)(\*|_)((?:(?!\2).)*)(\2)((?=\W|\n))`, ByGroups(Text, GenericEmph, GenericEmph, GenericEmph, Text), nil}, {`(\s)((\*\*|__).*?)\3((?=\W|\n))`, ByGroups(Text, GenericStrong, GenericStrong, Text), nil}, {`(\s)(~~[^~]+~~)((?=\W|\n))`, ByGroups(Text, GenericDeleted, Text), nil}, {"`[^`]+`", LiteralStringBacktick, nil}, diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/mcfunction.go b/vendor/github.com/alecthomas/chroma/lexers/m/mcfunction.go index 1e8eb45927..7baec6d614 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/mcfunction.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/mcfunction.go @@ -6,7 +6,7 @@ import ( ) // mcfunction lexer. -var MCFunction = internal.Register(MustNewLexer( +var MCFunction = internal.Register(MustNewLazyLexer( &Config{ Name: "mcfunction", Aliases: []string{"mcfunction"}, @@ -15,93 +15,95 @@ var MCFunction = internal.Register(MustNewLexer( NotMultiline: true, DotAll: true, }, - Rules{ - "simplevalue": { - {`(true|false)`, KeywordConstant, nil}, - {`[01]b`, LiteralNumber, nil}, - {`-?(0|[1-9]\d*)(\.\d+[eE](\+|-)?\d+|[eE](\+|-)?\d+|\.\d+)`, LiteralNumberFloat, nil}, - {`(-?\d+)(\.\.)(-?\d+)`, ByGroups(LiteralNumberInteger, Punctuation, LiteralNumberInteger), nil}, - {`-?(0|[1-9]\d*)`, LiteralNumberInteger, nil}, - {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, - {`'[^']+'`, LiteralStringSingle, nil}, - {`([!#]?)(\w+)`, ByGroups(Punctuation, Text), nil}, - }, - "nbtobjectattribute": { - Include("nbtvalue"), - {`:`, Punctuation, nil}, - {`,`, Punctuation, Pop(1)}, - {`\}`, Punctuation, Pop(2)}, - }, - "nbtobjectvalue": { - {`("(\\\\|\\"|[^"])*"|[a-zA-Z0-9_]+)`, NameTag, Push("nbtobjectattribute")}, - {`\}`, Punctuation, Pop(1)}, - }, - "nbtarrayvalue": { - Include("nbtvalue"), - {`,`, Punctuation, nil}, - {`\]`, Punctuation, Pop(1)}, - }, - "nbtvalue": { - Include("simplevalue"), - {`\{`, Punctuation, Push("nbtobjectvalue")}, - {`\[`, Punctuation, Push("nbtarrayvalue")}, - }, - "argumentvalue": { - Include("simplevalue"), - {`,`, Punctuation, Pop(1)}, - {`[}\]]`, Punctuation, Pop(2)}, - }, - "argumentlist": { - {`(nbt)(={)`, ByGroups(NameAttribute, Punctuation), Push("nbtobjectvalue")}, - {`([A-Za-z0-9/_!]+)(={)`, ByGroups(NameAttribute, Punctuation), Push("argumentlist")}, - {`([A-Za-z0-9/_!]+)(=)`, ByGroups(NameAttribute, Punctuation), Push("argumentvalue")}, - Include("simplevalue"), - {`,`, Punctuation, nil}, - {`[}\]]`, Punctuation, Pop(1)}, - }, - "root": { - {`#.*?\n`, CommentSingle, nil}, - {Words(`/?`, `\b`, `ability`, `attributes`, `advancement`, - `ban`, `ban-ip`, `banlist`, `bossbar`, - `camerashake`, `classroommode`, `clear`, - `clearspawnpoint`, `clone`, `code`, `collect`, - `createagent`, `data`, `datapack`, `debug`, - `defaultgamemode`, `deop`, `destroy`, `detect`, - `detectredstone`, `difficulty`, `dropall`, - `effect`, `enchant`, `event`, `execute`, - `experience`, `fill`, `flog`, `forceload`, - `function`, `gamemode`, `gamerule`, - `geteduclientinfo`, `give`, `help`, `item`, - `immutableworld`, `kick`, `kill`, `list`, - `locate`, `locatebiome`, `loot`, `me`, `mixer`, - `mobevent`, `move`, `msg`, `music`, `op`, - `pardon`, `particle`, `playanimation`, - `playsound`, `position`, `publish`, - `raytracefog`, `recipe`, `reload`, `remove`, - `replaceitem`, `ride`, `save`, `save-all`, - `save-off`, `save-on`, `say`, `schedule`, - `scoreboard`, `seed`, `setblock`, - `setidletimeout`, `setmaxplayers`, - `setworldspawn`, `spawnpoint`, `spectate`, - `spreadplayers`, `stop`, `stopsound`, - `structure`, `summon`, `tag`, `team`, `teammsg`, - `teleport`, `tell`, `tellraw`, `testfor`, - `testforblock`, `testforblocks`, `tickingarea`, - `time`, `title`, `toggledownfall`, `tp`, - `tpagent`, `transfer`, `transferserver`, - `trigger`, `turn`, `w`, `weather`, `whitelist`, - `worldborder`, `worldbuilder`, `wsserver`, `xp`, - ), KeywordReserved, nil}, - {Words(``, ``, `@p`, `@r`, `@a`, `@e`, `@s`, `@c`, `@v`), - KeywordConstant, nil}, - {`\[`, Punctuation, Push("argumentlist")}, - {`{`, Punctuation, Push("nbtobjectvalue")}, - {`~`, NameBuiltin, nil}, - {`([a-zA-Z_]+:)?[a-zA-Z_]+\b`, Text, nil}, - {`([a-z]+)(\.)([0-9]+)\b`, ByGroups(Text, Punctuation, LiteralNumber), nil}, - {`([<>=]|<=|>=)`, Punctuation, nil}, - Include("simplevalue"), - {`\s+`, TextWhitespace, nil}, - }, + func() Rules { + return Rules{ + "simplevalue": { + {`(true|false)`, KeywordConstant, nil}, + {`[01]b`, LiteralNumber, nil}, + {`-?(0|[1-9]\d*)(\.\d+[eE](\+|-)?\d+|[eE](\+|-)?\d+|\.\d+)`, LiteralNumberFloat, nil}, + {`(-?\d+)(\.\.)(-?\d+)`, ByGroups(LiteralNumberInteger, Punctuation, LiteralNumberInteger), nil}, + {`-?(0|[1-9]\d*)`, LiteralNumberInteger, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralStringDouble, nil}, + {`'[^']+'`, LiteralStringSingle, nil}, + {`([!#]?)(\w+)`, ByGroups(Punctuation, Text), nil}, + }, + "nbtobjectattribute": { + Include("nbtvalue"), + {`:`, Punctuation, nil}, + {`,`, Punctuation, Pop(1)}, + {`\}`, Punctuation, Pop(2)}, + }, + "nbtobjectvalue": { + {`("(\\\\|\\"|[^"])*"|[a-zA-Z0-9_]+)`, NameTag, Push("nbtobjectattribute")}, + {`\}`, Punctuation, Pop(1)}, + }, + "nbtarrayvalue": { + Include("nbtvalue"), + {`,`, Punctuation, nil}, + {`\]`, Punctuation, Pop(1)}, + }, + "nbtvalue": { + Include("simplevalue"), + {`\{`, Punctuation, Push("nbtobjectvalue")}, + {`\[`, Punctuation, Push("nbtarrayvalue")}, + }, + "argumentvalue": { + Include("simplevalue"), + {`,`, Punctuation, Pop(1)}, + {`[}\]]`, Punctuation, Pop(2)}, + }, + "argumentlist": { + {`(nbt)(={)`, ByGroups(NameAttribute, Punctuation), Push("nbtobjectvalue")}, + {`([A-Za-z0-9/_!]+)(={)`, ByGroups(NameAttribute, Punctuation), Push("argumentlist")}, + {`([A-Za-z0-9/_!]+)(=)`, ByGroups(NameAttribute, Punctuation), Push("argumentvalue")}, + Include("simplevalue"), + {`,`, Punctuation, nil}, + {`[}\]]`, Punctuation, Pop(1)}, + }, + "root": { + {`#.*?\n`, CommentSingle, nil}, + {Words(`/?`, `\b`, `ability`, `attributes`, `advancement`, + `ban`, `ban-ip`, `banlist`, `bossbar`, + `camerashake`, `classroommode`, `clear`, + `clearspawnpoint`, `clone`, `code`, `collect`, + `createagent`, `data`, `datapack`, `debug`, + `defaultgamemode`, `deop`, `destroy`, `detect`, + `detectredstone`, `difficulty`, `dropall`, + `effect`, `enchant`, `event`, `execute`, + `experience`, `fill`, `flog`, `forceload`, + `function`, `gamemode`, `gamerule`, + `geteduclientinfo`, `give`, `help`, `item`, + `immutableworld`, `kick`, `kill`, `list`, + `locate`, `locatebiome`, `loot`, `me`, `mixer`, + `mobevent`, `move`, `msg`, `music`, `op`, + `pardon`, `particle`, `playanimation`, + `playsound`, `position`, `publish`, + `raytracefog`, `recipe`, `reload`, `remove`, + `replaceitem`, `ride`, `save`, `save-all`, + `save-off`, `save-on`, `say`, `schedule`, + `scoreboard`, `seed`, `setblock`, + `setidletimeout`, `setmaxplayers`, + `setworldspawn`, `spawnpoint`, `spectate`, + `spreadplayers`, `stop`, `stopsound`, + `structure`, `summon`, `tag`, `team`, `teammsg`, + `teleport`, `tell`, `tellraw`, `testfor`, + `testforblock`, `testforblocks`, `tickingarea`, + `time`, `title`, `toggledownfall`, `tp`, + `tpagent`, `transfer`, `transferserver`, + `trigger`, `turn`, `w`, `weather`, `whitelist`, + `worldborder`, `worldbuilder`, `wsserver`, `xp`, + ), KeywordReserved, nil}, + {Words(``, ``, `@p`, `@r`, `@a`, `@e`, `@s`, `@c`, `@v`), + KeywordConstant, nil}, + {`\[`, Punctuation, Push("argumentlist")}, + {`{`, Punctuation, Push("nbtobjectvalue")}, + {`~`, NameBuiltin, nil}, + {`([a-zA-Z_]+:)?[a-zA-Z_]+\b`, Text, nil}, + {`([a-z]+)(\.)([0-9]+)\b`, ByGroups(Text, Punctuation, LiteralNumber), nil}, + {`([<>=]|<=|>=)`, Punctuation, nil}, + Include("simplevalue"), + {`\s+`, TextWhitespace, nil}, + }, + } }, )) diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/metal.go b/vendor/github.com/alecthomas/chroma/lexers/m/metal.go new file mode 100644 index 0000000000..4a9ba2b78e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/m/metal.go @@ -0,0 +1,101 @@ +package m + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Metal lexer. +var Metal = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Metal", + Aliases: []string{"metal"}, + Filenames: []string{"*.metal"}, + MimeTypes: []string{"text/x-metal"}, + EnsureNL: true, + }, + metalRules, +)) + +func metalRules() Rules { + return Rules{ + "statements": { + {Words(``, `\b`, `namespace`, `operator`, `template`, `this`, `using`, `constexpr`), Keyword, nil}, + {`(enum)\b(\s+)(class)\b(\s*)`, ByGroups(Keyword, Text, Keyword, Text), Push("classname")}, + {`(class|struct|enum|union)\b(\s*)`, ByGroups(Keyword, Text), Push("classname")}, + {`\[\[.+\]\]`, NameAttribute, nil}, + {`(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[LlUu]*`, LiteralNumberFloat, nil}, + {`(\d+\.\d*|\.\d+|\d+[fF])[fF]?`, LiteralNumberFloat, nil}, + {`0[xX]([0-9A-Fa-f]('?[0-9A-Fa-f]+)*)[LlUu]*`, LiteralNumberHex, nil}, + {`0('?[0-7]+)+[LlUu]*`, LiteralNumberOct, nil}, + {`0[Bb][01]('?[01]+)*[LlUu]*`, LiteralNumberBin, nil}, + {`[0-9]('?[0-9]+)*[LlUu]*`, LiteralNumberInteger, nil}, + {`\*/`, Error, nil}, + {`[~!%^&*+=|?:<>/-]`, Operator, nil}, + {`[()\[\],.]`, Punctuation, nil}, + {Words(``, `\b`, `break`, `case`, `const`, `continue`, `do`, `else`, `enum`, `extern`, `for`, `if`, `return`, `sizeof`, `static`, `struct`, `switch`, `typedef`, `union`, `while`), Keyword, nil}, + {`(bool|float|half|long|ptrdiff_t|size_t|unsigned|u?char|u?int((8|16|32|64)_t)?|u?short)\b`, KeywordType, nil}, + {`(bool|float|half|u?(char|int|long|short))(2|3|4)\b`, KeywordType, nil}, + {`packed_(float|half|long|u?(char|int|short))(2|3|4)\b`, KeywordType, nil}, + {`(float|half)(2|3|4)x(2|3|4)\b`, KeywordType, nil}, + {`atomic_u?int\b`, KeywordType, nil}, + {`(rg?(8|16)(u|s)norm|rgba(8|16)(u|s)norm|srgba8unorm|rgb10a2|rg11b10f|rgb9e5)\b`, KeywordType, nil}, + {`(array|depth(2d|cube)(_array)?|depth2d_ms(_array)?|sampler|texture_buffer|texture(1|2)d(_array)?|texture2d_ms(_array)?|texture3d|texturecube(_array)?|uniform|visible_function_table)\b`, KeywordType, nil}, + {`(true|false|NULL)\b`, NameBuiltin, nil}, + {Words(``, `\b`, `device`, `constant`, `ray_data`, `thread`, `threadgroup`, `threadgroup_imageblock`), Keyword, nil}, + {`([a-zA-Z_]\w*)(\s*)(:)(?!:)`, ByGroups(NameLabel, Text, Punctuation), nil}, + {`[a-zA-Z_]\w*`, Name, nil}, + }, + "root": { + Include("whitespace"), + {`(fragment|kernel|vertex)?((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;{]*)(\{)`, ByGroups(Keyword, UsingSelf("root"), NameFunction, UsingSelf("root"), UsingSelf("root"), Punctuation), Push("function")}, + {`(fragment|kernel|vertex)?((?:[\w*\s])+?(?:\s|[*]))([a-zA-Z_]\w*)(\s*\([^;]*?\))([^;]*)(;)`, ByGroups(Keyword, UsingSelf("root"), NameFunction, UsingSelf("root"), UsingSelf("root"), Punctuation), nil}, + Default(Push("statement")), + }, + "classname": { + {`(\[\[.+\]\])(\s*)`, ByGroups(NameAttribute, Text), nil}, + {`[a-zA-Z_]\w*`, NameClass, Pop(1)}, + {`\s*(?=[>{])`, Text, Pop(1)}, + }, + "whitespace": { + {`^#if\s+0`, CommentPreproc, Push("if0")}, + {`^#`, CommentPreproc, Push("macro")}, + {`^(\s*(?:/[*].*?[*]/\s*)?)(#if\s+0)`, ByGroups(UsingSelf("root"), CommentPreproc), Push("if0")}, + {`^(\s*(?:/[*].*?[*]/\s*)?)(#)`, ByGroups(UsingSelf("root"), CommentPreproc), Push("macro")}, + {`\n`, Text, nil}, + {`\s+`, Text, nil}, + {`\\\n`, Text, nil}, + {`//(\n|[\w\W]*?[^\\]\n)`, CommentSingle, nil}, + {`/(\\\n)?[*][\w\W]*?[*](\\\n)?/`, CommentMultiline, nil}, + {`/(\\\n)?[*][\w\W]*`, CommentMultiline, nil}, + }, + "statement": { + Include("whitespace"), + Include("statements"), + {`[{]`, Punctuation, Push("root")}, + {`[;}]`, Punctuation, Pop(1)}, + }, + "function": { + Include("whitespace"), + Include("statements"), + {`;`, Punctuation, nil}, + {`\{`, Punctuation, Push()}, + {`\}`, Punctuation, Pop(1)}, + }, + "macro": { + {`(include)(\s*(?:/[*].*?[*]/\s*)?)([^\n]+)`, ByGroups(CommentPreproc, Text, CommentPreprocFile), nil}, + {`[^/\n]+`, CommentPreproc, nil}, + {`/[*](.|\n)*?[*]/`, CommentMultiline, nil}, + {`//.*?\n`, CommentSingle, Pop(1)}, + {`/`, CommentPreproc, nil}, + {`(?<=\\)\n`, CommentPreproc, nil}, + {`\n`, CommentPreproc, Pop(1)}, + }, + "if0": { + {`^\s*#if.*?(?<!\\)\n`, CommentPreproc, Push()}, + {`^\s*#el(?:se|if).*\n`, CommentPreproc, Pop(1)}, + {`^\s*#endif.*?(?<!\\)\n`, CommentPreproc, Pop(1)}, + {`.*?\n`, Comment, nil}, + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/myghty.go b/vendor/github.com/alecthomas/chroma/lexers/m/myghty.go index 22227c5044..eac082cff6 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/myghty.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/myghty.go @@ -22,13 +22,13 @@ func myghtyRules() Rules { "root": { {`\s+`, Text, nil}, {`(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)(?s)`, ByGroups(NameTag, Text, NameFunction, NameTag, UsingSelf("root"), NameTag), nil}, - {`(<%\w+)(.*?)(>)(.*?)(</%\2\s*>)(?s)`, ByGroups(NameTag, NameFunction, NameTag, Using(Python), NameTag), nil}, - {`(<&[^|])(.*?)(,.*?)?(&>)`, ByGroups(NameTag, NameFunction, Using(Python), NameTag), nil}, - {`(<&\|)(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using(Python), NameTag), nil}, + {`(<%\w+)(.*?)(>)(.*?)(</%\2\s*>)(?s)`, ByGroups(NameTag, NameFunction, NameTag, Using(Python2), NameTag), nil}, + {`(<&[^|])(.*?)(,.*?)?(&>)`, ByGroups(NameTag, NameFunction, Using(Python2), NameTag), nil}, + {`(<&\|)(.*?)(,.*?)?(&>)(?s)`, ByGroups(NameTag, NameFunction, Using(Python2), NameTag), nil}, {`</&>`, NameTag, nil}, - {`(<%!?)(.*?)(%>)(?s)`, ByGroups(NameTag, Using(Python), NameTag), nil}, + {`(<%!?)(.*?)(%>)(?s)`, ByGroups(NameTag, Using(Python2), NameTag), nil}, {`(?<=^)#[^\n]*(\n|\Z)`, Comment, nil}, - {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using(Python), Other), nil}, + {`(?<=^)(%)([^\n]*)(\n|\Z)`, ByGroups(NameTag, Using(Python2), Other), nil}, {`(?sx) (.+?) # anything, followed by: (?: diff --git a/vendor/github.com/alecthomas/chroma/lexers/m/mysql.go b/vendor/github.com/alecthomas/chroma/lexers/m/mysql.go index 7e08e242c7..2738628bf2 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/m/mysql.go +++ b/vendor/github.com/alecthomas/chroma/lexers/m/mysql.go @@ -1,10 +1,17 @@ package m import ( + "regexp" + . "github.com/alecthomas/chroma" // nolint "github.com/alecthomas/chroma/lexers/internal" ) +var ( + mysqlAnalyserNameBetweenBacktickRe = regexp.MustCompile("`[a-zA-Z_]\\w*`") + mysqlAnalyserNameBetweenBracketRe = regexp.MustCompile(`\[[a-zA-Z_]\w*\]`) +) + // MySQL lexer. var MySQL = internal.Register(MustNewLazyLexer( &Config{ @@ -16,7 +23,25 @@ var MySQL = internal.Register(MustNewLazyLexer( CaseInsensitive: true, }, mySQLRules, -)) +).SetAnalyser(func(text string) float32 { + nameBetweenBacktickCount := len(mysqlAnalyserNameBetweenBacktickRe.FindAllString(text, -1)) + nameBetweenBracketCount := len(mysqlAnalyserNameBetweenBracketRe.FindAllString(text, -1)) + + var result float32 + + // Same logic as above in the TSQL analysis. + dialectNameCount := nameBetweenBacktickCount + nameBetweenBracketCount + if dialectNameCount >= 1 && nameBetweenBacktickCount >= (2*nameBetweenBracketCount) { + // Found at least twice as many `name` as [name]. + result += 0.5 + } else if nameBetweenBacktickCount > nameBetweenBracketCount { + result += 0.2 + } else if nameBetweenBacktickCount > 0 { + result += 0.1 + } + + return result +})) func mySQLRules() Rules { return Rules{ diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/powerquery.go b/vendor/github.com/alecthomas/chroma/lexers/p/powerquery.go new file mode 100644 index 0000000000..0302420ea9 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/p/powerquery.go @@ -0,0 +1,38 @@ +package p + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// PowerQuery lexer. +var PowerQuery = internal.Register(MustNewLazyLexer( + &Config{ + Name: "PowerQuery", + Aliases: []string{"powerquery", "pq"}, + Filenames: []string{"*.pq"}, + MimeTypes: []string{"text/x-powerquery"}, + DotAll: true, + CaseInsensitive: true, + }, + powerqueryRules, +)) + +func powerqueryRules() Rules { + return Rules{ + "root": { + {`\s+`, Text, nil}, + {`//.*?\n`, CommentSingle, nil}, + {`/\*.*?\*/`, CommentMultiline, nil}, + {`"(\\\\|\\"|[^"])*"`, LiteralString, nil}, + {`(and|as|each|else|error|false|if|in|is|let|meta|not|null|or|otherwise|section|shared|then|true|try|type)\b`, Keyword, nil}, + {`(#binary|#date|#datetime|#datetimezone|#duration|#infinity|#nan|#sections|#shared|#table|#time)\b`, KeywordType, nil}, + {`(([a-zA-Z]|_)[\w|._]*|#"[^"]+")`, Name, nil}, + {`0[xX][0-9a-fA-F][0-9a-fA-F_]*[lL]?`, LiteralNumberHex, nil}, + {`([0-9]+\.[0-9]+|\.[0-9]+)([eE][0-9]+)?`, LiteralNumberFloat, nil}, + {`[0-9]+`, LiteralNumberInteger, nil}, + {`[\(\)\[\]\{\}]`, Punctuation, nil}, + {`\.\.|\.\.\.|=>|<=|>=|<>|[@!?,;=<>\+\-\*\/&]`, Operator, nil}, + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/python.go b/vendor/github.com/alecthomas/chroma/lexers/p/python.go index 032e487d06..b432a42064 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/p/python.go +++ b/vendor/github.com/alecthomas/chroma/lexers/p/python.go @@ -9,113 +9,173 @@ import ( var Python = internal.Register(MustNewLazyLexer( &Config{ Name: "Python", - Aliases: []string{"python", "py", "sage"}, - Filenames: []string{"*.py", "*.pyw", "*.sc", "SConstruct", "SConscript", "*.tac", "*.sage"}, - MimeTypes: []string{"text/x-python", "application/x-python"}, + Aliases: []string{"python", "py", "sage", "python3", "py3"}, + Filenames: []string{"*.py", "*.pyi", "*.pyw", "*.jy", "*.sage", "*.sc", "SConstruct", "SConscript", "*.bzl", "BUCK", "BUILD", "BUILD.bazel", "WORKSPACE", "*.tac"}, + MimeTypes: []string{"text/x-python", "application/x-python", "text/x-python3", "application/x-python3"}, }, pythonRules, )) func pythonRules() Rules { + const pythonIdentifier = `[A-Z_a-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶ-ͷͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮ-ٯٱ-ۓەۥ-ۦۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴ-ߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࢽऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএ-ঐও-নপ-রলশ-হঽৎড়-ঢ়য়-ৡৰ-ৱৼਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽૐૠ-ૡૹଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽଡ଼-ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠ-ౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠ-ೡೱ-ೲഅ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาเ-ๆກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳱᳵ-ᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪ-ꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽ-ꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﱝﱤ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷹﹱﹳﹷﹹﹻﹽﹿ-ﻼA-Za-zヲ-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ𐀀-𐀋𐀍-𐀦𐀨-𐀺𐀼-𐀽𐀿-𐁍𐁐-𐁝𐂀-𐃺𐅀-𐅴𐊀-𐊜𐊠-𐋐𐌀-𐌟𐌭-𐍊𐍐-𐍵𐎀-𐎝𐎠-𐏃𐏈-𐏏𐏑-𐏕𐐀-𐒝𐒰-𐓓𐓘-𐓻𐔀-𐔧𐔰-𐕣𐘀-𐜶𐝀-𐝕𐝠-𐝧𐠀-𐠅𐠈𐠊-𐠵𐠷-𐠸𐠼𐠿-𐡕𐡠-𐡶𐢀-𐢞𐣠-𐣲𐣴-𐣵𐤀-𐤕𐤠-𐤹𐦀-𐦷𐦾-𐦿𐨀𐨐-𐨓𐨕-𐨗𐨙-𐨵𐩠-𐩼𐪀-𐪜𐫀-𐫇𐫉-𐫤𐬀-𐬵𐭀-𐭕𐭠-𐭲𐮀-𐮑𐰀-𐱈𐲀-𐲲𐳀-𐳲𐴀-𐴣𐼀-𐼜𐼧𐼰-𐽅𑀃-𑀷𑂃-𑂯𑃐-𑃨𑄃-𑄦𑅄𑅐-𑅲𑅶𑆃-𑆲𑇁-𑇄𑇚𑇜𑈀-𑈑𑈓-𑈫𑊀-𑊆𑊈𑊊-𑊍𑊏-𑊝𑊟-𑊨𑊰-𑋞𑌅-𑌌𑌏-𑌐𑌓-𑌨𑌪-𑌰𑌲-𑌳𑌵-𑌹𑌽𑍐𑍝-𑍡𑐀-𑐴𑑇-𑑊𑒀-𑒯𑓄-𑓅𑓇𑖀-𑖮𑗘-𑗛𑘀-𑘯𑙄𑚀-𑚪𑜀-𑜚𑠀-𑠫𑢠-𑣟𑣿𑨀𑨋-𑨲𑨺𑩐𑩜-𑪃𑪆-𑪉𑪝𑫀-𑫸𑰀-𑰈𑰊-𑰮𑱀𑱲-𑲏𑴀-𑴆𑴈-𑴉𑴋-𑴰𑵆𑵠-𑵥𑵧-𑵨𑵪-𑶉𑶘𑻠-𑻲𒀀-𒎙𒐀-𒑮𒒀-𒕃𓀀-𓐮𔐀-𔙆𖠀-𖨸𖩀-𖩞𖫐-𖫭𖬀-𖬯𖭀-𖭃𖭣-𖭷𖭽-𖮏𖹀-𖹿𖼀-𖽄𖽐𖾓-𖾟𖿠-𖿡𗀀-𘟱𘠀-𘫲𛀀-𛄞𛅰-𛋻𛰀-𛱪𛱰-𛱼𛲀-𛲈𛲐-𛲙𝐀-𝑔𝑖-𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒹𝒻𝒽-𝓃𝓅-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔞-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕒-𝚥𝚨-𝛀𝛂-𝛚𝛜-𝛺𝛼-𝜔𝜖-𝜴𝜶-𝝎𝝐-𝝮𝝰-𝞈𝞊-𝞨𝞪-𝟂𝟄-𝟋𞠀-𞣄𞤀-𞥃𞸀-𞸃𞸅-𞸟𞸡-𞸢𞸤𞸧𞸩-𞸲𞸴-𞸷𞸹𞸻𞹂𞹇𞹉𞹋𞹍-𞹏𞹑-𞹒𞹔𞹗𞹙𞹛𞹝𞹟𞹡-𞹢𞹤𞹧-𞹪𞹬-𞹲𞹴-𞹷𞹹-𞹼𞹾𞺀-𞺉𞺋-𞺛𞺡-𞺣𞺥-𞺩𞺫-𞺻𠀀-𪛖𪜀-𫜴𫝀-𫠝𫠠-𬺡𬺰-𮯠丽-𪘀][0-9A-Z_a-zªµ·ºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶ-ͷͻ-ͽͿΆ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙՠ-ֈ֑-ֽֿׁ-ׂׄ-ׇׅא-תׯ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺ߽ࠀ-࠭ࡀ-࡛ࡠ-ࡪࢠ-ࢴࢶ-ࢽ࣓-ࣣ࣡-ॣ०-९ॱ-ঃঅ-ঌএ-ঐও-নপ-রলশ-হ়-ৄে-ৈো-ৎৗড়-ঢ়য়-ৣ০-ৱৼ৾ਁ-ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹ਼ਾ-ੂੇ-ੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ૹ-૿ଁ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହ଼-ୄେ-ୈୋ-୍ୖ-ୗଡ଼-ଢ଼ୟ-ୣ୦-୯ୱஂ-ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕ-ౖౘ-ౚౠ-ౣ౦-౯ಀ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕ-ೖೞೠ-ೣ೦-೯ೱ-ೲഀ-ഃഅ-ഌഎ-ഐഒ-ൄെ-ൈൊ-ൎൔ-ൗൟ-ൣ൦-൯ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲ-ෳก-ฺเ-๎๐-๙ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘-༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟፩-፱ᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲ-ᝳក-៓ៗៜ-៝០-៩᠋-᠍᠐-᠙ᠠ-ᡸᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿ᳐-᳔᳒-᳹ᴀ-᷹᷻-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿-⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙-゚ゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿯ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞹꟷ-ꠧꡀ-ꡳꢀ-ꣅ꣐-꣙꣠-ꣷꣻꣽ-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭥꭰ-ꯪ꯬-꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﱝﱤ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷹ︀-️︠-︯︳-︴﹍-﹏ﹱﹳﹷﹹﹻﹽﹿ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ𐀀-𐀋𐀍-𐀦𐀨-𐀺𐀼-𐀽𐀿-𐁍𐁐-𐁝𐂀-𐃺𐅀-𐅴𐇽𐊀-𐊜𐊠-𐋐𐋠𐌀-𐌟𐌭-𐍊𐍐-𐍺𐎀-𐎝𐎠-𐏃𐏈-𐏏𐏑-𐏕𐐀-𐒝𐒠-𐒩𐒰-𐓓𐓘-𐓻𐔀-𐔧𐔰-𐕣𐘀-𐜶𐝀-𐝕𐝠-𐝧𐠀-𐠅𐠈𐠊-𐠵𐠷-𐠸𐠼𐠿-𐡕𐡠-𐡶𐢀-𐢞𐣠-𐣲𐣴-𐣵𐤀-𐤕𐤠-𐤹𐦀-𐦷𐦾-𐦿𐨀-𐨃𐨅-𐨆𐨌-𐨓𐨕-𐨗𐨙-𐨵𐨸-𐨿𐨺𐩠-𐩼𐪀-𐪜𐫀-𐫇𐫉-𐫦𐬀-𐬵𐭀-𐭕𐭠-𐭲𐮀-𐮑𐰀-𐱈𐲀-𐲲𐳀-𐳲𐴀-𐴧𐴰-𐴹𐼀-𐼜𐼧𐼰-𐽐𑀀-𑁆𑁦-𑁯𑁿-𑂺𑃐-𑃨𑃰-𑃹𑄀-𑄴𑄶-𑄿𑅄-𑅆𑅐-𑅳𑅶𑆀-𑇄𑇉-𑇌𑇐-𑇚𑇜𑈀-𑈑𑈓-𑈷𑈾𑊀-𑊆𑊈𑊊-𑊍𑊏-𑊝𑊟-𑊨𑊰-𑋪𑋰-𑋹𑌀-𑌃𑌅-𑌌𑌏-𑌐𑌓-𑌨𑌪-𑌰𑌲-𑌳𑌵-𑌹𑌻-𑍄𑍇-𑍈𑍋-𑍍𑍐𑍗𑍝-𑍣𑍦-𑍬𑍰-𑍴𑐀-𑑊𑑐-𑑙𑑞𑒀-𑓅𑓇𑓐-𑓙𑖀-𑖵𑖸-𑗀𑗘-𑗝𑘀-𑙀𑙄𑙐-𑙙𑚀-𑚷𑛀-𑛉𑜀-𑜚𑜝-𑜫𑜰-𑜹𑠀-𑠺𑢠-𑣩𑣿𑨀-𑨾𑩇𑩐-𑪃𑪆-𑪙𑪝𑫀-𑫸𑰀-𑰈𑰊-𑰶𑰸-𑱀𑱐-𑱙𑱲-𑲏𑲒-𑲧𑲩-𑲶𑴀-𑴆𑴈-𑴉𑴋-𑴶𑴺𑴼-𑴽𑴿-𑵇𑵐-𑵙𑵠-𑵥𑵧-𑵨𑵪-𑶎𑶐-𑶑𑶓-𑶘𑶠-𑶩𑻠-𑻶𒀀-𒎙𒐀-𒑮𒒀-𒕃𓀀-𓐮𔐀-𔙆𖠀-𖨸𖩀-𖩞𖩠-𖩩𖫐-𖫭𖫰-𖫴𖬀-𖬶𖭀-𖭃𖭐-𖭙𖭣-𖭷𖭽-𖮏𖹀-𖹿𖼀-𖽄𖽐-𖽾𖾏-𖾟𖿠-𖿡𗀀-𘟱𘠀-𘫲𛀀-𛄞𛅰-𛋻𛰀-𛱪𛱰-𛱼𛲀-𛲈𛲐-𛲙𛲝-𛲞𝅥-𝅩𝅭-𝅲𝅻-𝆂𝆅-𝆋𝆪-𝆭𝉂-𝉄𝐀-𝑔𝑖-𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒹𝒻𝒽-𝓃𝓅-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔞-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕒-𝚥𝚨-𝛀𝛂-𝛚𝛜-𝛺𝛼-𝜔𝜖-𝜴𝜶-𝝎𝝐-𝝮𝝰-𝞈𝞊-𝞨𝞪-𝟂𝟄-𝟋𝟎-𝟿𝨀-𝨶𝨻-𝩬𝩵𝪄𝪛-𝪟𝪡-𝪯𞀀-𞀆𞀈-𞀘𞀛-𞀡𞀣-𞀤𞀦-𞀪𞠀-𞣄𞣐-𞣖𞤀-𞥊𞥐-𞥙𞸀-𞸃𞸅-𞸟𞸡-𞸢𞸤𞸧𞸩-𞸲𞸴-𞸷𞸹𞸻𞹂𞹇𞹉𞹋𞹍-𞹏𞹑-𞹒𞹔𞹗𞹙𞹛𞹝𞹟𞹡-𞹢𞹤𞹧-𞹪𞹬-𞹲𞹴-𞹷𞹹-𞹼𞹾𞺀-𞺉𞺋-𞺛𞺡-𞺣𞺥-𞺩𞺫-𞺻𠀀-𪛖𪜀-𫜴𫝀-𫠝𫠠-𬺡𬺰-𮯠丽-𪘀󠄀-󠇯]*` + return Rules{ "root": { {`\n`, Text, nil}, {`^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, {`^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, - {`[^\S\n]+`, Text, nil}, {`\A#!.+$`, CommentHashbang, nil}, {`#.*$`, CommentSingle, nil}, - {`[]{}:(),;[]`, Punctuation, nil}, {`\\\n`, Text, nil}, {`\\`, Text, nil}, - {`(in|is|and|or|not)\b`, OperatorWord, nil}, - {`!=|==|<<|>>|[-~+/*%=<>&^|.]`, Operator, nil}, Include("keywords"), {`(def)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("funcname")}, {`(class)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("classname")}, {`(from)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("fromimport")}, {`(import)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("import")}, - Include("builtins"), - Include("magicfuncs"), - Include("magicvars"), - Include("backtick"), - {`([rR]|[uUbB][rR]|[rR][uUbB])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("sqs")}, + Include("expr"), + }, + "expr": { + {`(?i)(rf|fr)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("rfstringescape", "tdqf")}, + {`(?i)(rf|fr)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("rfstringescape", "tsqf")}, + {`(?i)(rf|fr)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("rfstringescape", "dqf")}, + {`(?i)(rf|fr)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("rfstringescape", "sqf")}, + {`([fF])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("fstringescape", "tdqf")}, + {`([fF])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("fstringescape", "tsqf")}, + {`([fF])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("fstringescape", "dqf")}, + {`([fF])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("fstringescape", "sqf")}, + {`(?i)(rb|br|r)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")}, + {`(?i)(rb|br|r)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")}, + {`(?i)(rb|br|r)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")}, + {`(?i)(rb|br|r)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("sqs")}, {`([uUbB]?)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "tdqs")}, {`([uUbB]?)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "tsqs")}, {`([uUbB]?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "dqs")}, {`([uUbB]?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "sqs")}, - Include("name"), + {`[^\S\n]+`, Text, nil}, Include("numbers"), + {`!=|==|<<|>>|:=|[-~+/*%=<>&^|.]`, Operator, nil}, + {`[]{}:(),;[]`, Punctuation, nil}, + {`(in|is|and|or|not)\b`, OperatorWord, nil}, + Include("expr-keywords"), + Include("builtins"), + Include("magicfuncs"), + Include("magicvars"), + Include("name"), + }, + "expr-inside-fstring": { + {`[{([]`, Punctuation, Push("expr-inside-fstring-inner")}, + {`(=\s*)?(\![sraf])?\}`, LiteralStringInterpol, Pop(1)}, + {`(=\s*)?(\![sraf])?:`, LiteralStringInterpol, Pop(1)}, + {`\s+`, Text, nil}, + Include("expr"), + }, + "expr-inside-fstring-inner": { + {`[{([]`, Punctuation, Push("expr-inside-fstring-inner")}, + {`[])}]`, Punctuation, Pop(1)}, + {`\s+`, Text, nil}, + Include("expr"), + }, + "expr-keywords": { + {Words(``, `\b`, `async for`, `await`, `else`, `for`, `if`, `lambda`, `yield`, `yield from`), Keyword, nil}, + {Words(``, `\b`, `True`, `False`, `None`), KeywordConstant, nil}, }, "keywords": { - {Words(``, `\b`, `assert`, `break`, `continue`, `del`, `elif`, `else`, `except`, `exec`, `finally`, `for`, `global`, `if`, `lambda`, `pass`, `print`, `raise`, `return`, `try`, `while`, `yield`, `yield from`, `as`, `with`), Keyword, nil}, + {Words(``, `\b`, `assert`, `async`, `await`, `break`, `continue`, `del`, `elif`, `else`, `except`, `finally`, `for`, `global`, `if`, `lambda`, `pass`, `raise`, `nonlocal`, `return`, `try`, `while`, `yield`, `yield from`, `as`, `with`), Keyword, nil}, + {Words(``, `\b`, `True`, `False`, `None`), KeywordConstant, nil}, }, "builtins": { - {Words(`(?<!\.)`, `\b`, `__import__`, `abs`, `all`, `any`, `apply`, `basestring`, `bin`, `bool`, `buffer`, `bytearray`, `bytes`, `callable`, `chr`, `classmethod`, `cmp`, `coerce`, `compile`, `complex`, `delattr`, `dict`, `dir`, `divmod`, `enumerate`, `eval`, `execfile`, `exit`, `file`, `filter`, `float`, `frozenset`, `getattr`, `globals`, `hasattr`, `hash`, `hex`, `id`, `input`, `int`, `intern`, `isinstance`, `issubclass`, `iter`, `len`, `list`, `locals`, `long`, `map`, `max`, `min`, `next`, `object`, `oct`, `open`, `ord`, `pow`, `property`, `range`, `raw_input`, `reduce`, `reload`, `repr`, `reversed`, `round`, `set`, `setattr`, `slice`, `sorted`, `staticmethod`, `str`, `sum`, `super`, `tuple`, `type`, `unichr`, `unicode`, `vars`, `xrange`, `zip`), NameBuiltin, nil}, - {`(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|cls)\b`, NameBuiltinPseudo, nil}, - {Words(`(?<!\.)`, `\b`, `ArithmeticError`, `AssertionError`, `AttributeError`, `BaseException`, `DeprecationWarning`, `EOFError`, `EnvironmentError`, `Exception`, `FloatingPointError`, `FutureWarning`, `GeneratorExit`, `IOError`, `ImportError`, `ImportWarning`, `IndentationError`, `IndexError`, `KeyError`, `KeyboardInterrupt`, `LookupError`, `MemoryError`, `NameError`, `NotImplemented`, `NotImplementedError`, `OSError`, `OverflowError`, `OverflowWarning`, `PendingDeprecationWarning`, `ReferenceError`, `RuntimeError`, `RuntimeWarning`, `StandardError`, `StopIteration`, `SyntaxError`, `SyntaxWarning`, `SystemError`, `SystemExit`, `TabError`, `TypeError`, `UnboundLocalError`, `UnicodeDecodeError`, `UnicodeEncodeError`, `UnicodeError`, `UnicodeTranslateError`, `UnicodeWarning`, `UserWarning`, `ValueError`, `VMSError`, `Warning`, `WindowsError`, `ZeroDivisionError`), NameException, nil}, + {Words(`(?<!\.)`, `\b`, `__import__`, `abs`, `all`, `any`, `bin`, `bool`, `bytearray`, `bytes`, `chr`, `classmethod`, `compile`, `complex`, `delattr`, `dict`, `dir`, `divmod`, `enumerate`, `eval`, `filter`, `float`, `format`, `frozenset`, `getattr`, `globals`, `hasattr`, `hash`, `hex`, `id`, `input`, `int`, `isinstance`, `issubclass`, `iter`, `len`, `list`, `locals`, `map`, `max`, `memoryview`, `min`, `next`, `object`, `oct`, `open`, `ord`, `pow`, `print`, `property`, `range`, `repr`, `reversed`, `round`, `set`, `setattr`, `slice`, `sorted`, `staticmethod`, `str`, `sum`, `super`, `tuple`, `type`, `vars`, `zip`), NameBuiltin, nil}, + {`(?<!\.)(self|Ellipsis|NotImplemented|cls)\b`, NameBuiltinPseudo, nil}, + {Words(`(?<!\.)`, `\b`, `ArithmeticError`, `AssertionError`, `AttributeError`, `BaseException`, `BufferError`, `BytesWarning`, `DeprecationWarning`, `EOFError`, `EnvironmentError`, `Exception`, `FloatingPointError`, `FutureWarning`, `GeneratorExit`, `IOError`, `ImportError`, `ImportWarning`, `IndentationError`, `IndexError`, `KeyError`, `KeyboardInterrupt`, `LookupError`, `MemoryError`, `NameError`, `NotImplementedError`, `OSError`, `OverflowError`, `PendingDeprecationWarning`, `ReferenceError`, `ResourceWarning`, `RuntimeError`, `RuntimeWarning`, `StopIteration`, `SyntaxError`, `SyntaxWarning`, `SystemError`, `SystemExit`, `TabError`, `TypeError`, `UnboundLocalError`, `UnicodeDecodeError`, `UnicodeEncodeError`, `UnicodeError`, `UnicodeTranslateError`, `UnicodeWarning`, `UserWarning`, `ValueError`, `VMSError`, `Warning`, `WindowsError`, `ZeroDivisionError`, `BlockingIOError`, `ChildProcessError`, `ConnectionError`, `BrokenPipeError`, `ConnectionAbortedError`, `ConnectionRefusedError`, `ConnectionResetError`, `FileExistsError`, `FileNotFoundError`, `InterruptedError`, `IsADirectoryError`, `NotADirectoryError`, `PermissionError`, `ProcessLookupError`, `TimeoutError`, `StopAsyncIteration`, `ModuleNotFoundError`, `RecursionError`), NameException, nil}, }, "magicfuncs": { - {Words(``, `\b`, `__abs__`, `__add__`, `__and__`, `__call__`, `__cmp__`, `__coerce__`, `__complex__`, `__contains__`, `__del__`, `__delattr__`, `__delete__`, `__delitem__`, `__delslice__`, `__div__`, `__divmod__`, `__enter__`, `__eq__`, `__exit__`, `__float__`, `__floordiv__`, `__ge__`, `__get__`, `__getattr__`, `__getattribute__`, `__getitem__`, `__getslice__`, `__gt__`, `__hash__`, `__hex__`, `__iadd__`, `__iand__`, `__idiv__`, `__ifloordiv__`, `__ilshift__`, `__imod__`, `__imul__`, `__index__`, `__init__`, `__instancecheck__`, `__int__`, `__invert__`, `__iop__`, `__ior__`, `__ipow__`, `__irshift__`, `__isub__`, `__iter__`, `__itruediv__`, `__ixor__`, `__le__`, `__len__`, `__long__`, `__lshift__`, `__lt__`, `__missing__`, `__mod__`, `__mul__`, `__ne__`, `__neg__`, `__new__`, `__nonzero__`, `__oct__`, `__op__`, `__or__`, `__pos__`, `__pow__`, `__radd__`, `__rand__`, `__rcmp__`, `__rdiv__`, `__rdivmod__`, `__repr__`, `__reversed__`, `__rfloordiv__`, `__rlshift__`, `__rmod__`, `__rmul__`, `__rop__`, `__ror__`, `__rpow__`, `__rrshift__`, `__rshift__`, `__rsub__`, `__rtruediv__`, `__rxor__`, `__set__`, `__setattr__`, `__setitem__`, `__setslice__`, `__str__`, `__sub__`, `__subclasscheck__`, `__truediv__`, `__unicode__`, `__xor__`), NameFunctionMagic, nil}, + {Words(``, `\b`, `__abs__`, `__add__`, `__aenter__`, `__aexit__`, `__aiter__`, `__and__`, `__anext__`, `__await__`, `__bool__`, `__bytes__`, `__call__`, `__complex__`, `__contains__`, `__del__`, `__delattr__`, `__delete__`, `__delitem__`, `__dir__`, `__divmod__`, `__enter__`, `__eq__`, `__exit__`, `__float__`, `__floordiv__`, `__format__`, `__ge__`, `__get__`, `__getattr__`, `__getattribute__`, `__getitem__`, `__gt__`, `__hash__`, `__iadd__`, `__iand__`, `__ifloordiv__`, `__ilshift__`, `__imatmul__`, `__imod__`, `__imul__`, `__index__`, `__init__`, `__instancecheck__`, `__int__`, `__invert__`, `__ior__`, `__ipow__`, `__irshift__`, `__isub__`, `__iter__`, `__itruediv__`, `__ixor__`, `__le__`, `__len__`, `__length_hint__`, `__lshift__`, `__lt__`, `__matmul__`, `__missing__`, `__mod__`, `__mul__`, `__ne__`, `__neg__`, `__new__`, `__next__`, `__or__`, `__pos__`, `__pow__`, `__prepare__`, `__radd__`, `__rand__`, `__rdivmod__`, `__repr__`, `__reversed__`, `__rfloordiv__`, `__rlshift__`, `__rmatmul__`, `__rmod__`, `__rmul__`, `__ror__`, `__round__`, `__rpow__`, `__rrshift__`, `__rshift__`, `__rsub__`, `__rtruediv__`, `__rxor__`, `__set__`, `__setattr__`, `__setitem__`, `__str__`, `__sub__`, `__subclasscheck__`, `__truediv__`, `__xor__`), NameFunctionMagic, nil}, }, "magicvars": { - {Words(``, `\b`, `__bases__`, `__class__`, `__closure__`, `__code__`, `__defaults__`, `__dict__`, `__doc__`, `__file__`, `__func__`, `__globals__`, `__metaclass__`, `__module__`, `__mro__`, `__name__`, `__self__`, `__slots__`, `__weakref__`), NameVariableMagic, nil}, + {Words(``, `\b`, `__annotations__`, `__bases__`, `__class__`, `__closure__`, `__code__`, `__defaults__`, `__dict__`, `__doc__`, `__file__`, `__func__`, `__globals__`, `__kwdefaults__`, `__module__`, `__mro__`, `__name__`, `__objclass__`, `__qualname__`, `__self__`, `__slots__`, `__weakref__`), NameVariableMagic, nil}, }, "numbers": { - {`(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?`, LiteralNumberFloat, nil}, - {`\d+[eE][+-]?[0-9]+j?`, LiteralNumberFloat, nil}, - {`0[0-7]+j?`, LiteralNumberOct, nil}, - {`0[bB][01]+`, LiteralNumberBin, nil}, - {`0[xX][a-fA-F0-9_]+`, LiteralNumberHex, nil}, - {`\d+L`, LiteralNumberIntegerLong, nil}, - {`[\d_]+j?`, LiteralNumberInteger, nil}, - }, - "backtick": { - {"`.*?`", LiteralStringBacktick, nil}, + {`(\d(?:_?\d)*\.(?:\d(?:_?\d)*)?|(?:\d(?:_?\d)*)?\.\d(?:_?\d)*)([eE][+-]?\d(?:_?\d)*)?`, LiteralNumberFloat, nil}, + {`\d(?:_?\d)*[eE][+-]?\d(?:_?\d)*j?`, LiteralNumberFloat, nil}, + {`0[oO](?:_?[0-7])+`, LiteralNumberOct, nil}, + {`0[bB](?:_?[01])+`, LiteralNumberBin, nil}, + {`0[xX](?:_?[a-fA-F0-9])+`, LiteralNumberHex, nil}, + {`\d(?:_?\d)*`, LiteralNumberInteger, nil}, }, "name": { - {`@[\w.]+`, NameDecorator, nil}, - {`[a-zA-Z_]\w*`, Name, nil}, + {`@` + pythonIdentifier, NameDecorator, nil}, + {`@`, Operator, nil}, + {pythonIdentifier, Name, nil}, }, "funcname": { Include("magicfuncs"), - {`[a-zA-Z_]\w*`, NameFunction, Pop(1)}, + {pythonIdentifier, NameFunction, Pop(1)}, Default(Pop(1)), }, "classname": { - {`[a-zA-Z_]\w*`, NameClass, Pop(1)}, + {pythonIdentifier, NameClass, Pop(1)}, }, "import": { - {`(?:[ \t]|\\\n)+`, Text, nil}, - {`as\b`, KeywordNamespace, nil}, - {`,`, Operator, nil}, - {`[a-zA-Z_][\w.]*`, NameNamespace, nil}, + {`(\s+)(as)(\s+)`, ByGroups(Text, Keyword, Text), nil}, + {`\.`, NameNamespace, nil}, + {pythonIdentifier, NameNamespace, nil}, + {`(\s*)(,)(\s*)`, ByGroups(Text, Operator, Text), nil}, Default(Pop(1)), }, "fromimport": { - {`(?:[ \t]|\\\n)+`, Text, nil}, - {`import\b`, KeywordNamespace, Pop(1)}, + {`(\s+)(import)\b`, ByGroups(Text, KeywordNamespace), Pop(1)}, + {`\.`, NameNamespace, nil}, {`None\b`, NameBuiltinPseudo, Pop(1)}, - {`[a-zA-Z_.][\w.]*`, NameNamespace, nil}, + {pythonIdentifier, NameNamespace, nil}, Default(Pop(1)), }, + "rfstringescape": { + {`\{\{`, LiteralStringEscape, nil}, + {`\}\}`, LiteralStringEscape, nil}, + }, + "fstringescape": { + Include("rfstringescape"), + Include("stringescape"), + }, "stringescape": { {`\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})`, LiteralStringEscape, nil}, }, + "fstrings-single": { + {`\}`, LiteralStringInterpol, nil}, + {`\{`, LiteralStringInterpol, Push("expr-inside-fstring")}, + {`[^\\\'"{}\n]+`, LiteralStringSingle, nil}, + {`[\'"\\]`, LiteralStringSingle, nil}, + }, + "fstrings-double": { + {`\}`, LiteralStringInterpol, nil}, + {`\{`, LiteralStringInterpol, Push("expr-inside-fstring")}, + {`[^\\\'"{}\n]+`, LiteralStringDouble, nil}, + {`[\'"\\]`, LiteralStringDouble, nil}, + }, "strings-single": { - {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, - {`[^\\\'"%\n]+`, LiteralStringSingle, nil}, + {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsaux%]`, LiteralStringInterpol, nil}, + {`\{((\w+)((\.\w+)|(\[[^\]]+\]))*)?(\![sra])?(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}`, LiteralStringInterpol, nil}, + {`[^\\\'"%{\n]+`, LiteralStringSingle, nil}, {`[\'"\\]`, LiteralStringSingle, nil}, - {`%`, LiteralStringSingle, nil}, + {`%|(\{{1,2})`, LiteralStringSingle, nil}, }, "strings-double": { - {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, - {`[^\\\'"%\n]+`, LiteralStringDouble, nil}, + {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsaux%]`, LiteralStringInterpol, nil}, + {`\{((\w+)((\.\w+)|(\[[^\]]+\]))*)?(\![sra])?(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}`, LiteralStringInterpol, nil}, + {`[^\\\'"%{\n]+`, LiteralStringDouble, nil}, {`[\'"\\]`, LiteralStringDouble, nil}, - {`%`, LiteralStringDouble, nil}, + {`%|(\{{1,2})`, LiteralStringDouble, nil}, + }, + "dqf": { + {`"`, LiteralStringDouble, Pop(1)}, + {`\\\\|\\"|\\\n`, LiteralStringEscape, nil}, + Include("fstrings-double"), + }, + "sqf": { + {`'`, LiteralStringSingle, Pop(1)}, + {`\\\\|\\'|\\\n`, LiteralStringEscape, nil}, + Include("fstrings-single"), }, "dqs": { {`"`, LiteralStringDouble, Pop(1)}, @@ -127,6 +187,16 @@ func pythonRules() Rules { {`\\\\|\\'|\\\n`, LiteralStringEscape, nil}, Include("strings-single"), }, + "tdqf": { + {`"""`, LiteralStringDouble, Pop(1)}, + Include("fstrings-double"), + {`\n`, LiteralStringDouble, nil}, + }, + "tsqf": { + {`'''`, LiteralStringSingle, Pop(1)}, + Include("fstrings-single"), + {`\n`, LiteralStringSingle, nil}, + }, "tdqs": { {`"""`, LiteralStringDouble, Pop(1)}, Include("strings-double"), diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/python2.go b/vendor/github.com/alecthomas/chroma/lexers/p/python2.go new file mode 100644 index 0000000000..f1f60360b2 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/p/python2.go @@ -0,0 +1,141 @@ +package p + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" +) + +// Python2 lexer. +var Python2 = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Python 2", + Aliases: []string{"python2", "py2"}, + Filenames: []string{}, + MimeTypes: []string{"text/x-python2", "application/x-python2"}, + }, + python2Rules, +)) + +func python2Rules() Rules { + return Rules{ + "root": { + {`\n`, Text, nil}, + {`^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, + {`^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, + {`[^\S\n]+`, Text, nil}, + {`\A#!.+$`, CommentHashbang, nil}, + {`#.*$`, CommentSingle, nil}, + {`[]{}:(),;[]`, Punctuation, nil}, + {`\\\n`, Text, nil}, + {`\\`, Text, nil}, + {`(in|is|and|or|not)\b`, OperatorWord, nil}, + {`!=|==|<<|>>|[-~+/*%=<>&^|.]`, Operator, nil}, + Include("keywords"), + {`(def)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("funcname")}, + {`(class)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("classname")}, + {`(from)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("fromimport")}, + {`(import)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("import")}, + Include("builtins"), + Include("magicfuncs"), + Include("magicvars"), + Include("backtick"), + {`([rR]|[uUbB][rR]|[rR][uUbB])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")}, + {`([rR]|[uUbB][rR]|[rR][uUbB])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("sqs")}, + {`([uUbB]?)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "tdqs")}, + {`([uUbB]?)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "tsqs")}, + {`([uUbB]?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "dqs")}, + {`([uUbB]?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "sqs")}, + Include("name"), + Include("numbers"), + }, + "keywords": { + {Words(``, `\b`, `assert`, `break`, `continue`, `del`, `elif`, `else`, `except`, `exec`, `finally`, `for`, `global`, `if`, `lambda`, `pass`, `print`, `raise`, `return`, `try`, `while`, `yield`, `yield from`, `as`, `with`), Keyword, nil}, + }, + "builtins": { + {Words(`(?<!\.)`, `\b`, `__import__`, `abs`, `all`, `any`, `apply`, `basestring`, `bin`, `bool`, `buffer`, `bytearray`, `bytes`, `callable`, `chr`, `classmethod`, `cmp`, `coerce`, `compile`, `complex`, `delattr`, `dict`, `dir`, `divmod`, `enumerate`, `eval`, `execfile`, `exit`, `file`, `filter`, `float`, `frozenset`, `getattr`, `globals`, `hasattr`, `hash`, `hex`, `id`, `input`, `int`, `intern`, `isinstance`, `issubclass`, `iter`, `len`, `list`, `locals`, `long`, `map`, `max`, `min`, `next`, `object`, `oct`, `open`, `ord`, `pow`, `property`, `range`, `raw_input`, `reduce`, `reload`, `repr`, `reversed`, `round`, `set`, `setattr`, `slice`, `sorted`, `staticmethod`, `str`, `sum`, `super`, `tuple`, `type`, `unichr`, `unicode`, `vars`, `xrange`, `zip`), NameBuiltin, nil}, + {`(?<!\.)(self|None|Ellipsis|NotImplemented|False|True|cls)\b`, NameBuiltinPseudo, nil}, + {Words(`(?<!\.)`, `\b`, `ArithmeticError`, `AssertionError`, `AttributeError`, `BaseException`, `DeprecationWarning`, `EOFError`, `EnvironmentError`, `Exception`, `FloatingPointError`, `FutureWarning`, `GeneratorExit`, `IOError`, `ImportError`, `ImportWarning`, `IndentationError`, `IndexError`, `KeyError`, `KeyboardInterrupt`, `LookupError`, `MemoryError`, `NameError`, `NotImplementedError`, `OSError`, `OverflowError`, `OverflowWarning`, `PendingDeprecationWarning`, `ReferenceError`, `RuntimeError`, `RuntimeWarning`, `StandardError`, `StopIteration`, `SyntaxError`, `SyntaxWarning`, `SystemError`, `SystemExit`, `TabError`, `TypeError`, `UnboundLocalError`, `UnicodeDecodeError`, `UnicodeEncodeError`, `UnicodeError`, `UnicodeTranslateError`, `UnicodeWarning`, `UserWarning`, `ValueError`, `VMSError`, `Warning`, `WindowsError`, `ZeroDivisionError`), NameException, nil}, + }, + "magicfuncs": { + {Words(``, `\b`, `__abs__`, `__add__`, `__and__`, `__call__`, `__cmp__`, `__coerce__`, `__complex__`, `__contains__`, `__del__`, `__delattr__`, `__delete__`, `__delitem__`, `__delslice__`, `__div__`, `__divmod__`, `__enter__`, `__eq__`, `__exit__`, `__float__`, `__floordiv__`, `__ge__`, `__get__`, `__getattr__`, `__getattribute__`, `__getitem__`, `__getslice__`, `__gt__`, `__hash__`, `__hex__`, `__iadd__`, `__iand__`, `__idiv__`, `__ifloordiv__`, `__ilshift__`, `__imod__`, `__imul__`, `__index__`, `__init__`, `__instancecheck__`, `__int__`, `__invert__`, `__iop__`, `__ior__`, `__ipow__`, `__irshift__`, `__isub__`, `__iter__`, `__itruediv__`, `__ixor__`, `__le__`, `__len__`, `__long__`, `__lshift__`, `__lt__`, `__missing__`, `__mod__`, `__mul__`, `__ne__`, `__neg__`, `__new__`, `__nonzero__`, `__oct__`, `__op__`, `__or__`, `__pos__`, `__pow__`, `__radd__`, `__rand__`, `__rcmp__`, `__rdiv__`, `__rdivmod__`, `__repr__`, `__reversed__`, `__rfloordiv__`, `__rlshift__`, `__rmod__`, `__rmul__`, `__rop__`, `__ror__`, `__rpow__`, `__rrshift__`, `__rshift__`, `__rsub__`, `__rtruediv__`, `__rxor__`, `__set__`, `__setattr__`, `__setitem__`, `__setslice__`, `__str__`, `__sub__`, `__subclasscheck__`, `__truediv__`, `__unicode__`, `__xor__`), NameFunctionMagic, nil}, + }, + "magicvars": { + {Words(``, `\b`, `__bases__`, `__class__`, `__closure__`, `__code__`, `__defaults__`, `__dict__`, `__doc__`, `__file__`, `__func__`, `__globals__`, `__metaclass__`, `__module__`, `__mro__`, `__name__`, `__self__`, `__slots__`, `__weakref__`), NameVariableMagic, nil}, + }, + "numbers": { + {`(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?j?`, LiteralNumberFloat, nil}, + {`\d+[eE][+-]?[0-9]+j?`, LiteralNumberFloat, nil}, + {`0[0-7]+j?`, LiteralNumberOct, nil}, + {`0[bB][01]+`, LiteralNumberBin, nil}, + {`0[xX][a-fA-F0-9]+`, LiteralNumberHex, nil}, + {`\d+L`, LiteralNumberIntegerLong, nil}, + {`\d+j?`, LiteralNumberInteger, nil}, + }, + "backtick": { + {"`.*?`", LiteralStringBacktick, nil}, + }, + "name": { + {`@[\w.]+`, NameDecorator, nil}, + {`[a-zA-Z_]\w*`, Name, nil}, + }, + "funcname": { + Include("magicfuncs"), + {`[a-zA-Z_]\w*`, NameFunction, Pop(1)}, + Default(Pop(1)), + }, + "classname": { + {`[a-zA-Z_]\w*`, NameClass, Pop(1)}, + }, + "import": { + {`(?:[ \t]|\\\n)+`, Text, nil}, + {`as\b`, KeywordNamespace, nil}, + {`,`, Operator, nil}, + {`[a-zA-Z_][\w.]*`, NameNamespace, nil}, + Default(Pop(1)), + }, + "fromimport": { + {`(?:[ \t]|\\\n)+`, Text, nil}, + {`import\b`, KeywordNamespace, Pop(1)}, + {`None\b`, NameBuiltinPseudo, Pop(1)}, + {`[a-zA-Z_.][\w.]*`, NameNamespace, nil}, + Default(Pop(1)), + }, + "stringescape": { + {`\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})`, LiteralStringEscape, nil}, + }, + "strings-single": { + {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, + {`[^\\\'"%\n]+`, LiteralStringSingle, nil}, + {`[\'"\\]`, LiteralStringSingle, nil}, + {`%`, LiteralStringSingle, nil}, + }, + "strings-double": { + {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, + {`[^\\\'"%\n]+`, LiteralStringDouble, nil}, + {`[\'"\\]`, LiteralStringDouble, nil}, + {`%`, LiteralStringDouble, nil}, + }, + "dqs": { + {`"`, LiteralStringDouble, Pop(1)}, + {`\\\\|\\"|\\\n`, LiteralStringEscape, nil}, + Include("strings-double"), + }, + "sqs": { + {`'`, LiteralStringSingle, Pop(1)}, + {`\\\\|\\'|\\\n`, LiteralStringEscape, nil}, + Include("strings-single"), + }, + "tdqs": { + {`"""`, LiteralStringDouble, Pop(1)}, + Include("strings-double"), + {`\n`, LiteralStringDouble, nil}, + }, + "tsqs": { + {`'''`, LiteralStringSingle, Pop(1)}, + Include("strings-single"), + {`\n`, LiteralStringSingle, nil}, + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/p/python3.go b/vendor/github.com/alecthomas/chroma/lexers/p/python3.go deleted file mode 100644 index a2402b8ff4..0000000000 --- a/vendor/github.com/alecthomas/chroma/lexers/p/python3.go +++ /dev/null @@ -1,141 +0,0 @@ -package p - -import ( - . "github.com/alecthomas/chroma" // nolint - "github.com/alecthomas/chroma/lexers/internal" -) - -// Python3 lexer. -var Python3 = internal.Register(MustNewLazyLexer( - &Config{ - Name: "Python 3", - Aliases: []string{"python3", "py3"}, - Filenames: []string{}, - MimeTypes: []string{"text/x-python3", "application/x-python3"}, - }, - python3Rules, -)) - -func python3Rules() Rules { - const python3Identifier = `[A-Z_a-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶ-ͷͻ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮ-ٯٱ-ۓەۥ-ۦۮ-ۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴ-ߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএ-ঐও-নপ-রলশ-হঽৎড়-ঢ়য়-ৡৰ-ৱਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હઽૐૠ-ૡଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହଽଡ଼-ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘ-ౙౠ-ౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠ-ೡೱ-ೲഅ-ഌഎ-ഐഒ-ഺഽൎൠ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาเ-ๆກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ະາຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥ-ၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮ-ᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵ-ᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪ-ꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵ-ꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﱝﱤ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷹﹱﹳﹷﹹﹻﹽﹿ-ﻼA-Za-zヲ-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ𐀀-𐀋𐀍-𐀦𐀨-𐀺𐀼-𐀽𐀿-𐁍𐁐-𐁝𐂀-𐃺𐅀-𐅴𐊀-𐊜𐊠-𐋐𐌀-𐌞𐌰-𐍊𐎀-𐎝𐎠-𐏃𐏈-𐏏𐏑-𐏕𐐀-𐒝𐠀-𐠅𐠈𐠊-𐠵𐠷-𐠸𐠼𐠿-𐡕𐤀-𐤕𐤠-𐤹𐦀-𐦷𐦾-𐦿𐨀𐨐-𐨓𐨕-𐨗𐨙-𐨳𐩠-𐩼𐬀-𐬵𐭀-𐭕𐭠-𐭲𐰀-𐱈𑀃-𑀷𑂃-𑂯𑃐-𑃨𑄃-𑄦𑆃-𑆲𑇁-𑇄𑚀-𑚪𒀀-𒍮𒐀-𒑢𓀀-𓐮𖠀-𖨸𖼀-𖽄𖽐𖾓-𖾟𛀀-𛀁𝐀-𝑔𝑖-𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒹𝒻𝒽-𝓃𝓅-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔞-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕒-𝚥𝚨-𝛀𝛂-𝛚𝛜-𝛺𝛼-𝜔𝜖-𝜴𝜶-𝝎𝝐-𝝮𝝰-𝞈𝞊-𝞨𝞪-𝟂𝟄-𝟋𞸀-𞸃𞸅-𞸟𞸡-𞸢𞸤𞸧𞸩-𞸲𞸴-𞸷𞸹𞸻𞹂𞹇𞹉𞹋𞹍-𞹏𞹑-𞹒𞹔𞹗𞹙𞹛𞹝𞹟𞹡-𞹢𞹤𞹧-𞹪𞹬-𞹲𞹴-𞹷𞹹-𞹼𞹾𞺀-𞺉𞺋-𞺛𞺡-𞺣𞺥-𞺩𞺫-𞺻𠀀-𪛖𪜀-𫜴𫝀-𫠝丽-𪘀][0-9A-Z_a-zªµ·ºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶ-ͷͻ-ͽΆ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ֽֿׁ-ׂׄ-ׇׅא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএ-ঐও-নপ-রলশ-হ়-ৄে-ৈো-ৎৗড়-ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏ-ਐਓ-ਨਪ-ਰਲ-ਲ਼ਵ-ਸ਼ਸ-ਹ਼ਾ-ੂੇ-ੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલ-ળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏ-ଐଓ-ନପ-ରଲ-ଳଵ-ହ଼-ୄେ-ୈୋ-୍ୖ-ୗଡ଼-ଢ଼ୟ-ୣ୦-୯ୱஂ-ஃஅ-ஊஎ-ஐஒ-கங-சஜஞ-டண-தந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕ-ౖౘ-ౙౠ-ౣ౦-౯ಂ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕ-ೖೞೠ-ೣ೦-೯ೱ-ೲം-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿං-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲ-ෳก-ฺเ-๎๐-๙ກ-ຂຄງ-ຈຊຍດ-ທນ-ຟມ-ຣລວສ-ຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘-༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟፩-፱ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲ-ᝳក-៓ៗៜ-៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧚ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‿-⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙-゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬-꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּ-סּףּ-פּצּ-ﮱﯓ-ﱝﱤ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷹ︀-️︠-︦︳-︴﹍-﹏ﹱﹳﹷﹹﹻﹽﹿ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ𐀀-𐀋𐀍-𐀦𐀨-𐀺𐀼-𐀽𐀿-𐁍𐁐-𐁝𐂀-𐃺𐅀-𐅴𐇽𐊀-𐊜𐊠-𐋐𐌀-𐌞𐌰-𐍊𐎀-𐎝𐎠-𐏃𐏈-𐏏𐏑-𐏕𐐀-𐒝𐒠-𐒩𐠀-𐠅𐠈𐠊-𐠵𐠷-𐠸𐠼𐠿-𐡕𐤀-𐤕𐤠-𐤹𐦀-𐦷𐦾-𐦿𐨀-𐨃𐨅-𐨆𐨌-𐨓𐨕-𐨗𐨙-𐨳𐨸-𐨿𐨺𐩠-𐩼𐬀-𐬵𐭀-𐭕𐭠-𐭲𐰀-𐱈𑀀-𑁆𑁦-𑁯𑂀-𑂺𑃐-𑃨𑃰-𑃹𑄀-𑄴𑄶-𑄿𑆀-𑇄𑇐-𑇙𑚀-𑚷𑛀-𑛉𒀀-𒍮𒐀-𒑢𓀀-𓐮𖠀-𖨸𖼀-𖽄𖽐-𖽾𖾏-𖾟𛀀-𛀁𝅥-𝅩𝅭-𝅲𝅻-𝆂𝆅-𝆋𝆪-𝆭𝉂-𝉄𝐀-𝑔𝑖-𝒜𝒞-𝒟𝒢𝒥-𝒦𝒩-𝒬𝒮-𝒹𝒻𝒽-𝓃𝓅-𝔅𝔇-𝔊𝔍-𝔔𝔖-𝔜𝔞-𝔹𝔻-𝔾𝕀-𝕄𝕆𝕊-𝕐𝕒-𝚥𝚨-𝛀𝛂-𝛚𝛜-𝛺𝛼-𝜔𝜖-𝜴𝜶-𝝎𝝐-𝝮𝝰-𝞈𝞊-𝞨𝞪-𝟂𝟄-𝟋𝟎-𝟿𞸀-𞸃𞸅-𞸟𞸡-𞸢𞸤𞸧𞸩-𞸲𞸴-𞸷𞸹𞸻𞹂𞹇𞹉𞹋𞹍-𞹏𞹑-𞹒𞹔𞹗𞹙𞹛𞹝𞹟𞹡-𞹢𞹤𞹧-𞹪𞹬-𞹲𞹴-𞹷𞹹-𞹼𞹾𞺀-𞺉𞺋-𞺛𞺡-𞺣𞺥-𞺩𞺫-𞺻𠀀-𪛖𪜀-𫜴𫝀-𫠝丽-𪘀󠄀-󠇯]*` - - return Rules{ - "root": { - {`\n`, Text, nil}, - {`^(\s*)([rRuUbB]{,2})("""(?:.|\n)*?""")`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, - {`^(\s*)([rRuUbB]{,2})('''(?:.|\n)*?''')`, ByGroups(Text, LiteralStringAffix, LiteralStringDoc), nil}, - {`[^\S\n]+`, Text, nil}, - {`\A#!.+$`, CommentHashbang, nil}, - {`#.*$`, CommentSingle, nil}, - {`[]{}:(),;[]`, Punctuation, nil}, - {`\\\n`, Text, nil}, - {`\\`, Text, nil}, - {`(in|is|and|or|not)\b`, OperatorWord, nil}, - {`!=|==|<<|>>|[-~+/*%=<>&^|.]`, Operator, nil}, - Include("keywords"), - {`(def)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("funcname")}, - {`(class)((?:\s|\\\s)+)`, ByGroups(Keyword, Text), Push("classname")}, - {`(from)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("fromimport")}, - {`(import)((?:\s|\\\s)+)`, ByGroups(KeywordNamespace, Text), Push("import")}, - Include("builtins"), - Include("magicfuncs"), - Include("magicvars"), - Include("backtick"), - {`([rR]|[uUbB][rR]|[rR][uUbB])(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("tdqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("tsqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Push("dqs")}, - {`([rR]|[uUbB][rR]|[rR][uUbB])(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Push("sqs")}, - {`([uUbB]?)(""")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "tdqs")}, - {`([uUbB]?)(''')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "tsqs")}, - {`([uUbB]?)(")`, ByGroups(LiteralStringAffix, LiteralStringDouble), Combined("stringescape", "dqs")}, - {`([uUbB]?)(')`, ByGroups(LiteralStringAffix, LiteralStringSingle), Combined("stringescape", "sqs")}, - Include("name"), - Include("numbers"), - }, - "keywords": { - {Words(``, `\b`, `assert`, `async`, `await`, `break`, `continue`, `del`, `elif`, `else`, `except`, `finally`, `for`, `global`, `if`, `lambda`, `pass`, `raise`, `nonlocal`, `return`, `try`, `while`, `yield`, `yield from`, `as`, `with`), Keyword, nil}, - {Words(``, `\b`, `True`, `False`, `None`), KeywordConstant, nil}, - }, - "builtins": { - {Words(`(?<!\.)`, `\b`, `__import__`, `abs`, `all`, `any`, `bin`, `bool`, `bytearray`, `bytes`, `chr`, `classmethod`, `cmp`, `compile`, `complex`, `delattr`, `dict`, `dir`, `divmod`, `enumerate`, `eval`, `filter`, `float`, `format`, `frozenset`, `getattr`, `globals`, `hasattr`, `hash`, `hex`, `id`, `input`, `int`, `isinstance`, `issubclass`, `iter`, `len`, `list`, `locals`, `map`, `max`, `memoryview`, `min`, `next`, `object`, `oct`, `open`, `ord`, `pow`, `print`, `property`, `range`, `repr`, `reversed`, `round`, `set`, `setattr`, `slice`, `sorted`, `staticmethod`, `str`, `sum`, `super`, `tuple`, `type`, `vars`, `zip`), NameBuiltin, nil}, - {`(?<!\.)(self|Ellipsis|NotImplemented|cls)\b`, NameBuiltinPseudo, nil}, - {Words(`(?<!\.)`, `\b`, `ArithmeticError`, `AssertionError`, `AttributeError`, `BaseException`, `BufferError`, `BytesWarning`, `DeprecationWarning`, `EOFError`, `EnvironmentError`, `Exception`, `FloatingPointError`, `FutureWarning`, `GeneratorExit`, `IOError`, `ImportError`, `ImportWarning`, `IndentationError`, `IndexError`, `KeyError`, `KeyboardInterrupt`, `LookupError`, `MemoryError`, `NameError`, `NotImplementedError`, `OSError`, `OverflowError`, `PendingDeprecationWarning`, `ReferenceError`, `ResourceWarning`, `RuntimeError`, `RuntimeWarning`, `StopIteration`, `SyntaxError`, `SyntaxWarning`, `SystemError`, `SystemExit`, `TabError`, `TypeError`, `UnboundLocalError`, `UnicodeDecodeError`, `UnicodeEncodeError`, `UnicodeError`, `UnicodeTranslateError`, `UnicodeWarning`, `UserWarning`, `ValueError`, `VMSError`, `Warning`, `WindowsError`, `ZeroDivisionError`, `BlockingIOError`, `ChildProcessError`, `ConnectionError`, `BrokenPipeError`, `ConnectionAbortedError`, `ConnectionRefusedError`, `ConnectionResetError`, `FileExistsError`, `FileNotFoundError`, `InterruptedError`, `IsADirectoryError`, `NotADirectoryError`, `PermissionError`, `ProcessLookupError`, `TimeoutError`), NameException, nil}, - }, - "magicfuncs": { - {Words(``, `\b`, `__abs__`, `__add__`, `__aenter__`, `__aexit__`, `__aiter__`, `__and__`, `__anext__`, `__await__`, `__bool__`, `__bytes__`, `__call__`, `__complex__`, `__contains__`, `__del__`, `__delattr__`, `__delete__`, `__delitem__`, `__dir__`, `__divmod__`, `__enter__`, `__eq__`, `__exit__`, `__float__`, `__floordiv__`, `__format__`, `__ge__`, `__get__`, `__getattr__`, `__getattribute__`, `__getitem__`, `__gt__`, `__hash__`, `__iadd__`, `__iand__`, `__ifloordiv__`, `__ilshift__`, `__imatmul__`, `__imod__`, `__import__`, `__imul__`, `__index__`, `__init__`, `__instancecheck__`, `__int__`, `__invert__`, `__ior__`, `__ipow__`, `__irshift__`, `__isub__`, `__iter__`, `__itruediv__`, `__ixor__`, `__le__`, `__len__`, `__length_hint__`, `__lshift__`, `__lt__`, `__matmul__`, `__missing__`, `__mod__`, `__mul__`, `__ne__`, `__neg__`, `__new__`, `__next__`, `__or__`, `__pos__`, `__pow__`, `__prepare__`, `__radd__`, `__rand__`, `__rdivmod__`, `__repr__`, `__reversed__`, `__rfloordiv__`, `__rlshift__`, `__rmatmul__`, `__rmod__`, `__rmul__`, `__ror__`, `__round__`, `__rpow__`, `__rrshift__`, `__rshift__`, `__rsub__`, `__rtruediv__`, `__rxor__`, `__set__`, `__setattr__`, `__setitem__`, `__str__`, `__sub__`, `__subclasscheck__`, `__truediv__`, `__xor__`), NameFunctionMagic, nil}, - }, - "magicvars": { - {Words(``, `\b`, `__annotations__`, `__bases__`, `__class__`, `__closure__`, `__code__`, `__defaults__`, `__dict__`, `__doc__`, `__file__`, `__func__`, `__globals__`, `__kwdefaults__`, `__module__`, `__mro__`, `__name__`, `__objclass__`, `__qualname__`, `__self__`, `__slots__`, `__weakref__`), NameVariableMagic, nil}, - }, - "numbers": { - {`(\d+\.\d*|\d*\.\d+)([eE][+-]?[0-9]+)?`, LiteralNumberFloat, nil}, - {`\d+[eE][+-]?[0-9]+j?`, LiteralNumberFloat, nil}, - {`0[oO][0-7]+`, LiteralNumberOct, nil}, - {`0[bB][01]+`, LiteralNumberBin, nil}, - {`0[xX][a-fA-F0-9]+`, LiteralNumberHex, nil}, - {`\d+`, LiteralNumberInteger, nil}, - }, - "backtick": {}, - "name": { - {`@\w+`, NameDecorator, nil}, - {`@`, Operator, nil}, - {python3Identifier, Name, nil}, - }, - "funcname": { - {python3Identifier, NameFunction, Pop(1)}, - }, - "classname": { - {python3Identifier, NameClass, Pop(1)}, - }, - "import": { - {`(\s+)(as)(\s+)`, ByGroups(Text, Keyword, Text), nil}, - {`\.`, NameNamespace, nil}, - {python3Identifier, NameNamespace, nil}, - {`(\s*)(,)(\s*)`, ByGroups(Text, Operator, Text), nil}, - Default(Pop(1)), - }, - "fromimport": { - {`(\s+)(import)\b`, ByGroups(Text, Keyword), Pop(1)}, - {`\.`, NameNamespace, nil}, - {python3Identifier, NameNamespace, nil}, - Default(Pop(1)), - }, - "stringescape": { - {`\\([\\abfnrtv"\']|\n|N\{.*?\}|u[a-fA-F0-9]{4}|U[a-fA-F0-9]{8}|x[a-fA-F0-9]{2}|[0-7]{1,3})`, LiteralStringEscape, nil}, - }, - "strings-single": { - {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, - {`\{((\w+)((\.\w+)|(\[[^\]]+\]))*)?(\![sra])?(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}`, LiteralStringInterpol, nil}, - {`[^\\\'"%{\n]+`, LiteralStringSingle, nil}, - {`[\'"\\]`, LiteralStringSingle, nil}, - {`%|(\{{1,2})`, LiteralStringSingle, nil}, - }, - "strings-double": { - {`%(\(\w+\))?[-#0 +]*([0-9]+|[*])?(\.([0-9]+|[*]))?[hlL]?[E-GXc-giorsux%]`, LiteralStringInterpol, nil}, - {`\{((\w+)((\.\w+)|(\[[^\]]+\]))*)?(\![sra])?(\:(.?[<>=\^])?[-+ ]?#?0?(\d+)?,?(\.\d+)?[E-GXb-gnosx%]?)?\}`, LiteralStringInterpol, nil}, - {`[^\\\'"%{\n]+`, LiteralStringDouble, nil}, - {`[\'"\\]`, LiteralStringDouble, nil}, - {`%|(\{{1,2})`, LiteralStringDouble, nil}, - }, - "dqs": { - {`"`, LiteralStringDouble, Pop(1)}, - {`\\\\|\\"|\\\n`, LiteralStringEscape, nil}, - Include("strings-double"), - }, - "sqs": { - {`'`, LiteralStringSingle, Pop(1)}, - {`\\\\|\\'|\\\n`, LiteralStringEscape, nil}, - Include("strings-single"), - }, - "tdqs": { - {`"""`, LiteralStringDouble, Pop(1)}, - Include("strings-double"), - {`\n`, LiteralStringDouble, nil}, - }, - "tsqs": { - {`'''`, LiteralStringSingle, Pop(1)}, - Include("strings-single"), - {`\n`, LiteralStringSingle, nil}, - }, - } -} diff --git a/vendor/github.com/alecthomas/chroma/lexers/r/raku.go b/vendor/github.com/alecthomas/chroma/lexers/r/raku.go new file mode 100644 index 0000000000..a5f55e1f6e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/r/raku.go @@ -0,0 +1,1496 @@ +package r + +import ( + "regexp" + "strings" + "unicode/utf8" + + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/internal" + "github.com/dlclark/regexp2" +) + +// Raku lexer. +var Raku Lexer = internal.Register(MustNewLazyLexer( + &Config{ + Name: "Raku", + Aliases: []string{"perl6", "pl6", "raku"}, + Filenames: []string{ + "*.pl", "*.pm", "*.nqp", "*.p6", "*.6pl", "*.p6l", "*.pl6", "*.6pm", + "*.p6m", "*.pm6", "*.t", "*.raku", "*.rakumod", "*.rakutest", "*.rakudoc", + }, + MimeTypes: []string{ + "text/x-perl6", "application/x-perl6", + "text/x-raku", "application/x-raku", + }, + DotAll: true, + }, + rakuRules, +)) + +func rakuRules() Rules { + type RakuToken int + + const ( + rakuQuote RakuToken = iota + rakuName + rakuNameAttribute + rakuPod + rakuPodFormatter + rakuPodDeclaration + rakuMultilineComment + rakuSlashRegex + rakuMatchRegex + rakuSubstitutionRegex + rakuSubstitutionSingleRegex + rakuRegexInsideToken + ) + + const ( + colonPairOpeningBrackets = `(?:<<|<|«|\(|\[|\{)` + colonPairClosingBrackets = `(?:>>|>|»|\)|\]|\})` + colonPairPattern = `(?<colon>:)(?<key>\w[\w'-]*)(?<opening_delimiters>` + colonPairOpeningBrackets + `)` + namePattern = `((?:(?!` + colonPairPattern + `)[\w':-])+)` + variablePattern = `[$@%&]+[.^:?=!~]?` + namePattern + globalVariablePattern = `[$@%&]+\*` + namePattern + ) + + keywords := []string{ + `BEGIN`, `CATCH`, `CHECK`, `CLOSE`, `CONTROL`, `DOC`, `END`, `ENTER`, `FIRST`, `INIT`, + `KEEP`, `LAST`, `LEAVE`, `NEXT`, `POST`, `PRE`, `QUIT`, `UNDO`, `anon`, `augment`, `but`, + `class`, `constant`, `default`, `does`, `else`, `elsif`, `enum`, `for`, `gather`, `given`, + `grammar`, `has`, `if`, `import`, `is`, `of`, `let`, `loop`, `made`, `make`, `method`, + `module`, `multi`, `my`, `need`, `orwith`, `our`, `proceed`, `proto`, `repeat`, `require`, + `where`, `return`, `return-rw`, `returns`, `->`, `-->`, `role`, `state`, `sub`, `no`, + `submethod`, `subset`, `succeed`, `supersede`, `try`, `unit`, `unless`, `until`, + `use`, `when`, `while`, `with`, `without`, `export`, `native`, `repr`, `required`, `rw`, + `symbol`, `default`, `cached`, `DEPRECATED`, `dynamic`, `hidden-from-backtrace`, `nodal`, + `pure`, `raw`, `start`, `react`, `supply`, `whenever`, `also`, `rule`, `token`, `regex`, + `dynamic-scope`, `built`, `temp`, + } + + keywordsPattern := Words(`(?<!['\w:-])`, `(?!['\w:-])`, keywords...) + + wordOperators := []string{ + `X`, `Z`, `R`, `after`, `and`, `andthen`, `before`, `cmp`, `div`, `eq`, `eqv`, `extra`, `ge`, + `gt`, `le`, `leg`, `lt`, `mod`, `ne`, `or`, `orelse`, `x`, `xor`, `xx`, `gcd`, `lcm`, + `but`, `min`, `max`, `^fff`, `fff^`, `fff`, `^ff`, `ff^`, `ff`, `so`, `not`, `unicmp`, + `TR`, `o`, `(&)`, `(.)`, `(|)`, `(+)`, `(-)`, `(^)`, `coll`, `(elem)`, `(==)`, + `(cont)`, `(<)`, `(<=)`, `(>)`, `(>=)`, `minmax`, `notandthen`, `S`, + } + + wordOperatorsPattern := Words(`(?<=^|\b|\s)`, `(?=$|\b|\s)`, wordOperators...) + + operators := []string{ + `++`, `--`, `-`, `**`, `!`, `+`, `~`, `?`, `+^`, `~^`, `?^`, `^`, `*`, `/`, `%`, `%%`, `+&`, + `+<`, `+>`, `~&`, `~<`, `~>`, `?&`, `+|`, `+^`, `~|`, `~^`, `?`, `?|`, `?^`, `&`, `^`, + `<=>`, `^…^`, `^…`, `…^`, `…`, `...`, `...^`, `^...`, `^...^`, `..`, `..^`, `^..`, `^..^`, + `::=`, `:=`, `!=`, `==`, `<=`, `<`, `>=`, `>`, `~~`, `===`, `&&`, `||`, `|`, `^^`, `//`, + `??`, `!!`, `^fff^`, `^ff^`, `<==`, `==>`, `<<==`, `==>>`, `=>`, `=`, `<<`, `«`, `>>`, `»`, + `,`, `>>.`, `».`, `.&`, `.=`, `.^`, `.?`, `.+`, `.*`, `.`, `∘`, `∩`, `⊍`, `∪`, `⊎`, `∖`, + `⊖`, `≠`, `≤`, `≥`, `=:=`, `=~=`, `≅`, `∈`, `∉`, `≡`, `≢`, `∋`, `∌`, `⊂`, `⊄`, `⊆`, `⊈`, + `⊃`, `⊅`, `⊇`, `⊉`, `:`, `!!!`, `???`, `¯`, `×`, `÷`, `−`, `⁺`, `⁻`, + } + + operatorsPattern := Words(``, ``, operators...) + + builtinTypes := []string{ + `False`, `True`, `Order`, `More`, `Less`, `Same`, `Any`, `Array`, `Associative`, `AST`, + `atomicint`, `Attribute`, `Backtrace`, `Backtrace::Frame`, `Bag`, `Baggy`, `BagHash`, + `Blob`, `Block`, `Bool`, `Buf`, `Callable`, `CallFrame`, `Cancellation`, `Capture`, + `CArray`, `Channel`, `Code`, `compiler`, `Complex`, `ComplexStr`, `CompUnit`, + `CompUnit::PrecompilationRepository`, `CompUnit::Repository`, `Empty`, + `CompUnit::Repository::FileSystem`, `CompUnit::Repository::Installation`, `Cool`, + `CurrentThreadScheduler`, `CX::Warn`, `CX::Take`, `CX::Succeed`, `CX::Return`, `CX::Redo`, + `CX::Proceed`, `CX::Next`, `CX::Last`, `CX::Emit`, `CX::Done`, `Cursor`, `Date`, `Dateish`, + `DateTime`, `Distribution`, `Distribution::Hash`, `Distribution::Locally`, + `Distribution::Path`, `Distribution::Resource`, `Distro`, `Duration`, `Encoding`, + `Encoding::Registry`, `Endian`, `Enumeration`, `Exception`, `Failure`, `FatRat`, `Grammar`, + `Hash`, `HyperWhatever`, `Instant`, `Int`, `int`, `int16`, `int32`, `int64`, `int8`, `str`, + `IntStr`, `IO`, `IO::ArgFiles`, `IO::CatHandle`, `IO::Handle`, `IO::Notification`, + `IO::Notification::Change`, `IO::Path`, `IO::Path::Cygwin`, `IO::Path::Parts`, + `IO::Path::QNX`, `IO::Path::Unix`, `IO::Path::Win32`, `IO::Pipe`, `IO::Socket`, + `IO::Socket::Async`, `IO::Socket::Async::ListenSocket`, `IO::Socket::INET`, `IO::Spec`, + `IO::Spec::Cygwin`, `IO::Spec::QNX`, `IO::Spec::Unix`, `IO::Spec::Win32`, `IO::Special`, + `Iterable`, `Iterator`, `Junction`, `Kernel`, `Label`, `List`, `Lock`, `Lock::Async`, + `Lock::ConditionVariable`, `long`, `longlong`, `Macro`, `Map`, `Match`, + `Metamodel::AttributeContainer`, `Metamodel::C3MRO`, `Metamodel::ClassHOW`, + `Metamodel::ConcreteRoleHOW`, `Metamodel::CurriedRoleHOW`, `Metamodel::DefiniteHOW`, + `Metamodel::Documenting`, `Metamodel::EnumHOW`, `Metamodel::Finalization`, + `Metamodel::MethodContainer`, `Metamodel::Mixins`, `Metamodel::MROBasedMethodDispatch`, + `Metamodel::MultipleInheritance`, `Metamodel::Naming`, `Metamodel::Primitives`, + `Metamodel::PrivateMethodContainer`, `Metamodel::RoleContainer`, `Metamodel::RolePunning`, + `Metamodel::Stashing`, `Metamodel::Trusting`, `Metamodel::Versioning`, `Method`, `Mix`, + `MixHash`, `Mixy`, `Mu`, `NFC`, `NFD`, `NFKC`, `NFKD`, `Nil`, `Num`, `num32`, `num64`, + `Numeric`, `NumStr`, `ObjAt`, `Order`, `Pair`, `Parameter`, `Perl`, `Pod::Block`, + `Pod::Block::Code`, `Pod::Block::Comment`, `Pod::Block::Declarator`, `Pod::Block::Named`, + `Pod::Block::Para`, `Pod::Block::Table`, `Pod::Heading`, `Pod::Item`, `Pointer`, + `Positional`, `PositionalBindFailover`, `Proc`, `Proc::Async`, `Promise`, `Proxy`, + `PseudoStash`, `QuantHash`, `RaceSeq`, `Raku`, `Range`, `Rat`, `Rational`, `RatStr`, + `Real`, `Regex`, `Routine`, `Routine::WrapHandle`, `Scalar`, `Scheduler`, `Semaphore`, + `Seq`, `Sequence`, `Set`, `SetHash`, `Setty`, `Signature`, `size_t`, `Slip`, `Stash`, + `Str`, `StrDistance`, `Stringy`, `Sub`, `Submethod`, `Supplier`, `Supplier::Preserving`, + `Supply`, `Systemic`, `Tap`, `Telemetry`, `Telemetry::Instrument::Thread`, + `Telemetry::Instrument::ThreadPool`, `Telemetry::Instrument::Usage`, `Telemetry::Period`, + `Telemetry::Sampler`, `Thread`, `Test`, `ThreadPoolScheduler`, `UInt`, `uint16`, `uint32`, + `uint64`, `uint8`, `Uni`, `utf8`, `ValueObjAt`, `Variable`, `Version`, `VM`, `Whatever`, + `WhateverCode`, `WrapHandle`, `NativeCall`, + // Pragmas + `precompilation`, `experimental`, `worries`, `MONKEY-TYPING`, `MONKEY-SEE-NO-EVAL`, + `MONKEY-GUTS`, `fatal`, `lib`, `isms`, `newline`, `nqp`, `soft`, + `strict`, `trace`, `variables`, + } + + builtinTypesPattern := Words(`(?<!['\w:-])`, `(?::[_UD])?(?!['\w:-])`, builtinTypes...) + + builtinRoutines := []string{ + `ACCEPTS`, `abs`, `abs2rel`, `absolute`, `accept`, `accepts_type`, `accessed`, `acos`, + `acosec`, `acosech`, `acosh`, `acotan`, `acotanh`, `acquire`, `act`, `action`, `actions`, + `add`, `add_attribute`, `add_enum_value`, `add_fallback`, `add_method`, `add_parent`, + `add_private_method`, `add_role`, `add_stash`, `add_trustee`, `addendum`, `adverb`, `after`, + `all`, `allocate`, `allof`, `allowed`, `alternative-names`, `annotations`, `antipair`, + `antipairs`, `any`, `anyof`, `api`, `app_lifetime`, `append`, `arch`, `archetypes`, + `archname`, `args`, `ARGS-TO-CAPTURE`, `arity`, `Array`, `asec`, `asech`, `asin`, `asinh`, + `ASSIGN-KEY`, `ASSIGN-POS`, `assuming`, `ast`, `at`, `atan`, `atan2`, `atanh`, `AT-KEY`, + `atomic-assign`, `atomic-dec-fetch`, `atomic-fetch`, `atomic-fetch-add`, `atomic-fetch-dec`, + `atomic-fetch-inc`, `atomic-fetch-sub`, `atomic-inc-fetch`, `AT-POS`, `attributes`, `auth`, + `await`, `backend`, `backtrace`, `Bag`, `bag`, `Baggy`, `BagHash`, `bail-out`, `base`, + `basename`, `base-repeating`, `base_type`, `batch`, `BIND-KEY`, `BIND-POS`, `bind-stderr`, + `bind-stdin`, `bind-stdout`, `bind-udp`, `bits`, `bless`, `block`, `Bool`, `bool-only`, + `bounds`, `break`, `Bridge`, `broken`, `BUILD`, `TWEAK`, `build-date`, `bytes`, `cache`, + `callframe`, `calling-package`, `CALL-ME`, `callsame`, `callwith`, `can`, `cancel`, + `candidates`, `cando`, `can-ok`, `canonpath`, `caps`, `caption`, `Capture`, `capture`, + `cas`, `catdir`, `categorize`, `categorize-list`, `catfile`, `catpath`, `cause`, `ceiling`, + `cglobal`, `changed`, `Channel`, `channel`, `chars`, `chdir`, `child`, `child-name`, + `child-typename`, `chmod`, `chomp`, `chop`, `chr`, `chrs`, `chunks`, `cis`, `classify`, + `classify-list`, `cleanup`, `clone`, `close`, `closed`, `close-stdin`, `cmp-ok`, `code`, + `codename`, `codes`, `coerce_type`, `coll`, `collate`, `column`, `comb`, `combinations`, + `command`, `comment`, `compiler`, `Complex`, `compose`, `composalizer`, `compose_type`, + `compose_values`, `composer`, `compute_mro`, `condition`, `config`, `configure_destroy`, + `configure_type_checking`, `conj`, `connect`, `constraints`, `construct`, `contains`, + `content`, `contents`, `copy`, `cos`, `cosec`, `cosech`, `cosh`, `cotan`, `cotanh`, `count`, + `count-only`, `cpu-cores`, `cpu-usage`, `CREATE`, `create_type`, `cross`, `cue`, `curdir`, + `curupdir`, `d`, `Date`, `DateTime`, `day`, `daycount`, `day-of-month`, `day-of-week`, + `day-of-year`, `days-in-month`, `dd-mm-yyyy`, `declaration`, `decode`, `decoder`, `deepmap`, + `default`, `defined`, `DEFINITE`, `definite`, `delayed`, `delete`, `delete-by-compiler`, + `DELETE-KEY`, `DELETE-POS`, `denominator`, `desc`, `DESTROY`, `destroyers`, `devnull`, + `diag`, `did-you-mean`, `die`, `dies-ok`, `dir`, `dirname`, `distribution`, `dir-sep`, + `DISTROnames`, `do`, `does`, `does-ok`, `done`, `done-testing`, `duckmap`, `dynamic`, `e`, + `eager`, `earlier`, `elems`, `emit`, `enclosing`, `encode`, `encoder`, `encoding`, `end`, + `endian`, `ends-with`, `enum_from_value`, `enum_value_list`, `enum_values`, `enums`, `EOF`, + `eof`, `EVAL`, `eval-dies-ok`, `EVALFILE`, `eval-lives-ok`, `event`, `exception`, + `excludes-max`, `excludes-min`, `EXISTS-KEY`, `EXISTS-POS`, `exit`, `exitcode`, `exp`, + `expected`, `explicitly-manage`, `expmod`, `export_callback`, `extension`, `f`, `fail`, + `FALLBACK`, `fails-like`, `fc`, `feature`, `file`, `filename`, `files`, `find`, + `find_method`, `find_method_qualified`, `finish`, `first`, `flat`, `first-date-in-month`, + `flatmap`, `flip`, `floor`, `flunk`, `flush`, `flush_cache`, `fmt`, `format`, `formatter`, + `free-memory`, `freeze`, `from`, `from-list`, `from-loop`, `from-posix`, `from-slurpy`, + `full`, `full-barrier`, `GENERATE-USAGE`, `generate_mixin`, `get`, `get_value`, `getc`, + `gist`, `got`, `grab`, `grabpairs`, `grep`, `handle`, `handled`, `handles`, `hardware`, + `has_accessor`, `Hash`, `hash`, `head`, `headers`, `hh-mm-ss`, `hidden`, `hides`, `hostname`, + `hour`, `how`, `hyper`, `id`, `illegal`, `im`, `in`, `in-timezone`, `indent`, `index`, + `indices`, `indir`, `infinite`, `infix`, `postcirumfix`, `cicumfix`, `install`, + `install_method_cache`, `Instant`, `instead`, `Int`, `int-bounds`, `interval`, `in-timezone`, + `invalid-str`, `invert`, `invocant`, `IO`, `IO::Notification.watch-path`, `is_trusted`, + `is_type`, `isa`, `is-absolute`, `isa-ok`, `is-approx`, `is-deeply`, `is-hidden`, + `is-initial-thread`, `is-int`, `is-lazy`, `is-leap-year`, `isNaN`, `isnt`, `is-prime`, + `is-relative`, `is-routine`, `is-setting`, `is-win`, `item`, `iterator`, `join`, `keep`, + `kept`, `KERNELnames`, `key`, `keyof`, `keys`, `kill`, `kv`, `kxxv`, `l`, `lang`, `last`, + `lastcall`, `later`, `lazy`, `lc`, `leading`, `level`, `like`, `line`, `lines`, `link`, + `List`, `list`, `listen`, `live`, `lives-ok`, `load`, `load-repo-id`, `load-unit`, `loaded`, + `loads`, `local`, `lock`, `log`, `log10`, `lookup`, `lsb`, `made`, `MAIN`, `make`, `Map`, + `map`, `match`, `max`, `maxpairs`, `merge`, `message`, `method`, `meta`, `method_table`, + `methods`, `migrate`, `min`, `minmax`, `minpairs`, `minute`, `misplaced`, `Mix`, `mix`, + `MixHash`, `mixin`, `mixin_attribute`, `Mixy`, `mkdir`, `mode`, `modified`, `month`, `move`, + `mro`, `msb`, `multi`, `multiness`, `name`, `named`, `named_names`, `narrow`, + `nativecast`, `native-descriptor`, `nativesizeof`, `need`, `new`, `new_type`, + `new-from-daycount`, `new-from-pairs`, `next`, `nextcallee`, `next-handle`, `nextsame`, + `nextwith`, `next-interesting-index`, `NFC`, `NFD`, `NFKC`, `NFKD`, `nice`, `nl-in`, + `nl-out`, `nodemap`, `nok`, `normalize`, `none`, `norm`, `not`, `note`, `now`, `nude`, + `Num`, `numerator`, `Numeric`, `of`, `offset`, `offset-in-hours`, `offset-in-minutes`, + `ok`, `old`, `on-close`, `one`, `on-switch`, `open`, `opened`, `operation`, `optional`, + `ord`, `ords`, `orig`, `os-error`, `osname`, `out-buffer`, `pack`, `package`, `package-kind`, + `package-name`, `packages`, `Pair`, `pair`, `pairs`, `pairup`, `parameter`, `params`, + `parent`, `parent-name`, `parents`, `parse`, `parse-base`, `parsefile`, `parse-names`, + `parts`, `pass`, `path`, `path-sep`, `payload`, `peer-host`, `peer-port`, `periods`, `perl`, + `permutations`, `phaser`, `pick`, `pickpairs`, `pid`, `placeholder`, `plan`, `plus`, + `polar`, `poll`, `polymod`, `pop`, `pos`, `positional`, `posix`, `postfix`, `postmatch`, + `precomp-ext`, `precomp-target`, `precompiled`, `pred`, `prefix`, `prematch`, `prepend`, + `primary`, `print`, `printf`, `print-nl`, `print-to`, `private`, `private_method_names`, + `private_method_table`, `proc`, `produce`, `Promise`, `promise`, `prompt`, `protect`, + `protect-or-queue-on-recursion`, `publish_method_cache`, `pull-one`, `push`, `push-all`, + `push-at-least`, `push-exactly`, `push-until-lazy`, `put`, `qualifier-type`, `quaternary`, + `quit`, `r`, `race`, `radix`, `raku`, `rand`, `Range`, `range`, `Rat`, `raw`, `re`, `read`, + `read-bits`, `read-int128`, `read-int16`, `read-int32`, `read-int64`, `read-int8`, + `read-num32`, `read-num64`, `read-ubits`, `read-uint128`, `read-uint16`, `read-uint32`, + `read-uint64`, `read-uint8`, `readchars`, `readonly`, `ready`, `Real`, `reallocate`, + `reals`, `reason`, `rebless`, `receive`, `recv`, `redispatcher`, `redo`, `reduce`, + `rel2abs`, `relative`, `release`, `remove`, `rename`, `repeated`, `replacement`, + `replace-with`, `repo`, `repo-id`, `report`, `required`, `reserved`, `resolve`, `restore`, + `result`, `resume`, `rethrow`, `return`, `return-rw`, `returns`, `reverse`, `right`, + `rindex`, `rmdir`, `role`, `roles_to_compose`, `rolish`, `roll`, `rootdir`, `roots`, + `rotate`, `rotor`, `round`, `roundrobin`, `routine-type`, `run`, `RUN-MAIN`, `rw`, `rwx`, + `samecase`, `samemark`, `samewith`, `say`, `schedule-on`, `scheduler`, `scope`, `sec`, + `sech`, `second`, `secondary`, `seek`, `self`, `send`, `Seq`, `Set`, `set`, `serial`, + `set_hidden`, `set_name`, `set_package`, `set_rw`, `set_value`, `set_api`, `set_auth`, + `set_composalizer`, `set_export_callback`, `set_is_mixin`, `set_mixin_attribute`, + `set_package`, `set_ver`, `set_why`, `SetHash`, `Setty`, `set-instruments`, + `setup_finalization`, `setup_mixin_cache`, `shape`, `share`, `shell`, `short-id`, + `short-name`, `shortname`, `shift`, `sibling`, `sigil`, `sign`, `signal`, `signals`, + `signature`, `sin`, `sinh`, `sink`, `sink-all`, `skip`, `skip-at-least`, + `skip-at-least-pull-one`, `skip-one`, `skip-rest`, `sleep`, `sleep-timer`, `sleep-until`, + `Slip`, `slip`, `slurp`, `slurp-rest`, `slurpy`, `snap`, `snapper`, `so`, `socket-host`, + `socket-port`, `sort`, `source`, `source-package`, `spawn`, `SPEC`, `splice`, `split`, + `splitdir`, `splitpath`, `sprintf`, `spurt`, `sqrt`, `squish`, `srand`, `stable`, `start`, + `started`, `starts-with`, `status`, `stderr`, `stdout`, `STORE`, `store-file`, + `store-repo-id`, `store-unit`, `Str`, `Stringy`, `sub_signature`, `subbuf`, `subbuf-rw`, + `subname`, `subparse`, `subst`, `subst-mutate`, `substr`, `substr-eq`, `substr-rw`, + `subtest`, `succ`, `sum`, `suffix`, `summary`, `Supply`, `symlink`, `T`, `t`, `tail`, + `take`, `take-rw`, `tan`, `tanh`, `tap`, `target`, `target-name`, `tc`, `tclc`, `tell`, + `term`, `tertiary`, `then`, `throttle`, `throw`, `throws-like`, `time`, `timezone`, + `tmpdir`, `to`, `today`, `todo`, `toggle`, `to-posix`, `total`, `total-memory`, `trailing`, + `trans`, `tree`, `trim`, `trim-leading`, `trim-trailing`, `truncate`, `truncated-to`, + `trusts`, `try_acquire`, `trying`, `twigil`, `type`, `type_captures`, `type_check`, + `typename`, `uc`, `udp`, `uncaught_handler`, `undefine`, `unimatch`, `unicmp`, `uniname`, + `uninames`, `uninstall`, `uniparse`, `uniprop`, `uniprops`, `unique`, `unival`, `univals`, + `unlike`, `unlink`, `unlock`, `unpack`, `unpolar`, `unset`, `unshift`, `unwrap`, `updir`, + `USAGE`, `usage-name`, `use-ok`, `utc`, `val`, `value`, `values`, `VAR`, `variable`, `ver`, + `verbose-config`, `Version`, `version`, `VMnames`, `volume`, `vow`, `w`, `wait`, `warn`, + `watch`, `watch-path`, `week`, `weekday-of-month`, `week-number`, `week-year`, `WHAT`, + `what`, `when`, `WHERE`, `WHEREFORE`, `WHICH`, `WHO`, `whole-second`, `WHY`, `why`, + `with-lock-hidden-from-recursion-check`, `wordcase`, `words`, `workaround`, `wrap`, + `write`, `write-bits`, `write-int128`, `write-int16`, `write-int32`, `write-int64`, + `write-int8`, `write-num32`, `write-num64`, `write-ubits`, `write-uint128`, `write-uint16`, + `write-uint32`, `write-uint64`, `write-uint8`, `write-to`, `x`, `yada`, `year`, `yield`, + `yyyy-mm-dd`, `z`, `zip`, `zip-latest`, `HOW`, `s`, `DEPRECATED`, `trait_mod`, + } + + builtinRoutinesPattern := Words(`(?<!['\w:-])`, `(?!['\w-])`, builtinRoutines...) + + // A map of opening and closing brackets + brackets := map[rune]rune{ + '\u0028': '\u0029', '\u003c': '\u003e', '\u005b': '\u005d', + '\u007b': '\u007d', '\u00ab': '\u00bb', '\u0f3a': '\u0f3b', + '\u0f3c': '\u0f3d', '\u169b': '\u169c', '\u2018': '\u2019', + '\u201a': '\u2019', '\u201b': '\u2019', '\u201c': '\u201d', + '\u201e': '\u201d', '\u201f': '\u201d', '\u2039': '\u203a', + '\u2045': '\u2046', '\u207d': '\u207e', '\u208d': '\u208e', + '\u2208': '\u220b', '\u2209': '\u220c', '\u220a': '\u220d', + '\u2215': '\u29f5', '\u223c': '\u223d', '\u2243': '\u22cd', + '\u2252': '\u2253', '\u2254': '\u2255', '\u2264': '\u2265', + '\u2266': '\u2267', '\u2268': '\u2269', '\u226a': '\u226b', + '\u226e': '\u226f', '\u2270': '\u2271', '\u2272': '\u2273', + '\u2274': '\u2275', '\u2276': '\u2277', '\u2278': '\u2279', + '\u227a': '\u227b', '\u227c': '\u227d', '\u227e': '\u227f', + '\u2280': '\u2281', '\u2282': '\u2283', '\u2284': '\u2285', + '\u2286': '\u2287', '\u2288': '\u2289', '\u228a': '\u228b', + '\u228f': '\u2290', '\u2291': '\u2292', '\u2298': '\u29b8', + '\u22a2': '\u22a3', '\u22a6': '\u2ade', '\u22a8': '\u2ae4', + '\u22a9': '\u2ae3', '\u22ab': '\u2ae5', '\u22b0': '\u22b1', + '\u22b2': '\u22b3', '\u22b4': '\u22b5', '\u22b6': '\u22b7', + '\u22c9': '\u22ca', '\u22cb': '\u22cc', '\u22d0': '\u22d1', + '\u22d6': '\u22d7', '\u22d8': '\u22d9', '\u22da': '\u22db', + '\u22dc': '\u22dd', '\u22de': '\u22df', '\u22e0': '\u22e1', + '\u22e2': '\u22e3', '\u22e4': '\u22e5', '\u22e6': '\u22e7', + '\u22e8': '\u22e9', '\u22ea': '\u22eb', '\u22ec': '\u22ed', + '\u22f0': '\u22f1', '\u22f2': '\u22fa', '\u22f3': '\u22fb', + '\u22f4': '\u22fc', '\u22f6': '\u22fd', '\u22f7': '\u22fe', + '\u2308': '\u2309', '\u230a': '\u230b', '\u2329': '\u232a', + '\u23b4': '\u23b5', '\u2768': '\u2769', '\u276a': '\u276b', + '\u276c': '\u276d', '\u276e': '\u276f', '\u2770': '\u2771', + '\u2772': '\u2773', '\u2774': '\u2775', '\u27c3': '\u27c4', + '\u27c5': '\u27c6', '\u27d5': '\u27d6', '\u27dd': '\u27de', + '\u27e2': '\u27e3', '\u27e4': '\u27e5', '\u27e6': '\u27e7', + '\u27e8': '\u27e9', '\u27ea': '\u27eb', '\u2983': '\u2984', + '\u2985': '\u2986', '\u2987': '\u2988', '\u2989': '\u298a', + '\u298b': '\u298c', '\u298d': '\u298e', '\u298f': '\u2990', + '\u2991': '\u2992', '\u2993': '\u2994', '\u2995': '\u2996', + '\u2997': '\u2998', '\u29c0': '\u29c1', '\u29c4': '\u29c5', + '\u29cf': '\u29d0', '\u29d1': '\u29d2', '\u29d4': '\u29d5', + '\u29d8': '\u29d9', '\u29da': '\u29db', '\u29f8': '\u29f9', + '\u29fc': '\u29fd', '\u2a2b': '\u2a2c', '\u2a2d': '\u2a2e', + '\u2a34': '\u2a35', '\u2a3c': '\u2a3d', '\u2a64': '\u2a65', + '\u2a79': '\u2a7a', '\u2a7d': '\u2a7e', '\u2a7f': '\u2a80', + '\u2a81': '\u2a82', '\u2a83': '\u2a84', '\u2a8b': '\u2a8c', + '\u2a91': '\u2a92', '\u2a93': '\u2a94', '\u2a95': '\u2a96', + '\u2a97': '\u2a98', '\u2a99': '\u2a9a', '\u2a9b': '\u2a9c', + '\u2aa1': '\u2aa2', '\u2aa6': '\u2aa7', '\u2aa8': '\u2aa9', + '\u2aaa': '\u2aab', '\u2aac': '\u2aad', '\u2aaf': '\u2ab0', + '\u2ab3': '\u2ab4', '\u2abb': '\u2abc', '\u2abd': '\u2abe', + '\u2abf': '\u2ac0', '\u2ac1': '\u2ac2', '\u2ac3': '\u2ac4', + '\u2ac5': '\u2ac6', '\u2acd': '\u2ace', '\u2acf': '\u2ad0', + '\u2ad1': '\u2ad2', '\u2ad3': '\u2ad4', '\u2ad5': '\u2ad6', + '\u2aec': '\u2aed', '\u2af7': '\u2af8', '\u2af9': '\u2afa', + '\u2e02': '\u2e03', '\u2e04': '\u2e05', '\u2e09': '\u2e0a', + '\u2e0c': '\u2e0d', '\u2e1c': '\u2e1d', '\u2e20': '\u2e21', + '\u3008': '\u3009', '\u300a': '\u300b', '\u300c': '\u300d', + '\u300e': '\u300f', '\u3010': '\u3011', '\u3014': '\u3015', + '\u3016': '\u3017', '\u3018': '\u3019', '\u301a': '\u301b', + '\u301d': '\u301e', '\ufd3e': '\ufd3f', '\ufe17': '\ufe18', + '\ufe35': '\ufe36', '\ufe37': '\ufe38', '\ufe39': '\ufe3a', + '\ufe3b': '\ufe3c', '\ufe3d': '\ufe3e', '\ufe3f': '\ufe40', + '\ufe41': '\ufe42', '\ufe43': '\ufe44', '\ufe47': '\ufe48', + '\ufe59': '\ufe5a', '\ufe5b': '\ufe5c', '\ufe5d': '\ufe5e', + '\uff08': '\uff09', '\uff1c': '\uff1e', '\uff3b': '\uff3d', + '\uff5b': '\uff5d', '\uff5f': '\uff60', '\uff62': '\uff63', + } + + bracketsPattern := `[` + regexp.QuoteMeta(joinRuneMap(brackets)) + `]` + + // Finds opening brackets and their closing counterparts (including pod and heredoc) + // and modifies state groups and position accordingly + bracketsFinder := func(tokenClass RakuToken) MutatorFunc { + return func(state *LexerState) error { + var openingChars []rune + var adverbs []rune + switch tokenClass { + case rakuRegexInsideToken: + openingChars = []rune("{") + case rakuPod: + openingChars = []rune(strings.Join(state.Groups[1:5], ``)) + default: + adverbs = []rune(state.NamedGroups[`adverbs`]) + openingChars = []rune(state.NamedGroups[`opening_delimiters`]) + } + + openingChar := openingChars[0] + + nChars := len(openingChars) + + var closingChar rune + var closingCharExists bool + var closingChars []rune + + switch tokenClass { + case rakuPod: + closingChars = []rune(state.NamedGroups[`ws`] + `=end ` + state.NamedGroups[`name`]) + closingCharExists = true + default: + closingChar, closingCharExists = brackets[openingChar] + } + + switch tokenClass { + case rakuPodFormatter: + stack, ok := state.Get("pod_formatter_stack").([]RakuFormatterRules) + if !ok { + stack = []RakuFormatterRules{} + } + popRule := makeRuleAndPushMaybe(RuleMakingConfig{ + delimiter: []rune{closingChar}, + numberOfDelimiterChars: nChars, + tokenType: Punctuation, + mutator: Mutators(Pop(1), MutatorFunc(podFormatterPopper)), + }) + var formatter TokenType = StringOther + switch state.NamedGroups[`keyword`] { + case "B": + formatter = GenericStrong + case "I": + formatter = GenericEmph + case "U": + formatter = GenericUnderline + } + formattingRule := makeRuleAndPushMaybe(RuleMakingConfig{ + pattern: `.+?`, + tokenType: formatter, + mutator: nil, + }) + state.Set("pod_formatter_stack", + append(stack, RakuFormatterRules{popRule, formattingRule})) + + return nil + case rakuMatchRegex, rakuSubstitutionSingleRegex, rakuRegexInsideToken: + // We're inside a regex + // While matching a regex, the closing chars may have been used inside the regex + // so we have to push to regex state and pop on the matched closing chars + // and return + var delimiter []rune + if closingCharExists { + delimiter = []rune{closingChar} + } else { + delimiter = openingChars + } + + makeRuleAndPushMaybe(RuleMakingConfig{ + delimiter: delimiter, + tokenType: Punctuation, + mutator: Pop(1), + rulePosition: topRule, + state: state, + stateName: "regex", + pushToStack: true, + numberOfDelimiterChars: nChars, + }) + + return nil + } + + text := state.Text + + var endPos int + + var nonMirroredOpeningCharPosition int + + if !closingCharExists { + // it's not a mirrored character, which means we + // just need to look for the next occurrence + nonMirroredOpeningCharPosition = indexAt(text, openingChars, state.Pos) + endPos = nonMirroredOpeningCharPosition + } else { + if tokenClass != rakuPod { + closingChars = []rune(strings.Repeat(string(closingChar), nChars)) + } + + // we need to look for the corresponding closing character, + // keep nesting in mind + nestingLevel := 1 + + searchPos := state.Pos - nChars + + var nextClosePos int + + for nestingLevel > 0 { + nextOpenPos := indexAt(text, openingChars, searchPos+nChars) + nextClosePos = indexAt(text, closingChars, searchPos+nChars) + + switch { + case nextClosePos == -1: + nextClosePos = len(text) + nestingLevel = 0 + case nextOpenPos != -1 && nextOpenPos < nextClosePos: + nestingLevel++ + nChars = len(openingChars) + searchPos = nextOpenPos + default: // next_close_pos < next_open_pos + nestingLevel-- + nChars = len(closingChars) + searchPos = nextClosePos + } + } + + endPos = nextClosePos + } + + if endPos < 0 { + // if we didn't find a closer, just highlight the + // rest of the text in this class + endPos = len(text) + } + + adverbre := regexp.MustCompile(`:to\b|:heredoc\b`) + var heredocTerminator []rune + if adverbre.MatchString(string(adverbs)) { + heredocTerminator = text[state.Pos:endPos] + if len(heredocTerminator) > 0 { + endHeredocPos := indexAt(text[endPos:], heredocTerminator, 0) + nChars = len(heredocTerminator) + endPos += endHeredocPos + } else { + endPos = len(text) + } + } + + textBetweenBrackets := string(text[state.Pos:endPos]) + switch tokenClass { + case rakuPod, rakuPodDeclaration, rakuNameAttribute: + state.NamedGroups[`value`] = textBetweenBrackets + state.NamedGroups[`closing_delimiters`] = string(closingChars) + case rakuQuote: + if len(heredocTerminator) > 0 { + // Length of heredoc terminator + closing chars + `;` + heredocFristPunctuationLen := len(heredocTerminator) + len(openingChars) + 1 + + state.NamedGroups[`opening_delimiters`] = string(openingChars) + + string(text[state.Pos:state.Pos+heredocFristPunctuationLen]) + + state.NamedGroups[`value`] = + string(text[state.Pos+heredocFristPunctuationLen : endPos]) + + state.NamedGroups[`closing_delimiters`] = string(heredocTerminator) + } else { + state.NamedGroups[`value`] = textBetweenBrackets + state.NamedGroups[`closing_delimiters`] = string(closingChars) + } + default: + state.Groups = []string{state.Groups[0] + string(text[state.Pos:endPos+nChars])} + } + + state.Pos = endPos + nChars + + return nil + } + } + + // Raku rules + // Empty capture groups are placeholders and will be replaced by bracketsFinder. + // DO NOT REMOVE THEM! + return Rules{ + "root": { + Include("common"), + {`[{}();]`, Punctuation, nil}, + {`\[|\]`, Operator, nil}, + {`.+?`, Text, nil}, + }, + "common": { + {`^#![^\n]*$`, CommentHashbang, nil}, + Include("pod"), + // Multi-line, Embedded comment + { + "#`(?<opening_delimiters>(?<delimiter>" + bracketsPattern + `)\k<delimiter>*)`, + CommentMultiline, + bracketsFinder(rakuMultilineComment), + }, + {`#[^\n]*$`, CommentSingle, nil}, + // /regex/ + { + `(?<=(?:^|\(|=|:|~~|\[|,|=>)\s*)(/)(?!\]|\))((?:\\\\|\\/|.)*?)((?<!(?<!\\)\\)/(?!'|"))`, + ByGroups(Punctuation, UsingSelf("regex"), Punctuation), + MutatorFunc(makeRegexPoppingRule), + }, + Include("variable"), + // ::?VARIABLE + {`::\?\w+(?::[_UD])?`, NameVariableGlobal, nil}, + // Version + { + `\b(v)(\d+)((?:\.(?:\*|[\d\w]+))*)(\+)?`, + ByGroups(Keyword, NumberInteger, NameEntity, Operator), + nil, + }, + Include("number"), + // Hyperoperator | »*« + {`(>>)(\S+?)(<<)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + {`(»)(\S+?)(«)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + // Hyperoperator | «*« + {`(<<)(\S+?)(<<)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + {`(«)(\S+?)(«)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + // Hyperoperator | »*» + {`(>>)(\S+?)(>>)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + {`(»)(\S+?)(»)`, ByGroups(Operator, UsingSelf("root"), Operator), nil}, + // <<quoted words>> + {`(?<!(?:\d+|\.(?:Int|Numeric)|[$@%][\w':-]+\s+|[\])}]\s+)\s*)(<<)(?!(?:(?!>>)[^\n])+?[},;] *\n)(?!(?:(?!>>).)+?>>\S+?>>)`, Punctuation, Push("<<")}, + // «quoted words» + {`(?<!(?:\d+|\.(?:Int|Numeric)|[$@%][\w':-]+\s+|[\])}]\s+)\s*)(«)(?![^»]+?[},;] *\n)(?![^»]+?»\S+?»)`, Punctuation, Push("«")}, + // [<] + {`(?<=\[\\?)<(?=\])`, Operator, nil}, + // < and > operators | something < onething > something + { + `(?<=[$@%&]?\w[\w':-]* +)(<=?)( *[^ ]+? *)(>=?)(?= *[$@%&]?\w[\w':-]*)`, + ByGroups(Operator, UsingSelf("root"), Operator), + nil, + }, + // <quoted words> + { + `(?<!(?:\d+|\.(?:Int|Numeric)|[$@%][\w':-]+\s+|[\])}]\s+)\s*)(<)((?:(?![,;)}] *(?:#[^\n]+)?\n)[^<>])+?)(>)(?!\s*(?:\d+|\.(?:Int|Numeric)|[$@%]\w[\w':-]*[^(]|\s+\[))`, + ByGroups(Punctuation, String, Punctuation), + nil, + }, + {`C?X::['\w:-]+`, NameException, nil}, + Include("metaoperator"), + // Pair | (key) => value + { + `(\([^)]+\))(\s*)(=>)(\s*)([^,\n]+)(,?\n*)`, + ByGroups(UsingSelf("root"), Text, Operator, Text, UsingSelf("root"), Text), + nil, + }, + // Pair | key => value + { + `(\w[\w'-]*)(\s*)(=>)(\s*)([^,\n]+)(,?\n*)`, + ByGroups(String, Text, Operator, Text, UsingSelf("root"), Text), + nil, + }, + Include("colon-pair"), + // Token + { + // Token with adverbs + `(?<=(?:^|\s)(?:regex|token|rule)(\s+))(['\w:-]+)(?=:['\w-]+` + + colonPairOpeningBrackets + `.+?` + colonPairClosingBrackets + `[({])`, + NameFunction, + Push("token", "name-adverb"), + }, + { + // Token without adverbs + `(?<=(?:^|\s)(?:regex|token|rule)(?:\s+))(['\w:-]+)`, + NameFunction, + Push("token"), + }, + // Substitution + {`(?<=^|\b|\s)(?<!\.)(ss|S|s|TR|tr)\b(\s*)`, ByGroups(Keyword, Text), Push("substitution")}, + {keywordsPattern, Keyword, nil}, + {builtinTypesPattern, NameBuiltin, nil}, + {builtinRoutinesPattern, NameBuiltin, nil}, + // Class name + { + `(?<=(?:^|\s)(?:class|grammar|role|does|but|is|subset|of)\s+)` + namePattern, + NameClass, + Push("name-adverb"), + }, + // Routine + { + // Routine with adverbs + `(?<=(?:^|\s)(?:sub|method|multi sub|multi)\s+)!?['\w:-]+(?=:['\w-]+` + + colonPairOpeningBrackets + `.+?` + colonPairClosingBrackets + `[({])`, + NameFunction, + Push("name-adverb"), + }, + { + // Routine without adverbs + `(?<=(?:^|\s)(?:sub|submethod|method|multi)\s+)!?['\w:-]+`, + NameFunction, + nil, + }, + // Constant + {`(?<=\bconstant\s+)` + namePattern, NameConstant, Push("name-adverb")}, + // Namespace + {`(?<=\b(?:use|module|package)\s+)` + namePattern, NameNamespace, Push("name-adverb")}, + Include("operator"), + Include("single-quote"), + {`(?<!(?<!\\)\\)"`, Punctuation, Push("double-quotes")}, + // m,rx regex + {`(?<=^|\b|\s)(ms|m|rx)\b(\s*)`, ByGroups(Keyword, Text), Push("rx")}, + // Quote constructs + { + `(?<=^|\b|\s)(?<keyword>(?:qq|q|Q))(?<adverbs>(?::?(?:heredoc|to|qq|ww|q|w|s|a|h|f|c|b|to|v|x))*)(?<ws>\s*)(?<opening_delimiters>(?<delimiter>[^0-9a-zA-Z:\s])\k<delimiter>*)`, + EmitterFunc(quote), + bracketsFinder(rakuQuote), + }, + // Function + { + `\b(?:\w['\w:-]*)(?=:['\w-]+` + + colonPairOpeningBrackets + `.+?` + colonPairClosingBrackets + `\()`, + NameFunction, + Push("name-adverb"), + }, + {`\b(?:\w['\w:-]*)(?=\()`, NameFunction, nil}, + // Method + // Method with adverb + { + `(?<!\.\.[?^*+]?)(?<=(?:\.[?^*+&]?)|self!)['\w:-]+(?=:['\w-]+` + + colonPairOpeningBrackets + `.+?` + colonPairClosingBrackets + `$)`, + NameFunction, + Push("name-adverb"), + }, + // Method without adverb + {`(?<!\.\.[?^*+]?)(?<=(?:\.[?^*+&]?)|self!)['\w:-]+`, NameFunction, nil}, + // Indirect invocant + {namePattern + `(?=\s+\W?['\w:-]+:\W)`, NameFunction, Push("name-adverb")}, + {`(?<=\W)(?:∅|i|e|𝑒|tau|τ|pi|π|Inf|∞)(?=\W)`, NameConstant, nil}, + {`(「)([^」]*)(」)`, ByGroups(Punctuation, String, Punctuation), nil}, + {`(?<=^ *)\b` + namePattern + `(?=:\s*(?:for|while|loop))`, NameLabel, nil}, + // Sigilless variable + { + `(?<=\b(?:my|our|constant|let|temp)\s+)\\` + namePattern, + NameVariable, + Push("name-adverb"), + }, + {namePattern, Name, Push("name-adverb")}, + }, + "rx": { + Include("colon-pair-attribute"), + { + `(?<opening_delimiters>(?<delimiter>[^\w:\s])\k<delimiter>*)`, + ByGroupNames(map[string]Emitter{ + `opening_delimiters`: Punctuation, + `delimiter`: nil, + }), + Mutators(Pop(1), bracketsFinder(rakuMatchRegex)), + }, + }, + "substitution": { + Include("colon-pair-attribute"), + // Substitution | s{regex} = value + { + `(?<opening_delimiters>(?<delimiter>` + bracketsPattern + `)\k<delimiter>*)`, + ByGroupNames(map[string]Emitter{ + `opening_delimiters`: Punctuation, + `delimiter`: nil, + }), + Mutators(Pop(1), bracketsFinder(rakuSubstitutionSingleRegex)), + }, + // Substitution | s/regex/string/ + { + `([^\w:\s])((?:\\\\|\\/|.)*?)(\1)((?:\\\\|\\/|.)*?)(\1)`, + ByGroups( + Punctuation, UsingSelf("regex"), Punctuation, UsingSelf("qq"), Punctuation, + ), + Mutators(Pop(1), MutatorFunc(makeRegexPoppingRule)), + }, + }, + "number": { + {`0_?[0-7]+(_[0-7]+)*`, LiteralNumberOct, nil}, + {`0x[0-9A-Fa-f]+(_[0-9A-Fa-f]+)*`, LiteralNumberHex, nil}, + {`0b[01]+(_[01]+)*`, LiteralNumberBin, nil}, + { + `(?i)(\d*(_\d*)*\.\d+(_\d*)*|\d+(_\d*)*\.\d+(_\d*)*)(e[+-]?\d+)?`, + LiteralNumberFloat, + nil, + }, + {`(?i)\d+(_\d*)*e[+-]?\d+(_\d*)*`, LiteralNumberFloat, nil}, + {`(?<=\d+)i`, NameConstant, nil}, + {`\d+(_\d+)*`, LiteralNumberInteger, nil}, + }, + "name-adverb": { + Include("colon-pair-attribute-keyvalue"), + Default(Pop(1)), + }, + "colon-pair": { + // :key(value) + {colonPairPattern, colonPair(String), bracketsFinder(rakuNameAttribute)}, + // :123abc + { + `(:)(\d+)(\w[\w'-]*)(\s*[,;)]?\s*$)`, + ByGroups(Punctuation, UsingSelf("number"), String, Text), + nil, + }, + // :key + {`(:!?)(\w[\w'-]*)`, ByGroups(Punctuation, String), nil}, + {`\s+`, Text, nil}, + }, + "colon-pair-attribute": { + // :key(value) + {colonPairPattern, colonPair(NameAttribute), bracketsFinder(rakuNameAttribute)}, + // :123abc + { + `(:)(\d+)(\w+)(\s*[,;)]?\s*$)`, + ByGroups(Punctuation, UsingSelf("number"), NameAttribute, Text), + nil, + }, + // :key + {`(:!?)(\w[\w'-]*)`, ByGroups(Punctuation, NameAttribute), nil}, + {`\s+`, Text, nil}, + }, + "colon-pair-attribute-keyvalue": { + // :key(value) + {colonPairPattern, colonPair(NameAttribute), bracketsFinder(rakuNameAttribute)}, + }, + "escape-qq": { + { + `(?<!(?<!\\)\\)(\\qq)(\[)(.+?)(\])`, + ByGroups(StringEscape, Punctuation, UsingSelf("qq"), Punctuation), + nil, + }, + }, + "escape-c-name": { + { + `(?<!(?<!\\)\\)(\\[c|C])(\[)(.+?)(\])`, + ByGroups(StringEscape, Punctuation, String, Punctuation), + nil, + }, + }, + "escape-hexadecimal": { + { + `(?<!(?<!\\)\\)(\\[x|X])(\[)([0-9a-fA-F]+)(\])`, + ByGroups(StringEscape, Punctuation, NumberHex, Punctuation), + nil, + }, + {`(\\[x|X])([0-9a-fA-F]+)`, ByGroups(StringEscape, NumberHex), nil}, + }, + "regex": { + // Placeholder, will be overwritten by bracketsFinder, DO NOT REMOVE! + {`^$`, nil, nil}, + Include("regex-escape-class"), + // $(code) + { + `(?<!(?<!\\)\\)([$@])(\()(.*?)(\))`, + ByGroups(Keyword, Punctuation, UsingSelf("root"), Punctuation), + nil, + }, + // Exclude $/ from variables, because we can't get out of the end of the slash regex: $/; + {`\$(?=/)`, NameEntity, nil}, + // Exclude $ from variables + {`\$(?=\z|\s|[^<(\w*!.])`, NameEntity, nil}, + Include("variable"), + Include("escape-c-name"), + Include("escape-hexadecimal"), + Include("number"), + Include("single-quote"), + // :my variable code ... + { + `(?<!(?<!\\)\\)(:)(my|our|state|constant|temp|let)(.+?;)`, + ByGroups(Operator, KeywordDeclaration, UsingSelf("root")), + nil, + }, + // <{code}> + { + `(?<!(?<!\\)\\)(<)([?!])?((?<!(?<!\\)\\){)(.*?)(}>)`, + ByGroups(Punctuation, Operator, Punctuation, UsingSelf("root"), Punctuation), + nil, + }, + // {code} + {`(?<!(?<!\\)\\)({)(.*?)(})`, ByGroups(Punctuation, UsingSelf("root"), Punctuation), nil}, + // Properties + {`(:)(\w+)`, ByGroups(Punctuation, NameAttribute), nil}, + // Operator + {`\|\||\||&&|&|\.\.|\*\*|%%|%|:|!|<<|«|>>|»|\+|\*\*|\*|\?|=|~|<~~>`, Operator, nil}, + // Anchors + {`\^\^|\^|\$\$|\$`, NameEntity, nil}, + {`\.`, NameEntity, nil}, + {`#[^\n]*\n`, CommentSingle, nil}, + // Lookaround + { + `(?<!(?<!\\)\\)(<)(\s*)([?!.])(\s*)(after|before)`, + ByGroups(Punctuation, Text, Operator, Text, OperatorWord), + Push("regex"), + }, + { + `(?<!(?<!\\)\\)(<)([|!?.]*)(wb|ww|ws|w)(>)`, + ByGroups(Punctuation, Operator, OperatorWord, Punctuation), + nil, + }, + // <$variable> + { + `(?<!(?<!\\)\\)(<)([$@]\w[\w-:]*)(>)`, + ByGroups(Punctuation, NameVariable, Punctuation), + nil, + }, + // Capture markers + {`(?<!(?<!\\)\\)<\(|\)>`, Operator, nil}, + {`(?<!(?<!\\)\\)<`, Punctuation, Push("regex-property")}, + {`(?<!(?<!\\)\\)"`, Punctuation, Push("double-quotes")}, + {`(?<!(?<!\\)\\)(?:\]|\)|>)`, Punctuation, Pop(1)}, + {`(?<!(?<!\\)\\)(?:\[|\()`, Punctuation, Push("regex")}, + {`.+?`, StringRegex, nil}, + }, + "regex-class-builtin": { + { + `\b(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|same|ident)\b`, + NameBuiltin, + nil, + }, + }, + "regex-property": { + {`(?<!(?<!\\)\\)>`, Punctuation, Pop(1)}, + Include("regex-class-builtin"), + Include("variable"), + // <regexfunc> | <regexfunc(parameter)> | <variable=regexfunc> + { + `(?:(\w[\w-:]*)(=\.?))?(&?\w[\w'-:]+?)(\(.+?\))?(?=>)`, + ByGroups( + NameVariable, Operator, NameFunction, UsingSelf("root"), + ), + nil, + }, + // <func: value> + { + `(&?\w[\w':-]*?)(:)((?:.*?(?:\$<\w[\w':-]*>)?.*?)*?)(?=>)`, + ByGroups( + NameFunction, Punctuation, UsingSelf("root"), + ), + nil, + }, + Include("colon-pair-attribute"), + {`(?<!(?<!\\)\\)\[`, Punctuation, Push("regex-character-class")}, + {`\+|\-`, Operator, nil}, + {`@[\w'-:]+`, NameVariable, nil}, + {`(?<=<)[|!?.]`, Operator, nil}, + {`.+?`, StringRegex, nil}, + }, + "regex-escape-class": { + {`(?i)\\n|\\t|\\h|\\v|\\s|\\d|\\w`, StringEscape, nil}, + }, + "regex-character-class": { + {`(?<!(?<!\\)\\)\]`, Punctuation, Pop(1)}, + Include("regex-escape-class"), + Include("escape-c-name"), + Include("escape-hexadecimal"), + Include("number"), + {`\.\.`, Operator, nil}, + {`.+?`, StringRegex, nil}, + }, + "metaoperator": { + // Z[=>] + { + `\b([RZX]+)\b(\[)([^\s\]]+?)(\])`, + ByGroups(OperatorWord, Punctuation, UsingSelf("root"), Punctuation), + nil, + }, + // Z=> + {`\b([RZX]+)\b([^\s\]]+)`, ByGroups(OperatorWord, UsingSelf("operator")), nil}, + }, + "operator": { + // Word Operator + {wordOperatorsPattern, OperatorWord, nil}, + // Operator + {operatorsPattern, Operator, nil}, + }, + "pod": { + // Single-line pod declaration + {`(#[|=])\s`, Keyword, Push("pod-single")}, + // Multi-line pod declaration + { + "(?<keyword>#[|=])(?<opening_delimiters>(?<delimiter>" + bracketsPattern + `)\k<delimiter>*)(?<value>)(?<closing_delimiters>)`, + ByGroupNames( + map[string]Emitter{ + `keyword`: Keyword, + `opening_delimiters`: Punctuation, + `delimiter`: nil, + `value`: UsingSelf("pod-begin"), + `closing_delimiters`: Punctuation, + }), + bracketsFinder(rakuPodDeclaration), + }, + Include("pod-blocks"), + }, + "pod-blocks": { + // =begin code + { + `(?<=^ *)(?<ws> *)(?<keyword>=begin)(?<ws2> +)(?<name>code)(?<config>[^\n]*)(?<value>.*?)(?<ws3>^\k<ws>)(?<end_keyword>=end)(?<ws4> +)\k<name>`, + EmitterFunc(podCode), + nil, + }, + // =begin + { + `(?<=^ *)(?<ws> *)(?<keyword>=begin)(?<ws2> +)(?!code)(?<name>\w[\w'-]*)(?<config>[^\n]*)(?<value>)(?<closing_delimiters>)`, + ByGroupNames( + map[string]Emitter{ + `ws`: Comment, + `keyword`: Keyword, + `ws2`: StringDoc, + `name`: Keyword, + `config`: EmitterFunc(podConfig), + `value`: UsingSelf("pod-begin"), + `closing_delimiters`: Keyword, + }), + bracketsFinder(rakuPod), + }, + // =for ... + { + `(?<=^ *)(?<ws> *)(?<keyword>=(?:for|defn))(?<ws2> +)(?<name>\w[\w'-]*)(?<config>[^\n]*\n)`, + ByGroups(Comment, Keyword, StringDoc, Keyword, EmitterFunc(podConfig)), + Push("pod-paragraph"), + }, + // =config + { + `(?<=^ *)(?<ws> *)(?<keyword>=config)(?<ws2> +)(?<name>\w[\w'-]*)(?<config>[^\n]*\n)`, + ByGroups(Comment, Keyword, StringDoc, Keyword, EmitterFunc(podConfig)), + nil, + }, + // =alias + { + `(?<=^ *)(?<ws> *)(?<keyword>=alias)(?<ws2> +)(?<name>\w[\w'-]*)(?<value>[^\n]*\n)`, + ByGroups(Comment, Keyword, StringDoc, Keyword, StringDoc), + nil, + }, + // =encoding + { + `(?<=^ *)(?<ws> *)(?<keyword>=encoding)(?<ws2> +)(?<name>[^\n]+)`, + ByGroups(Comment, Keyword, StringDoc, Name), + nil, + }, + // =para ... + { + `(?<=^ *)(?<ws> *)(?<keyword>=(?:para|table|pod))(?<config>(?<!\n\s*)[^\n]*\n)`, + ByGroups(Comment, Keyword, EmitterFunc(podConfig)), + Push("pod-paragraph"), + }, + // =head1 ... + { + `(?<=^ *)(?<ws> *)(?<keyword>=head\d+)(?<ws2> *)(?<config>#?)`, + ByGroups(Comment, Keyword, GenericHeading, Keyword), + Push("pod-single-heading"), + }, + // =item ... + { + `(?<=^ *)(?<ws> *)(?<keyword>=(?:item\d*|comment|data|[A-Z]+))(?<ws2> *)(?<config>#?)`, + ByGroups(Comment, Keyword, StringDoc, Keyword), + Push("pod-single"), + }, + { + `(?<=^ *)(?<ws> *)(?<keyword>=finish)(?<config>[^\n]*)`, + ByGroups(Comment, Keyword, EmitterFunc(podConfig)), + Push("pod-finish"), + }, + // ={custom} ... + { + `(?<=^ *)(?<ws> *)(?<name>=\w[\w'-]*)(?<ws2> *)(?<config>#?)`, + ByGroups(Comment, Name, StringDoc, Keyword), + Push("pod-single"), + }, + // = podconfig + { + `(?<=^ *)(?<keyword> *=)(?<ws> *)(?<config>(?::\w[\w'-]*(?:` + colonPairOpeningBrackets + `.+?` + + colonPairClosingBrackets + `) *)*\n)`, + ByGroups(Keyword, StringDoc, EmitterFunc(podConfig)), + nil, + }, + }, + "pod-begin": { + Include("pod-blocks"), + Include("pre-pod-formatter"), + {`.+?`, StringDoc, nil}, + }, + "pod-paragraph": { + {`\n\s*?\n`, StringDoc, Pop(1)}, + Include("pre-pod-formatter"), + {`.+?`, StringDoc, nil}, + }, + "pod-single": { + {`\n`, StringDoc, Pop(1)}, + Include("pre-pod-formatter"), + {`.+?`, StringDoc, nil}, + }, + "pod-single-heading": { + {`\n`, GenericHeading, Pop(1)}, + Include("pre-pod-formatter"), + {`.+?`, GenericHeading, nil}, + }, + "pod-finish": { + {`\z`, nil, Pop(1)}, + Include("pre-pod-formatter"), + {`.+?`, StringDoc, nil}, + }, + "pre-pod-formatter": { + // C<code>, B<bold>, ... + { + `(?<keyword>[CBIUDTKRPAELZVMSXN])(?<opening_delimiters><+|«)`, + ByGroups(Keyword, Punctuation), + Mutators( + bracketsFinder(rakuPodFormatter), + Push("pod-formatter"), MutatorFunc(podFormatter), + ), + }, + }, + "pod-formatter": { + // Placeholder rule, will be replaced by podFormatter. DO NOT REMOVE! + {`>`, Punctuation, Pop(1)}, + Include("pre-pod-formatter"), + // Placeholder rule, will be replaced by podFormatter. DO NOT REMOVE! + {`.+?`, StringOther, nil}, + }, + "variable": { + {variablePattern, NameVariable, Push("name-adverb")}, + {globalVariablePattern, NameVariableGlobal, Push("name-adverb")}, + {`[$@](?:<.*?>)+`, NameVariable, nil}, + {`\$/`, NameVariable, nil}, + {`\$!`, NameVariable, nil}, + {`[$@%]`, NameVariable, nil}, + }, + "single-quote": { + {`(?<!(?<!\\)\\)'`, Punctuation, Push("single-quote-inner")}, + }, + "single-quote-inner": { + {`(?<!(?<!(?<!\\)\\)\\)'`, Punctuation, Pop(1)}, + Include("escape-qq"), + {`(?:\\\\|\\[^\\]|[^'\\])+?`, StringSingle, nil}, + }, + "double-quotes": { + {`(?<!(?<!\\)\\)"`, Punctuation, Pop(1)}, + Include("qq"), + }, + "<<": { + {`>>(?!\s*(?:\d+|\.(?:Int|Numeric)|[$@%][\w':-]+|\s+\[))`, Punctuation, Pop(1)}, + Include("ww"), + }, + "«": { + {`»(?!\s*(?:\d+|\.(?:Int|Numeric)|[$@%][\w':-]+|\s+\[))`, Punctuation, Pop(1)}, + Include("ww"), + }, + "ww": { + Include("single-quote"), + Include("qq"), + }, + "qq": { + Include("qq-variable"), + // Function with adverb + { + `\w[\w:'-]+(?=:['\w-]+` + + colonPairOpeningBrackets + `.+?` + colonPairClosingBrackets + `\()`, + NameFunction, + Push("qq-function", "name-adverb"), + }, + // Function without adverb + {`\w[\w:'-]+(?=\((?!"))`, NameFunction, Push("qq-function")}, + Include("closure"), + Include("escape-hexadecimal"), + Include("escape-c-name"), + Include("escape-qq"), + {`.+?`, StringDouble, nil}, + }, + "qq-function": { + {`(\([^"]*?\))`, UsingSelf("root"), nil}, + Default(Pop(1)), + }, + "qq-variable": { + { + `(?<!(?<!\\)\\)(?:` + variablePattern + `|` + globalVariablePattern + `)`, + NameVariable, + Push("qq-variable-extras", "name-adverb"), + }, + }, + "qq-variable-extras": { + {`(?:\[.*?\]|\{.*?\}|<<.*?>>|<.*?>|«.*?»)+`, UsingSelf("root"), nil}, + // Method + { + `(\.)([^(\s]+)(\([^"]*?\))`, + ByGroups(Operator, NameFunction, UsingSelf("root")), + nil, + }, + Default(Pop(1)), + }, + "Q": { + Include("escape-qq"), + {`.+?`, String, nil}, + }, + "Q-closure": { + Include("escape-qq"), + Include("closure"), + {`.+?`, String, nil}, + }, + "Q-variable": { + Include("escape-qq"), + Include("qq-variable"), + {`.+?`, String, nil}, + }, + "closure": { + {`(?<!(?<!\\)\\)\{.+?\}`, UsingSelf("root"), nil}, + }, + "token": { + // Token signature + {`(\()(.+?)(\))`, ByGroups(Punctuation, UsingSelf("root"), Punctuation), nil}, + {`\{`, Punctuation, Mutators(Pop(1), bracketsFinder(rakuRegexInsideToken))}, + {`.+?`, Text, nil}, + }, + } +} + +// Joins keys and values of rune map +func joinRuneMap(m map[rune]rune) string { + runes := make([]rune, 0, len(m)*2) + for k, v := range m { + runes = append(runes, k) + runes = append(runes, v) + } + + return string(runes) +} + +// Finds the index of substring in the string starting at position n +func indexAt(str []rune, substr []rune, pos int) int { + text := string(str[pos:]) + + idx := strings.Index(text, string(substr)) + if idx > -1 { + idx = utf8.RuneCountInString(text[:idx]) + idx += pos + } + + return idx +} + +// Tells if an array of string contains a string +func contains(s []string, e string) bool { + for _, value := range s { + if value == e { + return true + } + } + return false +} + +type RakuFormatterRules struct { + pop, formatter *CompiledRule +} + +// Pop from the pod_formatter_stack and reformat the pod code +func podFormatterPopper(state *LexerState) error { + stack, ok := state.Get("pod_formatter_stack").([]RakuFormatterRules) + + if ok && len(stack) > 0 { + // Pop from stack + stack = stack[:len(stack)-1] + state.Set("pod_formatter_stack", stack) + // Call podFormatter to use the last formatter rules + err := podFormatter(state) + if err != nil { + panic(err) + } + } + + return nil +} + +// Use the rules from pod_formatter_stack to format the pod code +func podFormatter(state *LexerState) error { + stack, ok := state.Get("pod_formatter_stack").([]RakuFormatterRules) + if ok && len(stack) > 0 { + rules := stack[len(stack)-1] + state.Rules["pod-formatter"][0] = rules.pop + state.Rules["pod-formatter"][len(state.Rules["pod-formatter"])-1] = rules.formatter + } + + return nil +} + +type RulePosition int + +const ( + topRule RulePosition = iota + 1000 + bottomRule +) + +type RuleMakingConfig struct { + delimiter []rune + pattern string + tokenType TokenType + mutator Mutator + rulePosition RulePosition + state *LexerState + stateName string + pushToStack bool + numberOfDelimiterChars int +} + +// Makes compiled rules and returns them, If rule position is given, rules are added to the state +// If pushToStack is true, state name will be added to the state stack +func makeRuleAndPushMaybe(config RuleMakingConfig) *CompiledRule { + var rePattern string + if len(config.delimiter) > 0 { + delimiter := strings.Repeat(string(config.delimiter), config.numberOfDelimiterChars) + rePattern = regexp2.Escape(delimiter) + } else { + rePattern = config.pattern + } + regex := regexp2.MustCompile(rePattern, regexp2.None) + + cRule := &CompiledRule{ + Rule: Rule{rePattern, config.tokenType, config.mutator}, + Regexp: regex, + } + state := config.state + stateName := config.stateName + switch config.rulePosition { + case topRule: + state.Rules[stateName] = + append([]*CompiledRule{cRule}, state.Rules[stateName][1:]...) + case bottomRule: + state.Rules[stateName] = + append(state.Rules[stateName][:len(state.Rules[stateName])-1], cRule) + } + + // Push state name to stack if asked + if config.pushToStack { + state.Stack = append(state.Stack, config.stateName) + } + + return cRule +} + +// Used when the regex knows its own delimiter and uses `UsingSelf("regex")`, +// it only puts a placeholder rule at the top of "regex" state +func makeRegexPoppingRule(state *LexerState) error { + makeRuleAndPushMaybe(RuleMakingConfig{ + pattern: `^$`, + rulePosition: topRule, + state: state, + stateName: "regex", + }) + + return nil +} + +// Emitter for colon pairs, changes token state based on key and brackets +func colonPair(tokenClass TokenType) Emitter { + return EmitterFunc(func(groups []string, state *LexerState) Iterator { + iterators := []Iterator{} + tokens := []Token{ + {Punctuation, state.NamedGroups[`colon`]}, + {Punctuation, state.NamedGroups[`opening_delimiters`]}, + {Punctuation, state.NamedGroups[`closing_delimiters`]}, + } + + // Append colon + iterators = append(iterators, Literator(tokens[0])) + + if tokenClass == NameAttribute { + iterators = append(iterators, Literator(Token{NameAttribute, state.NamedGroups[`key`]})) + } else { + var keyTokenState string + keyre := regexp.MustCompile(`^\d+$`) + if keyre.MatchString(state.NamedGroups[`key`]) { + keyTokenState = "common" + } else { + keyTokenState = "Q" + } + + // Use token state to Tokenise key + if keyTokenState != "" { + iterator, err := state.Lexer.Tokenise( + &TokeniseOptions{ + State: keyTokenState, + Nested: true, + }, state.NamedGroups[`key`]) + + if err != nil { + panic(err) + } else { + // Append key + iterators = append(iterators, iterator) + } + } + } + + // Append punctuation + iterators = append(iterators, Literator(tokens[1])) + + var valueTokenState string + + switch state.NamedGroups[`opening_delimiters`] { + case "(", "{", "[": + valueTokenState = "root" + case "<<", "«": + valueTokenState = "ww" + case "<": + valueTokenState = "Q" + } + + // Use token state to Tokenise value + if valueTokenState != "" { + iterator, err := state.Lexer.Tokenise( + &TokeniseOptions{ + State: valueTokenState, + Nested: true, + }, state.NamedGroups[`value`]) + + if err != nil { + panic(err) + } else { + // Append value + iterators = append(iterators, iterator) + } + } + // Append last punctuation + iterators = append(iterators, Literator(tokens[2])) + + return Concaterator(iterators...) + }) +} + +// Emitter for quoting constructs, changes token state based on quote name and adverbs +func quote(groups []string, state *LexerState) Iterator { + keyword := state.NamedGroups[`keyword`] + adverbsStr := state.NamedGroups[`adverbs`] + iterators := []Iterator{} + tokens := []Token{ + {Keyword, keyword}, + {StringAffix, adverbsStr}, + {Text, state.NamedGroups[`ws`]}, + {Punctuation, state.NamedGroups[`opening_delimiters`]}, + {Punctuation, state.NamedGroups[`closing_delimiters`]}, + } + + // Append all tokens before dealing with the main string + iterators = append(iterators, Literator(tokens[:4]...)) + + var tokenStates []string + + // Set tokenStates based on adverbs + adverbs := strings.Split(adverbsStr, ":") + for _, adverb := range adverbs { + switch adverb { + case "c", "closure": + tokenStates = append(tokenStates, "Q-closure") + case "qq": + tokenStates = append(tokenStates, "qq") + case "ww": + tokenStates = append(tokenStates, "ww") + case "s", "scalar", "a", "array", "h", "hash", "f", "function": + tokenStates = append(tokenStates, "Q-variable") + } + } + + var tokenState string + + switch { + case keyword == "qq" || contains(tokenStates, "qq"): + tokenState = "qq" + case adverbsStr == "ww" || contains(tokenStates, "ww"): + tokenState = "ww" + case contains(tokenStates, "Q-closure") && contains(tokenStates, "Q-variable"): + tokenState = "qq" + case contains(tokenStates, "Q-closure"): + tokenState = "Q-closure" + case contains(tokenStates, "Q-variable"): + tokenState = "Q-variable" + default: + tokenState = "Q" + } + + iterator, err := state.Lexer.Tokenise( + &TokeniseOptions{ + State: tokenState, + Nested: true, + }, state.NamedGroups[`value`]) + + if err != nil { + panic(err) + } else { + iterators = append(iterators, iterator) + } + + // Append the last punctuation + iterators = append(iterators, Literator(tokens[4])) + + return Concaterator(iterators...) +} + +// Emitter for pod config, tokenises the properties with "colon-pair-attribute" state +func podConfig(groups []string, state *LexerState) Iterator { + // Tokenise pod config + iterator, err := state.Lexer.Tokenise( + &TokeniseOptions{ + State: "colon-pair-attribute", + Nested: true, + }, groups[0]) + + if err != nil { + panic(err) + } else { + return iterator + } +} + +// Emitter for pod code, tokenises the code based on the lang specified +func podCode(groups []string, state *LexerState) Iterator { + iterators := []Iterator{} + tokens := []Token{ + {Comment, state.NamedGroups[`ws`]}, + {Keyword, state.NamedGroups[`keyword`]}, + {Keyword, state.NamedGroups[`ws2`]}, + {Keyword, state.NamedGroups[`name`]}, + {StringDoc, state.NamedGroups[`value`]}, + {Comment, state.NamedGroups[`ws3`]}, + {Keyword, state.NamedGroups[`end_keyword`]}, + {Keyword, state.NamedGroups[`ws4`]}, + {Keyword, state.NamedGroups[`name`]}, + } + + // Append all tokens before dealing with the pod config + iterators = append(iterators, Literator(tokens[:4]...)) + + // Tokenise pod config + iterators = append(iterators, podConfig([]string{state.NamedGroups[`config`]}, state)) + + langMatch := regexp.MustCompile(`:lang\W+(\w+)`).FindStringSubmatch(state.NamedGroups[`config`]) + var lang string + if len(langMatch) > 1 { + lang = langMatch[1] + } + + // Tokenise code based on lang property + sublexer := internal.Get(lang) + if sublexer != nil { + iterator, err := sublexer.Tokenise(nil, state.NamedGroups[`value`]) + + if err != nil { + panic(err) + } else { + iterators = append(iterators, iterator) + } + } else { + iterators = append(iterators, Literator(tokens[4])) + } + + // Append the rest of the tokens + iterators = append(iterators, Literator(tokens[5:]...)) + + return Concaterator(iterators...) +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/r/rst.go b/vendor/github.com/alecthomas/chroma/lexers/r/rst.go index 1e11cc65bf..2a874790e6 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/r/rst.go +++ b/vendor/github.com/alecthomas/chroma/lexers/r/rst.go @@ -63,7 +63,7 @@ func restructuredtextRules() Rules { } } -func rstCodeBlock(groups []string, lexer Lexer) Iterator { +func rstCodeBlock(groups []string, state *LexerState) Iterator { iterators := []Iterator{} tokens := []Token{ {Punctuation, groups[1]}, @@ -75,7 +75,7 @@ func rstCodeBlock(groups []string, lexer Lexer) Iterator { {Text, groups[7]}, } code := strings.Join(groups[8:], "") - lexer = internal.Get(groups[6]) + lexer := internal.Get(groups[6]) if lexer == nil { tokens = append(tokens, Token{String, code}) iterators = append(iterators, Literator(tokens...)) diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/scss.go b/vendor/github.com/alecthomas/chroma/lexers/s/scss.go index 712057553c..e489adedfe 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/scss.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/scss.go @@ -20,24 +20,43 @@ var Scss = internal.Register(MustNewLazyLexer( )) func scssRules() Rules { + cssProperties := []string{`src`, `align-content`, `align-items`, `align-self`, `all`, `animation`, `animation-delay`, `animation-direction`, `animation-duration`, `animation-fill-mode`, `animation-iteration-count`, `animation-name`, `animation-play-state`, `animation-timing-function`, `appearance`, `aspect-ratio`, `backface-visibility`, `background`, `background-attachment`, `background-blend-mode`, `background-clip`, `background-color`, `background-image`, `background-origin`, `background-position`, `background-repeat`, `background-size`, `block-size`, `border`, `border-block`, `border-block-color`, `border-block-end`, `border-block-end-color`, `border-block-end-style`, `border-block-end-width`, `border-block-start`, `border-block-start-color`, `border-block-start-style`, `border-block-start-width`, `border-block-style`, `border-block-width`, `border-bottom`, `border-bottom-color`, `border-bottom-left-radius`, `border-bottom-right-radius`, `border-bottom-style`, `border-bottom-width`, `border-collapse`, `border-color`, `border-end-end-radius`, `border-end-start-radius`, `border-image`, `border-image-outset`, `border-image-repeat`, `border-image-slice`, `border-image-source`, `border-image-width`, `border-inline`, `border-inline-color`, `border-inline-end`, `border-inline-end-color`, `border-inline-end-style`, `border-inline-end-width`, `border-inline-start`, `border-inline-start-color`, `border-inline-start-style`, `border-inline-start-width`, `border-inline-style`, `border-inline-width`, `border-left`, `border-left-color`, `border-left-style`, `border-left-width`, `border-radius`, `border-right`, `border-right-color`, `border-right-style`, `border-right-width`, `border-spacing`, `border-start-end-radius`, `border-start-start-radius`, `border-style`, `border-top`, `border-top-color`, `border-top-left-radius`, `border-top-right-radius`, `border-top-style`, `border-top-width`, `border-width`, `bottom`, `box-decoration-break`, `box-shadow`, `box-sizing`, `break-after`, `break-before`, `break-inside`, `caption-side`, `caret-color`, `clear`, `clip`, `clip-path`, `color`, `color-adjust`, `column-count`, `column-fill`, `column-gap`, `column-rule`, `column-rule-color`, `column-rule-style`, `column-rule-width`, `column-span`, `column-width`, `columns`, `content`, `content-visibility`, `counter-increment`, `counter-reset`, `counter-set`, `cursor`, `direction`, `display`, `empty-cells`, `filter`, `flex`, `flex-basis`, `flex-direction`, `flex-flow`, `flex-grow`, `flex-shrink`, `flex-wrap`, `float`, `font`, `font-family`, `font-feature-settings`, `font-kerning`, `font-language-override`, `font-optical-sizing`, `font-size`, `font-size-adjust`, `font-stretch`, `font-style`, `font-synthesis`, `font-variant`, `font-variant-caps`, `font-variant-east-asian`, `font-variant-emoji`, `font-variant-ligatures`, `font-variant-numeric`, `font-variant-position`, `font-weight`, `footnote-display`, `footnote-policy`, `forced-color-adjust`, `gap`, `grid`, `grid-area`, `grid-auto-columns`, `grid-auto-flow`, `grid-auto-rows`, `grid-column`, `grid-column-end`, `grid-column-start`, `grid-row`, `grid-row-end`, `grid-row-start`, `grid-template`, `grid-template-areas`, `grid-template-columns`, `grid-template-rows`, `hanging-punctuation`, `height`, `hyphens`, `image-orientation`, `image-rendering`, `image-resolution`, `initial-letter`, `initial-letter-align`, `initial-letter-wrap`, `inline-size`, `inline-sizing`, `inset`, `inset-block`, `inset-block-end`, `inset-block-start`, `inset-inline`, `inset-inline-end`, `inset-inline-start`, `isolation`, `justify-content`, `justify-items`, `justify-self`, `left`, `letter-spacing`, `lighting-color`, `line-break`, `line-clamp`, `line-grid`, `line-height`, `line-padding`, `line-snap`, `list-style`, `list-style-image`, `list-style-position`, `list-style-type`, `margin`, `margin-block`, `margin-block-end`, `margin-block-start`, `margin-bottom`, `margin-break`, `margin-inline`, `margin-inline-end`, `margin-inline-start`, `margin-left`, `margin-right`, `margin-top`, `margin-trim`, `mask`, `mask-border`, `mask-border-mode`, `mask-border-repeat`, `mask-border-slice`, `mask-border-source`, `mask-border-width`, `mask-clip`, `mask-composite`, `mask-image`, `mask-mode`, `mask-origin`, `mask-position`, `mask-repeat`, `mask-size`, `mask-type`, `max-block-size`, `max-height`, `max-lines`, `max-width`, `min-height`, `min-width`, `mix-blend-mode`, `nav-down`, `nav-left`, `nav-right`, `nav-up`, `object-fit`, `object-position`, `offset`, `offset-anchor`, `offset-distance`, `offset-path`, `offset-position`, `offset-rotate`, `opacity`, `order`, `orphans`, `outline`, `outline-color`, `outline-offset`, `outline-style`, `outline-width`, `overflow`, `overflow-anchor`, `overflow-block`, `overflow-clip-margin`, `overflow-inline`, `overflow-wrap`, `overflow-x`, `overflow-y`, `overscroll-behavior`, `overscroll-behavior-block`, `overscroll-behavior-inline`, `overscroll-behavior-x`, `overscroll-behavior-y`, `padding`, `padding-block`, `padding-block-end`, `padding-block-start`, `padding-bottom`, `padding-inline`, `padding-inline-end`, `padding-inline-start`, `padding-left`, `padding-right`, `padding-top`, `page`, `page-break-after`, `page-break-before`, `page-break-inside`, `page-orientation`, `perspective`, `perspective-origin`, `place-content`, `place-items`, `place-self`, `pointer-events`, `position`, `quotes`, `resize`, `right`, `rotate`, `row-gap`, `scale`, `scroll-behavior`, `scroll-margin`, `scroll-margin-block`, `scroll-margin-block-end`, `scroll-margin-block-start`, `scroll-margin-bottom`, `scroll-margin-inline`, `scroll-margin-inline-end`, `scroll-margin-inline-start`, `scroll-margin-left`, `scroll-margin-right`, `scroll-margin-top`, `scroll-padding`, `scroll-padding-block`, `scroll-padding-block-end`, `scroll-padding-block-start`, `scroll-padding-bottom`, `scroll-padding-inline`, `scroll-padding-inline-end`, `scroll-padding-inline-start`, `scroll-padding-left`, `scroll-padding-right`, `scroll-padding-top`, `scroll-snap-align`, `scroll-snap-stop`, `scroll-snap-type`, `scrollbar-color`, `scrollbar-gutter`, `scrollbar-width`, `shape-image-threshold`, `shape-inside`, `shape-margin`, `shape-outside`, `shape-padding`, `spatial-navigation-action`, `spatial-navigation-contain`, `spatial-navigation-function`, `string-set`, `tab-size`, `table-layout`, `text-align`, `text-align-all`, `text-align-last`, `text-combine-upright`, `text-decoration`, `text-decoration-color`, `text-decoration-line`, `text-decoration-skip`, `text-decoration-style`, `text-decoration-thickness`, `text-emphasis`, `text-emphasis-position`, `text-emphasis-style`, `text-group-align`, `text-indent`, `text-justify`, `text-orientation`, `text-overflow`, `text-rendering`, `text-shadow`, `text-size-adjust`, `text-space-trim`, `text-spacing`, `text-transform`, `text-underline-offset`, `text-underline-position`, `text-wrap`, `top`, `touch-action`, `transform`, `transform-box`, `transform-origin`, `transform-style`, `transition`, `transition-delay`, `transition-duration`, `transition-property`, `transition-timing-function`, `translate`, `unicode-bidi`, `user-select`, `vertical-align`, `visibility`, `white-space`, `widows`, `width`, `will-change`, `word-break`, `word-spacing`, `word-wrap`, `wrap-after`, `wrap-before`, `wrap-flow`, `wrap-inside`, `wrap-through`, `writing-mode`, `z-index`} + + cssPropertyValues := []string{ + `stretch`, `flex-start`, `flex-end`, `center`, `space-between`, `space-around`, `normal`, `baseline`, `first`, `last`, `space-evenly`, `start`, `end`, `safe`, `unsafe`, `self-start`, `self-end`, `auto`, `initial`, `inherit`, `unset`, `revert`, `reverse`, `alternate-reverse`, `alternate`, `none`, `forwards`, `both`, `backwards`, `infinite`, `running`, `paused`, `ease`, `linear`, `step-start`, `step-end`, `ease-in`, `ease-out`, `ease-in-out`, `cubic-bezier`, `textfield`, `menulist-button`, `searchfield`, `textarea`, `push-button`, `slider-horizontal`, `checkbox`, `radio`, `square-button`, `menulist`, `listbox`, `meter`, `progress-bar`, `button`, `visible`, `hidden`, `scroll`, `fixed`, `local`, `multiply`, `screen`, `overlay`, `darken`, `lighten`, `color-dodge`, `color-burn`, `hard-light`, `soft-light`, `difference`, `exclusion`, `hue`, `saturation`, `color`, `luminosity`, `border-box`, `padding-box`, `content-box`, `text`, `transparent`, `currentColor`, `url`, `element`, `image`, `image-set`, `cross-fade`, `top`, `bottom`, `left`, `right`, `repeat`, `no-repeat`, `space`, `round`, `repeat-y`, `repeat-x`, `cover`, `contain`, `max-content`, `min-content`, `available`, `fit-content`, `dotted`, `dashed`, `solid`, `double`, `groove`, `ridge`, `inset`, `outset`, `medium`, `thin`, `thick`, `separate`, `collapse`, `slice`, `clone`, `avoid`, `always`, `all`, `avoid-page`, `page`, `recto`, `verso`, `avoid-column`, `column`, `avoid-region`, `region`, `inline-start`, `inline-end`, `rect`, `circle`, `ellipse`, `polygon`, `path`, `margin-box`, `fill-box`, `stroke-box`, `view-box`, `economy`, `exact`, `balance`, `balance-all`, `open-quote`, `close-quote`, `no-open-quote`, `no-close-quote`, `contents`, `attr`, `target-counter`, `target-text`, `leader`, `default`, `context-menu`, `help`, `pointer`, `progress`, `wait`, `cell`, `crosshair`, `vertical-text`, `alias`, `copy`, `move`, `no-drop`, `not-allowed`, `grab`, `grabbing`, `all-scroll`, `col-resize`, `row-resize`, `n-resize`, `s-resize`, `w-resize`, `ne-resize`, `nw-resize`, `se-resize`, `sw-resize`, `ew-resize`, `ns-resize`, `nesw-resize`, `nwse-resize`, `zoom-in`, `zoom-out`, `ltr`, `rtl`, `inline`, `block`, `inline-block`, `inline-table`, `run-in`, `flow`, `flow-root`, `table`, `flex`, `grid`, `ruby`, `list-item`, `table-row-group`, `table-header-group`, `table-footer-group`, `table-row`, `table-cell`, `table-column-group`, `table-column`, `table-caption`, `ruby-base`, `ruby-text`, `ruby-base-container`, `ruby-text-container`, `inline-flex`, `inline-grid`, `show`, `hide`, `url;`, `blur`, `brightness`, `contrast`, `drop-shadow`, `grayscale`, `hue-rotate`, `invert`, `opacity`, `saturate`, `sepia`, `content`, `row`, `row-reverse`, `column-reverse`, `nowrap`, `wrap`, `wrap-reverse`, `block-start`, `block-end`, `caption`, `icon`, `menu`, `message-box`, `small-caption`, `status-bar`, `serif`, `sans-serif`, `cursive`, `fantasy`, `monospace`, `system-ui`, `emoji`, `math`, `fangsong`, `ui-serif`, `ui-sans-serif`, `ui-monospace`, `ui-rounded`, `xx-small`, `x-small`, `small`, `large`, `x-large`, `xx-large`, `xxx-large`, `smaller`, `larger`, `semi-condensed`, `condensed`, `extra-condensed`, `ultra-condensed`, `semi-expanded`, `expanded`, `extra-expanded`, `ultra-expanded`, `italic`, `weight`, `style`, `small-caps`, `all-small-caps`, `petite-caps`, `all-petite-caps`, `unicase`, `titling-caps`, `jis78`, `jis83`, `jis90`, `jis04`, `simplified`, `traditional`, `full-width`, `proportional-width`, `unicode`, `common-ligatures`, `no-common-ligatures`, `discretionary-ligatures`, `no-discretionary-ligatures`, `historical-ligatures`, `no-historical-ligatures`, `contextual`, `no-contextual`, `ordinal`, `slashed-zero`, `lining-nums`, `oldstyle-nums`, `proportional-nums`, `tabular-nums`, `diagonal-fractions`, `stacked-fractions`, `sub`, `super`, `bold`, `lighter`, `bolder`, `line`, `auto‑flow`, `minmax`, `auto;`, `dense`, `subgrid`, `masonry`, `force-end`, `allow-end`, `manual`, `from-image`, `smooth`, `high-quality`, `crisp-edges`, `pixelated`, `snap`, `alphabetic`, `ideographic`, `hebrew`, `hanging`, `isolate`, `legacy`, `white`, `strict`, `loose`, `anywhere`, `match-parent`, `create`, `outside`, `inside`, `disc`, `square`, `decimal`, `symbols`, `cjk-decimal`, `decimal-leading-zero`, `lower-roman`, `upper-roman`, `lower-greek`, `lower-alpha`, `lower-latin`, `upper-alpha`, `upper-latin`, `arabic-indic`, `armenian`, `bengali`, `cambodian`, `cjk-earthly-branch`, `cjk-heavenly-stem`, `cjk-ideographic`, `devanagari`, `ethiopic-numeric`, `georgian`, `gujarati`, `gurmukhi`, `hiragana`, `hiragana-iroha`, `japanese-formal`, `japanese-informal`, `kannada`, `katakana`, `katakana-iroha`, `khmer`, `korean-hangul-formal`, `korean-hanja-formal`, `korean-hanja-informal`, `lao`, `lower-armenian`, `malayalam`, `mongolian`, `myanmar`, `oriya`, `persian`, `simp-chinese-formal`, `simp-chinese-informal`, `tamil`, `telugu`, `thai`, `tibetan`, `trad-chinese-formal`, `trad-chinese-informal`, `upper-armenian`, `disclosure-open`, `disclosure-closed`, `keep`, `discard`, `in-flow`, `alpha`, `luminance`, `no-clip`, `add`, `subtract`, `intersect`, `exclude`, `match-source`, `current`, `fill`, `scale-down`, `ray`, `clip`, `break-word`, `upright`, `rotate-left`, `rotate-right`, `static`, `relative`, `absolute`, `sticky`, `horizontal`, `vertical`, `x`, `y`, `z`, `mandatory`, `proximity`, `dark`, `light`, `stable`, `force`, `outside-shape`, `display`, `focus`, `justify`, `justify-all`, `underline`, `overline`, `line-through`, `blink`, `spelling-error`, `grammar-error`, `wavy`, `from-font`, `over`, `under`, `filled`, `open`, `dot`, `double-circle`, `triangle`, `sesame`, `inter-word`, `inter-character`, `mixed`, `sideways`, `ellipsis`, `optimizeSpeed`, `optimizeLegibility`, `geometricPrecision`, `trim-inner`, `discard-before`, `discard-after`, `trim-start`, `space-start`, `space-first`, `trim-end`, `space-end`, `trim-adjacent`, `space-adjacent`, `no-compress`, `ideograph-alpha`, `ideograph-numeric`, `punctuation`, `capitalize`, `uppercase`, `lowercase`, `full-size-kana`, `pretty`, `pan-x`, `pan-left`, `pan-right`, `pan-y`, `pan-up`, `pan-down`, `manipulation`, `matrix`, `matrix3d`, `translate`, `translateX`, `translateY`, `translate3d`, `translateZ`, `scale`, `scaleX`, `scaleY`, `scaleZ`, `rotate`, `rotate3d`, `rotateX`, `rotateY`, `rotateZ`, `perspective`, `skew`, `skewX`, `skewY`, `flat`, `preserve-3d`, `border-bottom`, `embed`, `bidi-override`, `isolate-override`, `plaintext`, `middle`, `text-top`, `text-bottom`, `pre`, `pre-wrap`, `pre-line`, `scroll-position`, `transform`, `width`, `keep-all`, `break-all`, `avoid-line`, `avoid-flex`, `minimum`, `maximum`, `clear`, `horizontal-tb`, `vertical-rl`, `vertical-lr`, `sideways-rl`, `sideways-lr`, + } + + cssColorNames := []string{`AliceBlue`, `AntiqueWhite`, `Aqua`, `Aquamarine`, `Azure`, `Beige`, `Bisque`, `Black`, `BlanchedAlmond`, `Blue`, `BlueViolet`, `Brown`, `BurlyWood`, `CadetBlue`, `Chartreuse`, `Chocolate`, `Coral`, `CornflowerBlue`, `Cornsilk`, `Crimson`, `Cyan`, `DarkBlue`, `DarkCyan`, `DarkGoldenRod`, `DarkGray`, `DarkGrey`, `DarkGreen`, `DarkKhaki`, `DarkMagenta`, `DarkOliveGreen`, `DarkOrange`, `DarkOrchid`, `DarkRed`, `DarkSalmon`, `DarkSeaGreen`, `DarkSlateBlue`, `DarkSlateGray`, `DarkSlateGrey`, `DarkTurquoise`, `DarkViolet`, `DeepPink`, `DeepSkyBlue`, `DimGray`, `DimGrey`, `DodgerBlue`, `FireBrick`, `FloralWhite`, `ForestGreen`, `Fuchsia`, `Gainsboro`, `GhostWhite`, `Gold`, `GoldenRod`, `Gray`, `Grey`, `Green`, `GreenYellow`, `HoneyDew`, `HotPink`, `IndianRed`, `Indigo`, `Ivory`, `Khaki`, `Lavender`, `LavenderBlush`, `LawnGreen`, `LemonChiffon`, `LightBlue`, `LightCoral`, `LightCyan`, `LightGoldenRodYellow`, `LightGray`, `LightGrey`, `LightGreen`, `LightPink`, `LightSalmon`, `LightSeaGreen`, `LightSkyBlue`, `LightSlateGray`, `LightSlateGrey`, `LightSteelBlue`, `LightYellow`, `Lime`, `LimeGreen`, `Linen`, `Magenta`, `Maroon`, `MediumAquaMarine`, `MediumBlue`, `MediumOrchid`, `MediumPurple`, `MediumSeaGreen`, `MediumSlateBlue`, `MediumSpringGreen`, `MediumTurquoise`, `MediumVioletRed`, `MidnightBlue`, `MintCream`, `MistyRose`, `Moccasin`, `NavajoWhite`, `Navy`, `OldLace`, `Olive`, `OliveDrab`, `Orange`, `OrangeRed`, `Orchid`, `PaleGoldenRod`, `PaleGreen`, `PaleTurquoise`, `PaleVioletRed`, `PapayaWhip`, `PeachPuff`, `Peru`, `Pink`, `Plum`, `PowderBlue`, `Purple`, `RebeccaPurple`, `Red`, `RosyBrown`, `RoyalBlue`, `SaddleBrown`, `Salmon`, `SandyBrown`, `SeaGreen`, `SeaShell`, `Sienna`, `Silver`, `SkyBlue`, `SlateBlue`, `SlateGray`, `SlateGrey`, `Snow`, `SpringGreen`, `SteelBlue`, `Tan`, `Teal`, `Thistle`, `Tomato`, `Turquoise`, `Violet`, `Wheat`, `White`, `WhiteSmoke`, `Yellow`, `YellowGreen`} + + const cssPropertyPattern = `(?<!:\s*)[^ \t:="\[;(),.]+(?=[ \t]*:(?:#{|[^{])+?[;,])` + return Rules{ "root": { + {`[{}()]`, Punctuation, nil}, {`\s+`, Text, nil}, {`//.*?\n`, CommentSingle, nil}, {`/\*.*?\*/`, CommentMultiline, nil}, {`@import`, Keyword, Push("value")}, + { + `(@(?:use|forward))(\s+)([^\s;]+)(?:(\s+)(as)(\s+)(\w+|\*))?(?:(\s+)(with))?`, + ByGroups(Keyword, Text, UsingSelf("selector"), Text, Keyword, Text, NameNamespace, Text, Keyword), + Push("value"), + }, {`@for`, Keyword, Push("for")}, - {`@(debug|warn|if|while)`, Keyword, Push("value")}, - {`(@mixin)( [\w-]+)`, ByGroups(Keyword, NameFunction), Push("value")}, + {`@each`, Keyword, Push("each")}, + {`@(debug|warn|else if|if|while|return)`, Keyword, Push("value")}, + {`(@(?:mixin|function))( [\w-]+)`, ByGroups(Keyword, NameFunction), Push("value")}, {`(@include)( [\w-]+)`, ByGroups(Keyword, NameDecorator), Push("value")}, {`@extend`, Keyword, Push("selector")}, {`(@media)(\s+)`, ByGroups(Keyword, Text), Push("value")}, {`@[\w-]+`, Keyword, Push("selector")}, {`(\$[\w-]*\w)([ \t]*:)`, ByGroups(NameVariable, Operator), Push("value")}, + {`#\{`, LiteralStringInterpol, Push("interpolation")}, + {Words(`\b`, `(?=\s*:)`, cssProperties...), NameAttribute, Push("attr")}, + {cssPropertyPattern, NameAttribute, Push("attr")}, Default(Push("selector")), }, "attr": { - {`[^\s:="\[]+`, NameAttribute, nil}, {`#\{`, LiteralStringInterpol, Push("interpolation")}, {`[ \t]*:`, Operator, Push("value")}, Default(Pop(1)), @@ -49,20 +68,21 @@ func scssRules() Rules { }, "value": { {`[ \t]+`, Text, nil}, + {`!(important|default|global)`, Keyword, nil}, {`[!$][\w-]+`, NameVariable, nil}, {`url\(`, LiteralStringOther, Push("string-url")}, {`[a-z_-][\w-]*(?=\()`, NameFunction, nil}, - {Words(``, `\b`, `align-content`, `align-items`, `align-self`, `alignment-baseline`, `all`, `animation`, `animation-delay`, `animation-direction`, `animation-duration`, `animation-fill-mode`, `animation-iteration-count`, `animation-name`, `animation-play-state`, `animation-timing-function`, `appearance`, `azimuth`, `backface-visibility`, `background`, `background-attachment`, `background-blend-mode`, `background-clip`, `background-color`, `background-image`, `background-origin`, `background-position`, `background-repeat`, `background-size`, `baseline-shift`, `bookmark-label`, `bookmark-level`, `bookmark-state`, `border`, `border-bottom`, `border-bottom-color`, `border-bottom-left-radius`, `border-bottom-right-radius`, `border-bottom-style`, `border-bottom-width`, `border-boundary`, `border-collapse`, `border-color`, `border-image`, `border-image-outset`, `border-image-repeat`, `border-image-slice`, `border-image-source`, `border-image-width`, `border-left`, `border-left-color`, `border-left-style`, `border-left-width`, `border-radius`, `border-right`, `border-right-color`, `border-right-style`, `border-right-width`, `border-spacing`, `border-style`, `border-top`, `border-top-color`, `border-top-left-radius`, `border-top-right-radius`, `border-top-style`, `border-top-width`, `border-width`, `bottom`, `box-decoration-break`, `box-shadow`, `box-sizing`, `box-snap`, `box-suppress`, `break-after`, `break-before`, `break-inside`, `caption-side`, `caret`, `caret-animation`, `caret-color`, `caret-shape`, `chains`, `clear`, `clip`, `clip-path`, `clip-rule`, `color`, `color-interpolation-filters`, `column-count`, `column-fill`, `column-gap`, `column-rule`, `column-rule-color`, `column-rule-style`, `column-rule-width`, `column-span`, `column-width`, `columns`, `content`, `counter-increment`, `counter-reset`, `counter-set`, `crop`, `cue`, `cue-after`, `cue-before`, `cursor`, `direction`, `display`, `dominant-baseline`, `elevation`, `empty-cells`, `filter`, `flex`, `flex-basis`, `flex-direction`, `flex-flow`, `flex-grow`, `flex-shrink`, `flex-wrap`, `float`, `float-defer`, `float-offset`, `float-reference`, `flood-color`, `flood-opacity`, `flow`, `flow-from`, `flow-into`, `font`, `font-family`, `font-feature-settings`, `font-kerning`, `font-language-override`, `font-size`, `font-size-adjust`, `font-stretch`, `font-style`, `font-synthesis`, `font-variant`, `font-variant-alternates`, `font-variant-caps`, `font-variant-east-asian`, `font-variant-ligatures`, `font-variant-numeric`, `font-variant-position`, `font-weight`, `footnote-display`, `footnote-policy`, `glyph-orientation-vertical`, `grid`, `grid-area`, `grid-auto-columns`, `grid-auto-flow`, `grid-auto-rows`, `grid-column`, `grid-column-end`, `grid-column-gap`, `grid-column-start`, `grid-gap`, `grid-row`, `grid-row-end`, `grid-row-gap`, `grid-row-start`, `grid-template`, `grid-template-areas`, `grid-template-columns`, `grid-template-rows`, `hanging-punctuation`, `height`, `hyphenate-character`, `hyphenate-limit-chars`, `hyphenate-limit-last`, `hyphenate-limit-lines`, `hyphenate-limit-zone`, `hyphens`, `image-orientation`, `image-resolution`, `initial-letter`, `initial-letter-align`, `initial-letter-wrap`, `isolation`, `justify-content`, `justify-items`, `justify-self`, `left`, `letter-spacing`, `lighting-color`, `line-break`, `line-grid`, `line-height`, `line-snap`, `list-style`, `list-style-image`, `list-style-position`, `list-style-type`, `margin`, `margin-bottom`, `margin-left`, `margin-right`, `margin-top`, `marker-side`, `marquee-direction`, `marquee-loop`, `marquee-speed`, `marquee-style`, `mask`, `mask-border`, `mask-border-mode`, `mask-border-outset`, `mask-border-repeat`, `mask-border-slice`, `mask-border-source`, `mask-border-width`, `mask-clip`, `mask-composite`, `mask-image`, `mask-mode`, `mask-origin`, `mask-position`, `mask-repeat`, `mask-size`, `mask-type`, `max-height`, `max-lines`, `max-width`, `min-height`, `min-width`, `mix-blend-mode`, `motion`, `motion-offset`, `motion-path`, `motion-rotation`, `move-to`, `nav-down`, `nav-left`, `nav-right`, `nav-up`, `object-fit`, `object-position`, `offset-after`, `offset-before`, `offset-end`, `offset-start`, `opacity`, `order`, `orphans`, `outline`, `outline-color`, `outline-offset`, `outline-style`, `outline-width`, `overflow`, `overflow-style`, `overflow-wrap`, `overflow-x`, `overflow-y`, `padding`, `padding-bottom`, `padding-left`, `padding-right`, `padding-top`, `page`, `page-break-after`, `page-break-before`, `page-break-inside`, `page-policy`, `pause`, `pause-after`, `pause-before`, `perspective`, `perspective-origin`, `pitch`, `pitch-range`, `play-during`, `polar-angle`, `polar-distance`, `position`, `presentation-level`, `quotes`, `region-fragment`, `resize`, `rest`, `rest-after`, `rest-before`, `richness`, `right`, `rotation`, `rotation-point`, `ruby-align`, `ruby-merge`, `ruby-position`, `running`, `scroll-snap-coordinate`, `scroll-snap-destination`, `scroll-snap-points-x`, `scroll-snap-points-y`, `scroll-snap-type`, `shape-image-threshold`, `shape-inside`, `shape-margin`, `shape-outside`, `size`, `speak`, `speak-as`, `speak-header`, `speak-numeral`, `speak-punctuation`, `speech-rate`, `stress`, `string-set`, `tab-size`, `table-layout`, `text-align`, `text-align-last`, `text-combine-upright`, `text-decoration`, `text-decoration-color`, `text-decoration-line`, `text-decoration-skip`, `text-decoration-style`, `text-emphasis`, `text-emphasis-color`, `text-emphasis-position`, `text-emphasis-style`, `text-indent`, `text-justify`, `text-orientation`, `text-overflow`, `text-shadow`, `text-space-collapse`, `text-space-trim`, `text-spacing`, `text-transform`, `text-underline-position`, `text-wrap`, `top`, `transform`, `transform-origin`, `transform-style`, `transition`, `transition-delay`, `transition-duration`, `transition-property`, `transition-timing-function`, `unicode-bidi`, `user-select`, `vertical-align`, `visibility`, `voice-balance`, `voice-duration`, `voice-family`, `voice-pitch`, `voice-range`, `voice-rate`, `voice-stress`, `voice-volume`, `volume`, `white-space`, `widows`, `width`, `will-change`, `word-break`, `word-spacing`, `word-wrap`, `wrap-after`, `wrap-before`, `wrap-flow`, `wrap-inside`, `wrap-through`, `writing-mode`, `z-index`, `above`, `absolute`, `always`, `armenian`, `aural`, `auto`, `avoid`, `baseline`, `behind`, `below`, `bidi-override`, `blink`, `block`, `bold`, `bolder`, `both`, `capitalize`, `center-left`, `center-right`, `center`, `circle`, `cjk-ideographic`, `close-quote`, `collapse`, `condensed`, `continuous`, `crop`, `crosshair`, `cross`, `cursive`, `dashed`, `decimal-leading-zero`, `decimal`, `default`, `digits`, `disc`, `dotted`, `double`, `e-resize`, `embed`, `extra-condensed`, `extra-expanded`, `expanded`, `fantasy`, `far-left`, `far-right`, `faster`, `fast`, `fixed`, `georgian`, `groove`, `hebrew`, `help`, `hidden`, `hide`, `higher`, `high`, `hiragana-iroha`, `hiragana`, `icon`, `inherit`, `inline-table`, `inline`, `inset`, `inside`, `invert`, `italic`, `justify`, `katakana-iroha`, `katakana`, `landscape`, `larger`, `large`, `left-side`, `leftwards`, `level`, `lighter`, `line-through`, `list-item`, `loud`, `lower-alpha`, `lower-greek`, `lower-roman`, `lowercase`, `ltr`, `lower`, `low`, `medium`, `message-box`, `middle`, `mix`, `monospace`, `n-resize`, `narrower`, `ne-resize`, `no-close-quote`, `no-open-quote`, `no-repeat`, `none`, `normal`, `nowrap`, `nw-resize`, `oblique`, `once`, `open-quote`, `outset`, `outside`, `overline`, `pointer`, `portrait`, `px`, `relative`, `repeat-x`, `repeat-y`, `repeat`, `rgb`, `ridge`, `right-side`, `rightwards`, `s-resize`, `sans-serif`, `scroll`, `se-resize`, `semi-condensed`, `semi-expanded`, `separate`, `serif`, `show`, `silent`, `slow`, `slower`, `small-caps`, `small-caption`, `smaller`, `soft`, `solid`, `spell-out`, `square`, `static`, `status-bar`, `super`, `sw-resize`, `table-caption`, `table-cell`, `table-column`, `table-column-group`, `table-footer-group`, `table-header-group`, `table-row`, `table-row-group`, `text`, `text-bottom`, `text-top`, `thick`, `thin`, `transparent`, `ultra-condensed`, `ultra-expanded`, `underline`, `upper-alpha`, `upper-latin`, `upper-roman`, `uppercase`, `url`, `visible`, `w-resize`, `wait`, `wider`, `x-fast`, `x-high`, `x-large`, `x-loud`, `x-low`, `x-small`, `x-soft`, `xx-large`, `xx-small`, `yes`), NameConstant, nil}, - {Words(``, `\b`, `aliceblue`, `antiquewhite`, `aqua`, `aquamarine`, `azure`, `beige`, `bisque`, `black`, `blanchedalmond`, `blue`, `blueviolet`, `brown`, `burlywood`, `cadetblue`, `chartreuse`, `chocolate`, `coral`, `cornflowerblue`, `cornsilk`, `crimson`, `cyan`, `darkblue`, `darkcyan`, `darkgoldenrod`, `darkgray`, `darkgreen`, `darkgrey`, `darkkhaki`, `darkmagenta`, `darkolivegreen`, `darkorange`, `darkorchid`, `darkred`, `darksalmon`, `darkseagreen`, `darkslateblue`, `darkslategray`, `darkslategrey`, `darkturquoise`, `darkviolet`, `deeppink`, `deepskyblue`, `dimgray`, `dimgrey`, `dodgerblue`, `firebrick`, `floralwhite`, `forestgreen`, `fuchsia`, `gainsboro`, `ghostwhite`, `gold`, `goldenrod`, `gray`, `green`, `greenyellow`, `grey`, `honeydew`, `hotpink`, `indianred`, `indigo`, `ivory`, `khaki`, `lavender`, `lavenderblush`, `lawngreen`, `lemonchiffon`, `lightblue`, `lightcoral`, `lightcyan`, `lightgoldenrodyellow`, `lightgray`, `lightgreen`, `lightgrey`, `lightpink`, `lightsalmon`, `lightseagreen`, `lightskyblue`, `lightslategray`, `lightslategrey`, `lightsteelblue`, `lightyellow`, `lime`, `limegreen`, `linen`, `magenta`, `maroon`, `mediumaquamarine`, `mediumblue`, `mediumorchid`, `mediumpurple`, `mediumseagreen`, `mediumslateblue`, `mediumspringgreen`, `mediumturquoise`, `mediumvioletred`, `midnightblue`, `mintcream`, `mistyrose`, `moccasin`, `navajowhite`, `navy`, `oldlace`, `olive`, `olivedrab`, `orange`, `orangered`, `orchid`, `palegoldenrod`, `palegreen`, `paleturquoise`, `palevioletred`, `papayawhip`, `peachpuff`, `peru`, `pink`, `plum`, `powderblue`, `purple`, `rebeccapurple`, `red`, `rosybrown`, `royalblue`, `saddlebrown`, `salmon`, `sandybrown`, `seagreen`, `seashell`, `sienna`, `silver`, `skyblue`, `slateblue`, `slategray`, `slategrey`, `snow`, `springgreen`, `steelblue`, `tan`, `teal`, `thistle`, `tomato`, `turquoise`, `violet`, `wheat`, `white`, `whitesmoke`, `yellow`, `yellowgreen`, `transparent`), NameEntity, nil}, - {Words(``, `\b`, `black`, `silver`, `gray`, `white`, `maroon`, `red`, `purple`, `fuchsia`, `green`, `lime`, `olive`, `yellow`, `navy`, `blue`, `teal`, `aqua`), NameBuiltin, nil}, - {`\!(important|default)`, NameException, nil}, + {Words(`\b`, `(?=\s*:)`, cssProperties...), NameAttribute, nil}, + {cssPropertyPattern, NameAttribute, nil}, + {Words(`\b`, `\b`, cssPropertyValues...), NameEntity, nil}, + {Words(`(?i)\b`, `\b`, cssColorNames...), NameConstant, nil}, {`(true|false)`, NamePseudo, nil}, {`(and|or|not)`, OperatorWord, nil}, {`/\*`, CommentMultiline, Push("inline-comment")}, {`//[^\n]*`, CommentSingle, nil}, {`\#[a-z0-9]{1,6}`, LiteralNumberHex, nil}, - {`(-?\d+)(\%|[a-z]+)?`, ByGroups(LiteralNumberInteger, KeywordType), nil}, - {`(-?\d*\.\d+)(\%|[a-z]+)?`, ByGroups(LiteralNumberFloat, KeywordType), nil}, + {`(-)?(\d+)(\%|[a-z]+)?`, ByGroups(Operator, LiteralNumberInteger, KeywordType), nil}, + {`(-?)(\d*\.\d+)(\%|[a-z]+)?`, ByGroups(Operator, LiteralNumberFloat, KeywordType), nil}, {`#\{`, LiteralStringInterpol, Push("interpolation")}, {`[~^*!&%<>|+=@:,./?-]+`, Operator, nil}, {`[\[\]()]+`, Punctuation, nil}, @@ -80,15 +100,16 @@ func scssRules() Rules { {`[ \t]+`, Text, nil}, {`\:`, NameDecorator, Push("pseudo-class")}, {`\.`, NameClass, Push("class")}, - {`\#`, NameNamespace, Push("id")}, - {`[\w-]+`, NameTag, nil}, {`#\{`, LiteralStringInterpol, Push("interpolation")}, + {`\#`, NameNamespace, Push("id")}, {`&`, Keyword, nil}, {`[~^*!&\[\]()<>|+=@:,./?-]`, Operator, nil}, + {`(%)([\w-]+)`, ByGroups(Operator, NameClass), nil}, {`"`, LiteralStringDouble, Push("string-double")}, {`'`, LiteralStringSingle, Push("string-single")}, {`\n`, Text, nil}, {`[;{}]`, Punctuation, Pop(1)}, + {`[\w-]+`, NameTag, nil}, }, "string-double": { {`(\\.|#(?=[^\n{])|[^\n"#])+`, LiteralStringDouble, nil}, @@ -124,5 +145,9 @@ func scssRules() Rules { {`(from|to|through)`, OperatorWord, nil}, Include("value"), }, + "each": { + {`in`, OperatorWord, nil}, + Include("value"), + }, } } diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/solidity.go b/vendor/github.com/alecthomas/chroma/lexers/s/solidity.go index b0682ffb41..62a3a40a11 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/solidity.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/solidity.go @@ -39,17 +39,16 @@ func solidityRules() Rules { {`/[*][\w\W]*`, CommentMultiline, nil}, }, "keywords-other": { - {Words(``, `\b`, `for`, `in`, `while`, `do`, `break`, `return`, `returns`, `continue`, `if`, `else`, `throw`, `new`, `delete`), Keyword, nil}, + {Words(``, `\b`, `for`, `in`, `while`, `do`, `break`, `return`, `returns`, `continue`, `if`, `else`, `try`, `catch`, `throw`, `_`, `new`, `delete`, `is`, `as`, `from`, `memory`, `storage`), Keyword, nil}, {`assembly\b`, Keyword, Push("assembly")}, - {Words(``, `\b`, `contract`, `interface`, `enum`, `event`, `function`, `library`, `mapping`, `modifier`, `struct`, `var`), KeywordDeclaration, nil}, + {`(contract|interface|enum|event|struct)(\s+)([a-zA-Z_]\w*)`, ByGroups(KeywordDeclaration, Text, NameClass), nil}, + {`(function|modifier)(\s+)([a-zA-Z_]\w*)`, ByGroups(KeywordDeclaration, Text, NameFunction), nil}, + {Words(``, `\b`, `contract`, `interface`, `enum`, `event`, `constructor`, `function`, `library`, `mapping`, `modifier`, `struct`, `var`), KeywordDeclaration, nil}, + {Words(``, `\b`, `abstract`, `external`, `internal`, `private`, `public`), Keyword, nil}, + {Words(``, `\b`, `anonymous`, `constant`, `immutable`, `indexed`, `override`, `payable`, `pure`, `view`, `virtual`), Keyword, nil}, {`(import|using)\b`, KeywordNamespace, nil}, - {`pragma (solidity|experimental)\b`, KeywordReserved, nil}, - {`(_|as|constant|default|from|is)\b`, KeywordReserved, nil}, - {`payable\b`, KeywordReserved, nil}, - {`(memory|storage)\b`, KeywordReserved, nil}, - {`(external|internal|private|public)\b`, KeywordReserved, nil}, - {`(anonymous|indexed)\b`, KeywordReserved, nil}, - {`(abstract|pure|static|view)\b`, KeywordReserved, nil}, + {`pragma (solidity|experimental)\b`, Keyword, nil}, + {Words(``, `\b`, `after`, `alias`, `apply`, `auto`, `case`, `copyof`, `default`, `define`, `final`, `implements`, `inline`, `let`, `macro`, `match`, `mutable`, `null`, `of`, `partial`, `promise`, `reference`, `relocatable`, `sealed`, `sizeof`, `static`, `supports`, `switch`, `typedef`, `typeof`, `unchecked`), KeywordReserved, nil}, {`(true|false)\b`, KeywordConstant, nil}, {`(wei|finney|szabo|ether)\b`, KeywordConstant, nil}, {`(seconds|minutes|hours|days|weeks|years)\b`, KeywordConstant, nil}, @@ -99,15 +98,20 @@ func solidityRules() Rules { {`\+\+|--|\*\*|\?|:|~|&&|\|\||=>|==?|!=?|(<<|>>>?|[-<>+*%&|^/])=?`, Operator, nil}, {`[{(\[;,]`, Punctuation, nil}, {`[})\].]`, Punctuation, nil}, - {`(block|msg|now|this|super|tx)\b`, NameBuiltin, nil}, - {`(sender|origin)\b`, NameBuiltin, nil}, - {`(gas|value)\b`, NameBuiltin, nil}, + {`(abi|block|msg|tx)\b`, NameBuiltin, nil}, + {`(?!abi\.)(decode|encode|encodePacked|encodeWithSelector|encodeWithSignature|encodeWithSelector)\b`, NameBuiltin, nil}, + {`(?!block\.)(chainid|coinbase|difficulty|gaslimit|number|timestamp)\b`, NameBuiltin, nil}, + {`(?!msg\.)(data|gas|sender|value)\b`, NameBuiltin, nil}, + {`(?!tx\.)(gasprice|origin)\b`, NameBuiltin, nil}, + {`(type)(\()([a-zA-Z_]\w*)(\))`, ByGroups(NameBuiltin, Punctuation, NameClass, Punctuation), nil}, + {`(?!type\([a-zA-Z_]\w*\)\.)(creationCode|interfaceId|max|min|name|runtimeCode)\b`, NameBuiltin, nil}, + {`(now|this|super|gasleft)\b`, NameBuiltin, nil}, {`(selfdestruct|suicide)\b`, NameBuiltin, nil}, - {`(balance|send|transfer)\b`, NameBuiltin, nil}, + {`(?!0x[0-9a-fA-F]+\.)(balance|code|codehash|send|transfer)\b`, NameBuiltin, nil}, {`(assert|revert|require)\b`, NameBuiltin, nil}, {`(call|callcode|delegatecall)\b`, NameBuiltin, nil}, {`selector\b`, NameBuiltin, nil}, - {`(addmod|ecrecover|keccak256|mulmod|ripemd160|sha256|sha3)\b`, NameFunction, nil}, + {`(addmod|blockhash|ecrecover|keccak256|mulmod|ripemd160|sha256|sha3)\b`, NameBuiltin, nil}, {`[a-zA-Z_]\w*`, Name, nil}, }, } diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/svelte.go b/vendor/github.com/alecthomas/chroma/lexers/s/svelte.go new file mode 100644 index 0000000000..1f91a21300 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/lexers/s/svelte.go @@ -0,0 +1,73 @@ +package s + +import ( + . "github.com/alecthomas/chroma" // nolint + "github.com/alecthomas/chroma/lexers/h" + "github.com/alecthomas/chroma/lexers/internal" + "github.com/alecthomas/chroma/lexers/t" +) + +// Svelte lexer. +var Svelte = internal.Register(DelegatingLexer(h.HTML, MustNewLazyLexer( + &Config{ + Name: "Svelte", + Aliases: []string{"svelte"}, + Filenames: []string{"*.svelte"}, + MimeTypes: []string{"application/x-svelte"}, + DotAll: true, + }, + svelteRules, +))) + +func svelteRules() Rules { + return Rules{ + "root": { + // Let HTML handle the comments, including comments containing script and style tags + {`<!--`, Other, Push("comment")}, + { + // Highlight script and style tags based on lang attribute + // and allow attributes besides lang + `(<\s*(?:script|style).*?lang\s*=\s*['"])` + + `(.+?)(['"].*?>)` + + `(.+?)` + + `(<\s*/\s*(?:script|style)\s*>)`, + UsingByGroup(internal.Get, 2, 4, Other, Other, Other, Other, Other), + nil, + }, + { + // Make sure `{` is not inside script or style tags + `(?<!<\s*(?:script|style)(?:(?!(?:script|style)\s*>).)*?)` + + `{` + + `(?!(?:(?!<\s*(?:script|style)).)*?(?:script|style)\s*>)`, + Punctuation, + Push("templates"), + }, + // on:submit|preventDefault + {`(?<=\s+on:\w+(?:\|\w+)*)\|(?=\w+)`, Operator, nil}, + {`.+?`, Other, nil}, + }, + "comment": { + {`-->`, Other, Pop(1)}, + {`.+?`, Other, nil}, + }, + "templates": { + {`}`, Punctuation, Pop(1)}, + // Let TypeScript handle strings and the curly braces inside them + {`(?<!(?<!\\)\\)(['"` + "`])" + `.*?(?<!(?<!\\)\\)\1`, Using(t.TypeScript), nil}, + // If there is another opening curly brace push to templates again + {"{", Punctuation, Push("templates")}, + {`@(debug|html)\b`, Keyword, nil}, + { + `(#await)(\s+)(\w+)(\s+)(then|catch)(\s+)(\w+)`, + ByGroups(Keyword, Text, Using(t.TypeScript), Text, + Keyword, Text, Using(t.TypeScript), + ), + nil, + }, + {`(#|/)(await|each|if|key)\b`, Keyword, nil}, + {`(:else)(\s+)(if)?\b`, ByGroups(Keyword, Text, Keyword), nil}, + {`:(catch|then)\b`, Keyword, nil}, + {`[^{}]+`, Using(t.TypeScript), nil}, + }, + } +} diff --git a/vendor/github.com/alecthomas/chroma/lexers/s/systemd.go b/vendor/github.com/alecthomas/chroma/lexers/s/systemd.go index f70136c399..0da97821e9 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/s/systemd.go +++ b/vendor/github.com/alecthomas/chroma/lexers/s/systemd.go @@ -7,9 +7,10 @@ import ( var SYSTEMD = internal.Register(MustNewLazyLexer( &Config{ - Name: "SYSTEMD", - Aliases: []string{"systemd"}, - Filenames: []string{"*.service"}, + Name: "SYSTEMD", + Aliases: []string{"systemd"}, + // Suspects: man systemd.index | grep -E 'systemd\..*configuration' + Filenames: []string{"*.automount", "*.device", "*.dnssd", "*.link", "*.mount", "*.netdev", "*.network", "*.path", "*.scope", "*.service", "*.slice", "*.socket", "*.swap", "*.target", "*.timer"}, MimeTypes: []string{"text/plain"}, }, systemdRules, diff --git a/vendor/github.com/alecthomas/chroma/lexers/t/toml.go b/vendor/github.com/alecthomas/chroma/lexers/t/toml.go index b685a2c969..18a44c5b25 100644 --- a/vendor/github.com/alecthomas/chroma/lexers/t/toml.go +++ b/vendor/github.com/alecthomas/chroma/lexers/t/toml.go @@ -27,7 +27,7 @@ func tomlRules() Rules { {`"(\\\\|\\"|[^"])*"`, StringDouble, nil}, {`'(\\\\|\\'|[^'])*'`, StringSingle, nil}, {`[.,=\[\]{}]`, Punctuation, nil}, - {`[^\W\d]\w*`, NameOther, nil}, + {`[A-Za-z0-9_-]+`, NameOther, nil}, }, } } diff --git a/vendor/github.com/alecthomas/chroma/pygments-lexers.txt b/vendor/github.com/alecthomas/chroma/pygments-lexers.txt index 9c9ced2eef..bf4d9de17c 100644 --- a/vendor/github.com/alecthomas/chroma/pygments-lexers.txt +++ b/vendor/github.com/alecthomas/chroma/pygments-lexers.txt @@ -2,9 +2,6 @@ Generated with: g 'class.*RegexLexer' | pawk --strict -F: '"pygments.lexers.%s.%s" % (f[0].split(".")[0], f[2].split()[1].split("(")[0])' > lexers.txt -perl6: - Requires a bunch of helpers that I do not have the time to convert. - kotlin: invalid unicode escape sequences FIXED: Have to disable wide Unicode characters in unistring.py diff --git a/vendor/github.com/alecthomas/chroma/regexp.go b/vendor/github.com/alecthomas/chroma/regexp.go index d6cefe7609..73f8031cc3 100644 --- a/vendor/github.com/alecthomas/chroma/regexp.go +++ b/vendor/github.com/alecthomas/chroma/regexp.go @@ -4,6 +4,7 @@ import ( "fmt" "os" "regexp" + "sort" "strings" "sync" "time" @@ -22,25 +23,57 @@ type Rule struct { // An Emitter takes group matches and returns tokens. type Emitter interface { // Emit tokens for the given regex groups. - Emit(groups []string, lexer Lexer) Iterator + Emit(groups []string, state *LexerState) Iterator } // EmitterFunc is a function that is an Emitter. -type EmitterFunc func(groups []string, lexer Lexer) Iterator +type EmitterFunc func(groups []string, state *LexerState) Iterator // Emit tokens for groups. -func (e EmitterFunc) Emit(groups []string, lexer Lexer) Iterator { return e(groups, lexer) } +func (e EmitterFunc) Emit(groups []string, state *LexerState) Iterator { + return e(groups, state) +} // ByGroups emits a token for each matching group in the rule's regex. func ByGroups(emitters ...Emitter) Emitter { - return EmitterFunc(func(groups []string, lexer Lexer) Iterator { + return EmitterFunc(func(groups []string, state *LexerState) Iterator { iterators := make([]Iterator, 0, len(groups)-1) if len(emitters) != len(groups)-1 { - iterators = append(iterators, Error.Emit(groups, lexer)) + iterators = append(iterators, Error.Emit(groups, state)) // panic(errors.Errorf("number of groups %q does not match number of emitters %v", groups, emitters)) } else { for i, group := range groups[1:] { - iterators = append(iterators, emitters[i].Emit([]string{group}, lexer)) + if emitters[i] != nil { + iterators = append(iterators, emitters[i].Emit([]string{group}, state)) + } + } + } + return Concaterator(iterators...) + }) +} + +// ByGroupNames emits a token for each named matching group in the rule's regex. +func ByGroupNames(emitters map[string]Emitter) Emitter { + return EmitterFunc(func(groups []string, state *LexerState) Iterator { + iterators := make([]Iterator, 0, len(state.NamedGroups)-1) + if len(state.NamedGroups)-1 == 0 { + if emitter, ok := emitters[`0`]; ok { + iterators = append(iterators, emitter.Emit(groups, state)) + } else { + iterators = append(iterators, Error.Emit(groups, state)) + } + } else { + ruleRegex := state.Rules[state.State][state.Rule].Regexp + for i := 1; i < len(state.NamedGroups); i++ { + groupName := ruleRegex.GroupNameFromNumber(i) + group := state.NamedGroups[groupName] + if emitter, ok := emitters[groupName]; ok { + if emitter != nil { + iterators = append(iterators, emitter.Emit([]string{group}, state)) + } + } else { + iterators = append(iterators, Error.Emit([]string{group}, state)) + } } } return Concaterator(iterators...) @@ -88,7 +121,7 @@ func ByGroups(emitters ...Emitter) Emitter { // Note: panic's if the number emitters does not equal the number of matched // groups in the regex. func UsingByGroup(sublexerGetFunc func(string) Lexer, sublexerNameGroup, codeGroup int, emitters ...Emitter) Emitter { - return EmitterFunc(func(groups []string, lexer Lexer) Iterator { + return EmitterFunc(func(groups []string, state *LexerState) Iterator { // bounds check if len(emitters) != len(groups)-1 { panic("UsingByGroup expects number of emitters to be the same as len(groups)-1") @@ -106,8 +139,8 @@ func UsingByGroup(sublexerGetFunc func(string) Lexer, sublexerNameGroup, codeGro if err != nil { panic(err) } - } else { - iterators[i] = emitters[i].Emit([]string{group}, lexer) + } else if emitters[i] != nil { + iterators[i] = emitters[i].Emit([]string{group}, state) } } @@ -117,7 +150,7 @@ func UsingByGroup(sublexerGetFunc func(string) Lexer, sublexerNameGroup, codeGro // Using returns an Emitter that uses a given Lexer for parsing and emitting. func Using(lexer Lexer) Emitter { - return EmitterFunc(func(groups []string, _ Lexer) Iterator { + return EmitterFunc(func(groups []string, _ *LexerState) Iterator { it, err := lexer.Tokenise(&TokeniseOptions{State: "root", Nested: true}, groups[0]) if err != nil { panic(err) @@ -127,9 +160,9 @@ func Using(lexer Lexer) Emitter { } // UsingSelf is like Using, but uses the current Lexer. -func UsingSelf(state string) Emitter { - return EmitterFunc(func(groups []string, lexer Lexer) Iterator { - it, err := lexer.Tokenise(&TokeniseOptions{State: state, Nested: true}, groups[0]) +func UsingSelf(stateName string) Emitter { + return EmitterFunc(func(groups []string, state *LexerState) Iterator { + it, err := state.Lexer.Tokenise(&TokeniseOptions{State: stateName, Nested: true}, groups[0]) if err != nil { panic(err) } @@ -139,6 +172,9 @@ func UsingSelf(state string) Emitter { // Words creates a regex that matches any of the given literal words. func Words(prefix, suffix string, words ...string) string { + sort.Slice(words, func(i, j int) bool { + return len(words[j]) < len(words[i]) + }) for i, word := range words { words[i] = regexp.QuoteMeta(word) } @@ -162,10 +198,10 @@ func Tokenise(lexer Lexer, options *TokeniseOptions, text string) ([]Token, erro type Rules map[string][]Rule // Rename clones rules then a rule. -func (r Rules) Rename(old, new string) Rules { +func (r Rules) Rename(oldRule, newRule string) Rules { r = r.Clone() - r[new] = r[old] - delete(r, old) + r[newRule] = r[oldRule] + delete(r, oldRule) return r } @@ -209,8 +245,10 @@ func NewLazyLexer(config *Config, rulesFunc func() Rules) (*RegexLexer, error) { } // MustNewLexer creates a new Lexer or panics. -func MustNewLexer(config *Config, rules Rules) *RegexLexer { - lexer, err := NewLexer(config, rules) +// +// Deprecated: Use MustNewLazyLexer instead. +func MustNewLexer(config *Config, rules Rules) *RegexLexer { // nolint: forbidigo + lexer, err := NewLexer(config, rules) // nolint: forbidigo if err != nil { panic(err) } @@ -221,7 +259,9 @@ func MustNewLexer(config *Config, rules Rules) *RegexLexer { // // "rules" is a state machine transitition map. Each key is a state. Values are sets of rules // that match input, optionally modify lexer state, and output tokens. -func NewLexer(config *Config, rules Rules) (*RegexLexer, error) { +// +// Deprecated: Use NewLazyLexer instead. +func NewLexer(config *Config, rules Rules) (*RegexLexer, error) { // nolint: forbidigo return NewLazyLexer(config, func() Rules { return rules }) } @@ -254,6 +294,8 @@ type LexerState struct { Rule int // Group matches. Groups []string + // Named Group matches. + NamedGroups map[string]string // Custum context for mutators. MutatorContext map[interface{}]interface{} iteratorStack []Iterator @@ -297,7 +339,7 @@ func (l *LexerState) Iterator() Token { // nolint: gocognit if !ok { panic("unknown state " + l.State) } - ruleIndex, rule, groups := matchRules(l.Text, l.Pos, selectedRule) + ruleIndex, rule, groups, namedGroups := matchRules(l.Text, l.Pos, selectedRule) // No match. if groups == nil { // From Pygments :\ @@ -315,6 +357,7 @@ func (l *LexerState) Iterator() Token { // nolint: gocognit } l.Rule = ruleIndex l.Groups = groups + l.NamedGroups = namedGroups l.Pos += utf8.RuneCountInString(groups[0]) if rule.Mutator != nil { if err := rule.Mutator.Mutate(l); err != nil { @@ -322,7 +365,7 @@ func (l *LexerState) Iterator() Token { // nolint: gocognit } } if rule.Type != nil { - l.iteratorStack = append(l.iteratorStack, rule.Type.Emit(l.Groups, l.Lexer)) + l.iteratorStack = append(l.iteratorStack, rule.Type.Emit(l.Groups, l)) } } // Exhaust the IteratorStack, if any. @@ -391,7 +434,7 @@ func (r *RegexLexer) maybeCompile() (err error) { pattern = "(?" + rule.flags + ")" + pattern } pattern = `\G` + pattern - rule.Regexp, err = regexp2.Compile(pattern, 0) + rule.Regexp, err = regexp2.Compile(pattern, regexp2.RE2) if err != nil { return fmt.Errorf("failed to compile rule %s.%d: %s", state, i, err) } @@ -486,18 +529,20 @@ func (r *RegexLexer) Tokenise(options *TokeniseOptions, text string) (Iterator, return state.Iterator, nil } -func matchRules(text []rune, pos int, rules []*CompiledRule) (int, *CompiledRule, []string) { +func matchRules(text []rune, pos int, rules []*CompiledRule) (int, *CompiledRule, []string, map[string]string) { for i, rule := range rules { match, err := rule.Regexp.FindRunesMatchStartingAt(text, pos) if match != nil && err == nil && match.Index == pos { groups := []string{} + namedGroups := make(map[string]string) for _, g := range match.Groups() { + namedGroups[g.Name] = g.String() groups = append(groups, g.String()) } - return i, rule, groups + return i, rule, groups, namedGroups } } - return 0, &CompiledRule{}, nil + return 0, &CompiledRule{}, nil, nil } // replace \r and \r\n with \n diff --git a/vendor/github.com/alecthomas/chroma/style.go b/vendor/github.com/alecthomas/chroma/style.go index 516fef5d60..1319fc4248 100644 --- a/vendor/github.com/alecthomas/chroma/style.go +++ b/vendor/github.com/alecthomas/chroma/style.go @@ -287,8 +287,10 @@ func (s *Style) synthesise(ttype TokenType) StyleEntry { // If we don't have line numbers, use the text colour but 20% brighter/darker case LineNumbers, LineNumbersTable: return text + + default: + return StyleEntry{} } - return StyleEntry{} } func (s *Style) synthesisable(ttype TokenType) bool { diff --git a/vendor/github.com/alecthomas/chroma/styles/doom-one.go b/vendor/github.com/alecthomas/chroma/styles/doom-one.go new file mode 100644 index 0000000000..6450455504 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/doom-one.go @@ -0,0 +1,58 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Doom One style. Inspired by Atom One and Doom Emacs's Atom One theme +var DoomOne = Register(chroma.MustNewStyle("doom-one", chroma.StyleEntries{ + chroma.Text: "#b0c4de", + chroma.Error: "#b0c4de", + chroma.Comment: "italic #8a93a5", + chroma.CommentHashbang: "bold", + chroma.Keyword: "#c678dd", + chroma.KeywordType: "#ef8383", + chroma.KeywordConstant: "bold #b756ff", + chroma.Operator: "#c7bf54", + chroma.OperatorWord: "bold #b756ff", + chroma.Punctuation: "#b0c4de", + chroma.Name: "#c1abea", + chroma.NameAttribute: "#b3d23c", + chroma.NameBuiltin: "#ef8383", + chroma.NameClass: "#76a9f9", + chroma.NameConstant: "bold #b756ff", + chroma.NameDecorator: "#e5c07b", + chroma.NameEntity: "#bda26f", + chroma.NameException: "bold #fd7474", + chroma.NameFunction: "#00b1f7", + chroma.NameProperty: "#cebc3a", + chroma.NameLabel: "#f5a40d", + chroma.NameNamespace: "#76a9f9", + chroma.NameTag: "#e06c75", + chroma.NameVariable: "#DCAEEA", + chroma.NameVariableGlobal: "bold #DCAEEA", + chroma.NameVariableInstance: "#e06c75", + chroma.Literal: "#98c379", + chroma.Number: "#d19a66", + chroma.String: "#98c379", + chroma.StringDoc: "#7e97c3", + chroma.StringDouble: "#63c381", + chroma.StringEscape: "bold #d26464", + chroma.StringHeredoc: "#98c379", + chroma.StringInterpol: "#98c379", + chroma.StringOther: "#70b33f", + chroma.StringRegex: "#56b6c2", + chroma.StringSingle: "#98c379", + chroma.StringSymbol: "#56b6c2", + chroma.Generic: "#b0c4de", + chroma.GenericEmph: "italic", + chroma.GenericHeading: "bold #a2cbff", + chroma.GenericInserted: "#a6e22e", + chroma.GenericOutput: "#a6e22e", + chroma.GenericUnderline: "underline", + chroma.GenericPrompt: "#a6e22e", + chroma.GenericStrong: "bold", + chroma.GenericSubheading: "#a2cbff", + chroma.GenericTraceback: "#a2cbff", + chroma.Background: "#b0c4de bg:#282c34", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/doom-one2.go b/vendor/github.com/alecthomas/chroma/styles/doom-one2.go new file mode 100644 index 0000000000..465417391e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/doom-one2.go @@ -0,0 +1,71 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Doom One 2 style. Inspired by Atom One and Doom Emacs's Atom One theme +var DoomOne2 = Register(chroma.MustNewStyle("doom-one2", chroma.StyleEntries{ + chroma.Text: "#b0c4de", + chroma.Error: "#b0c4de", + chroma.Comment: "italic #8a93a5", + chroma.CommentHashbang: "bold", + chroma.Keyword: "#76a9f9", + chroma.KeywordConstant: "#e5c07b", + chroma.KeywordType: "#e5c07b", + chroma.Operator: "#54b1c7", + chroma.OperatorWord: "bold #b756ff", + chroma.Punctuation: "#abb2bf", + chroma.Name: "#aa89ea", + chroma.NameAttribute: "#cebc3a", + chroma.NameBuiltin: "#e5c07b", + chroma.NameClass: "#ca72ff", + chroma.NameConstant: "bold", + chroma.NameDecorator: "#e5c07b", + chroma.NameEntity: "#bda26f", + chroma.NameException: "bold #fd7474", + chroma.NameFunction: "#00b1f7", + chroma.NameProperty: "#cebc3a", + chroma.NameLabel: "#f5a40d", + chroma.NameNamespace: "#ca72ff", + chroma.NameTag: "#76a9f9", + chroma.NameVariable: "#DCAEEA", + chroma.NameVariableClass: "#DCAEEA", + chroma.NameVariableGlobal: "bold #DCAEEA", + chroma.NameVariableInstance: "#e06c75", + chroma.NameVariableMagic: "#DCAEEA", + chroma.Literal: "#98c379", + chroma.LiteralDate: "#98c379", + chroma.Number: "#d19a66", + chroma.NumberBin: "#d19a66", + chroma.NumberFloat: "#d19a66", + chroma.NumberHex: "#d19a66", + chroma.NumberInteger: "#d19a66", + chroma.NumberIntegerLong: "#d19a66", + chroma.NumberOct: "#d19a66", + chroma.String: "#98c379", + chroma.StringAffix: "#98c379", + chroma.StringBacktick: "#98c379", + chroma.StringDelimiter: "#98c379", + chroma.StringDoc: "#7e97c3", + chroma.StringDouble: "#63c381", + chroma.StringEscape: "bold #d26464", + chroma.StringHeredoc: "#98c379", + chroma.StringInterpol: "#98c379", + chroma.StringOther: "#70b33f", + chroma.StringRegex: "#56b6c2", + chroma.StringSingle: "#98c379", + chroma.StringSymbol: "#56b6c2", + chroma.Generic: "#b0c4de", + chroma.GenericDeleted: "#b0c4de", + chroma.GenericEmph: "italic", + chroma.GenericHeading: "bold #a2cbff", + chroma.GenericInserted: "#a6e22e", + chroma.GenericOutput: "#a6e22e", + chroma.GenericUnderline: "underline", + chroma.GenericPrompt: "#a6e22e", + chroma.GenericStrong: "bold", + chroma.GenericSubheading: "#a2cbff", + chroma.GenericTraceback: "#a2cbff", + chroma.Background: "#b0c4de bg:#282c34", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/dracula.go b/vendor/github.com/alecthomas/chroma/styles/dracula.go index 46e9d5b5b3..d1542f2715 100644 --- a/vendor/github.com/alecthomas/chroma/styles/dracula.go +++ b/vendor/github.com/alecthomas/chroma/styles/dracula.go @@ -13,11 +13,11 @@ var Dracula = Register(chroma.MustNewStyle("dracula", chroma.StyleEntries{ chroma.CommentSingle: "#6272a4", chroma.CommentSpecial: "#6272a4", chroma.Generic: "#f8f8f2", - chroma.GenericDeleted: "#8b080b", + chroma.GenericDeleted: "#ff5555", chroma.GenericEmph: "#f8f8f2 underline", chroma.GenericError: "#f8f8f2", chroma.GenericHeading: "#f8f8f2 bold", - chroma.GenericInserted: "#f8f8f2 bold", + chroma.GenericInserted: "#50fa7b bold", chroma.GenericOutput: "#44475a", chroma.GenericPrompt: "#f8f8f2", chroma.GenericStrong: "#f8f8f2", diff --git a/vendor/github.com/alecthomas/chroma/styles/hr_dark.go b/vendor/github.com/alecthomas/chroma/styles/hr_dark.go new file mode 100644 index 0000000000..10bb64fbd3 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/hr_dark.go @@ -0,0 +1,17 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Theme based on HackerRank Dark Editor theme +var HrDark = Register(chroma.MustNewStyle("hrdark", chroma.StyleEntries{ + chroma.Comment: "italic #828b96", + chroma.Keyword: "#ff636f", + chroma.OperatorWord: "#ff636f", + chroma.Name: "#58a1dd", + chroma.Literal: "#a6be9d", + chroma.Operator: "#ff636f", + chroma.Background: "#1d2432", + chroma.Other: "#fff", +})) diff --git a/vendor/github.com/alecthomas/chroma/styles/hr_high_contrast.go b/vendor/github.com/alecthomas/chroma/styles/hr_high_contrast.go new file mode 100644 index 0000000000..d1988589c7 --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/styles/hr_high_contrast.go @@ -0,0 +1,19 @@ +package styles + +import ( + "github.com/alecthomas/chroma" +) + +// Theme based on HackerRank High Contrast Editor Theme +var HrHighContrast = Register(chroma.MustNewStyle("hr_high_contrast", chroma.StyleEntries{ + chroma.Comment: "#5a8349", + chroma.Keyword: "#467faf", + chroma.OperatorWord: "#467faf", + chroma.Name: "#ffffff", + chroma.LiteralString: "#a87662", + chroma.LiteralNumber: "#fff", + chroma.LiteralStringBoolean: "#467faf", + chroma.Operator: "#e4e400", + chroma.Background: "#000", + chroma.Other: "#d5d500", +})) diff --git a/vendor/github.com/alecthomas/chroma/types.go b/vendor/github.com/alecthomas/chroma/types.go index b102f308ab..ede945c52c 100644 --- a/vendor/github.com/alecthomas/chroma/types.go +++ b/vendor/github.com/alecthomas/chroma/types.go @@ -342,6 +342,6 @@ func (t TokenType) InSubCategory(other TokenType) bool { return t/100 == other/100 } -func (t TokenType) Emit(groups []string, lexer Lexer) Iterator { +func (t TokenType) Emit(groups []string, _ *LexerState) Iterator { return Literator(Token{Type: t, Value: groups[0]}) } diff --git a/vendor/github.com/blevesearch/bleve/v2/go.mod b/vendor/github.com/blevesearch/bleve/v2/go.mod index 3282ded1ec..a7545710be 100644 --- a/vendor/github.com/blevesearch/bleve/v2/go.mod +++ b/vendor/github.com/blevesearch/bleve/v2/go.mod @@ -3,7 +3,7 @@ module github.com/blevesearch/bleve/v2 go 1.13 require ( - github.com/RoaringBitmap/roaring v0.7.1 + github.com/RoaringBitmap/roaring v0.7.3 github.com/bits-and-blooms/bitset v1.2.0 github.com/blevesearch/bleve_index_api v1.0.0 github.com/blevesearch/go-porterstemmer v1.0.3 @@ -11,12 +11,12 @@ require ( github.com/blevesearch/segment v0.9.0 github.com/blevesearch/snowballstem v0.9.0 github.com/blevesearch/upsidedown_store_api v1.0.1 - github.com/blevesearch/vellum v1.0.4 - github.com/blevesearch/zapx/v11 v11.2.0 - github.com/blevesearch/zapx/v12 v12.2.0 - github.com/blevesearch/zapx/v13 v13.2.0 - github.com/blevesearch/zapx/v14 v14.2.0 - github.com/blevesearch/zapx/v15 v15.2.0 + github.com/blevesearch/vellum v1.0.5 + github.com/blevesearch/zapx/v11 v11.2.1 + github.com/blevesearch/zapx/v12 v12.2.1 + github.com/blevesearch/zapx/v13 v13.2.1 + github.com/blevesearch/zapx/v14 v14.2.1 + github.com/blevesearch/zapx/v15 v15.2.1 github.com/couchbase/moss v0.1.0 github.com/golang/protobuf v1.3.2 github.com/kljensen/snowball v0.6.0 diff --git a/vendor/github.com/blevesearch/bleve/v2/go.sum b/vendor/github.com/blevesearch/bleve/v2/go.sum index 734878c764..6730260081 100644 --- a/vendor/github.com/blevesearch/bleve/v2/go.sum +++ b/vendor/github.com/blevesearch/bleve/v2/go.sum @@ -1,10 +1,9 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= -github.com/RoaringBitmap/roaring v0.7.1 h1:HkcLv8q/kwGJnhEWe+vinu+04DGDdQ7nVivMhNhxP2g= -github.com/RoaringBitmap/roaring v0.7.1/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= +github.com/RoaringBitmap/roaring v0.7.3 h1:RwirWpvFONt2EwHHEHhER7S4BHZkyj3qL5LXLlnQPZ4= +github.com/RoaringBitmap/roaring v0.7.3/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/bits-and-blooms/bitset v1.1.10/go.mod h1:w0XsmFg8qg6cmpTtJ0z3pKgjTDBMMnI/+I2syrE6XBE= github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blevesearch/bleve_index_api v1.0.0 h1:Ds3XeuTxjXCkG6pgIwWDRyooJKNIuOKemnN0N0IkhTU= @@ -21,19 +20,18 @@ github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs= github.com/blevesearch/upsidedown_store_api v1.0.1 h1:1SYRwyoFLwG3sj0ed89RLtM15amfX2pXlYbFOnF8zNU= github.com/blevesearch/upsidedown_store_api v1.0.1/go.mod h1:MQDVGpHZrpe3Uy26zJBf/a8h0FZY6xJbthIMm8myH2Q= -github.com/blevesearch/vellum v1.0.3/go.mod h1:2u5ax02KeDuNWu4/C+hVQMD6uLN4txH1JbtpaDNLJRo= -github.com/blevesearch/vellum v1.0.4 h1:o6t7NxTnThp1es52uQvOJJx+9yK/nKXlWC5xl4LCz1U= -github.com/blevesearch/vellum v1.0.4/go.mod h1:cMhywHI0de50f7Nj42YgvyD6bFJ2WkNRvNBlNMrEVgY= -github.com/blevesearch/zapx/v11 v11.2.0 h1:GBkCJYsyj3eIU4+aiLPxoMz1PYvDbQZl/oXHIBZIP60= -github.com/blevesearch/zapx/v11 v11.2.0/go.mod h1:gN/a0alGw1FZt/YGTo1G6Z6XpDkeOfujX5exY9sCQQM= -github.com/blevesearch/zapx/v12 v12.2.0 h1:dyRcSoZVO1jktL4UpGkCEF1AYa3xhKPirh4/N+Va+Ww= -github.com/blevesearch/zapx/v12 v12.2.0/go.mod h1:fdjwvCwWWwJW/EYTYGtAp3gBA0geCYGLcVTtJEZnY6A= -github.com/blevesearch/zapx/v13 v13.2.0 h1:mUqbaqQABp8nBE4t4q2qMyHCCq4sykoV8r7aJk4ih3s= -github.com/blevesearch/zapx/v13 v13.2.0/go.mod h1:o5rAy/lRS5JpAbITdrOHBS/TugWYbkcYZTz6VfEinAQ= -github.com/blevesearch/zapx/v14 v14.2.0 h1:UsfRqvM9RJxKNKrkR1U7aYc1cv9MWx719fsAjbF6joI= -github.com/blevesearch/zapx/v14 v14.2.0/go.mod h1:GNgZusc1p4ot040cBQMRGEZobvwjCquiEKYh1xLFK9g= -github.com/blevesearch/zapx/v15 v15.2.0 h1:ZpibwcrrOaeslkOw3sJ7npP7KDgRHI/DkACjKTqFwyM= -github.com/blevesearch/zapx/v15 v15.2.0/go.mod h1:MmQceLpWfME4n1WrBFIwplhWmaQbQqLQARpaKUEOs/A= +github.com/blevesearch/vellum v1.0.5 h1:L5dJ7hKauRVbuH7I8uqLeSK92CPPY6FfrbAmLhAug8A= +github.com/blevesearch/vellum v1.0.5/go.mod h1:atE0EH3fvk43zzS7t1YNdNC7DbmcC3uz+eMD5xZ2OyQ= +github.com/blevesearch/zapx/v11 v11.2.1 h1:udluDHdr99gGSeL3vZLtJbML0OJ98mK1Peivtm5OYho= +github.com/blevesearch/zapx/v11 v11.2.1/go.mod h1:TBkJF5Qq0EwZbbBQmkW6/AQVSYwXXpp0xwtQ5wXHVMI= +github.com/blevesearch/zapx/v12 v12.2.1 h1:nbeecR8M3dEcIIYfKDaSRpJ9E205E7BvjhVwf/l5ajI= +github.com/blevesearch/zapx/v12 v12.2.1/go.mod h1:sSXvgEs7MKqqDIRSpyFd6ZJUEVlhxuDB0d8/WT2WlgA= +github.com/blevesearch/zapx/v13 v13.2.1 h1:6K797fvkurY6heEMPhyUlq3VULIpkD1sbBqqQUMFf4g= +github.com/blevesearch/zapx/v13 v13.2.1/go.mod h1:Fblcy4ykPy7XiaZ2svvpQaYgEqI+8vkdvMVx5zcawF4= +github.com/blevesearch/zapx/v14 v14.2.1 h1:V3RzDc7XZ51Kv9ZhhzMlHCSoY4+jxqy9VBqHxTqW4pg= +github.com/blevesearch/zapx/v14 v14.2.1/go.mod h1:veKtVCDzl4vvYeT5zULXEXqPR948uilzixzmmdtpCkU= +github.com/blevesearch/zapx/v15 v15.2.1 h1:ZaqQiWLo0srtPvy3ozgpR9+Oabs3HQrF4uJM0HiKVBY= +github.com/blevesearch/zapx/v15 v15.2.1/go.mod h1:pUCN72ZJkVd7dU9lA4Fd8E3+fl5wv3JPpThk4FQ5bpA= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= diff --git a/vendor/github.com/blevesearch/vellum/go.mod b/vendor/github.com/blevesearch/vellum/go.mod index 5c2ad3c978..4678aa8fa8 100644 --- a/vendor/github.com/blevesearch/vellum/go.mod +++ b/vendor/github.com/blevesearch/vellum/go.mod @@ -3,7 +3,7 @@ module github.com/blevesearch/vellum go 1.12 require ( - github.com/bits-and-blooms/bitset v1.1.10 + github.com/bits-and-blooms/bitset v1.2.0 github.com/blevesearch/mmap-go v1.0.2 github.com/spf13/cobra v0.0.5 golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a // indirect diff --git a/vendor/github.com/blevesearch/vellum/go.sum b/vendor/github.com/blevesearch/vellum/go.sum index d6e89f70e1..676efb69c1 100644 --- a/vendor/github.com/blevesearch/vellum/go.sum +++ b/vendor/github.com/blevesearch/vellum/go.sum @@ -1,7 +1,7 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/bits-and-blooms/bitset v1.1.10 h1:oTle449SfMfXO0BpZN1bMPe5SCRlQct8pX7siV30jGA= -github.com/bits-and-blooms/bitset v1.1.10/go.mod h1:w0XsmFg8qg6cmpTtJ0z3pKgjTDBMMnI/+I2syrE6XBE= +github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blevesearch/mmap-go v1.0.2 h1:JtMHb+FgQCTTYIhtMvimw15dJwu1Y5lrZDMOFXVWPk0= github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= diff --git a/vendor/github.com/blevesearch/zapx/v11/go.mod b/vendor/github.com/blevesearch/zapx/v11/go.mod index 394dbb6a57..74c989a62f 100644 --- a/vendor/github.com/blevesearch/zapx/v11/go.mod +++ b/vendor/github.com/blevesearch/zapx/v11/go.mod @@ -3,11 +3,11 @@ module github.com/blevesearch/zapx/v11 go 1.12 require ( - github.com/RoaringBitmap/roaring v0.4.23 + github.com/RoaringBitmap/roaring v0.7.3 github.com/blevesearch/bleve_index_api v1.0.0 github.com/blevesearch/mmap-go v1.0.2 github.com/blevesearch/scorch_segment_api/v2 v2.0.1 - github.com/blevesearch/vellum v1.0.3 + github.com/blevesearch/vellum v1.0.5 github.com/golang/snappy v0.0.1 github.com/spf13/cobra v0.0.5 ) diff --git a/vendor/github.com/blevesearch/zapx/v11/go.sum b/vendor/github.com/blevesearch/zapx/v11/go.sum index 68e45348c8..1c0359feab 100644 --- a/vendor/github.com/blevesearch/zapx/v11/go.sum +++ b/vendor/github.com/blevesearch/zapx/v11/go.sum @@ -1,15 +1,19 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/RoaringBitmap/roaring v0.4.23 h1:gpyfd12QohbqhFO4NVDUdoPOCXsyahYRQhINmlHxKeo= +github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= +github.com/RoaringBitmap/roaring v0.7.3 h1:RwirWpvFONt2EwHHEHhER7S4BHZkyj3qL5LXLlnQPZ4= +github.com/RoaringBitmap/roaring v0.7.3/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blevesearch/bleve_index_api v1.0.0 h1:Ds3XeuTxjXCkG6pgIwWDRyooJKNIuOKemnN0N0IkhTU= github.com/blevesearch/bleve_index_api v1.0.0/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4= github.com/blevesearch/mmap-go v1.0.2 h1:JtMHb+FgQCTTYIhtMvimw15dJwu1Y5lrZDMOFXVWPk0= github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= github.com/blevesearch/scorch_segment_api/v2 v2.0.1 h1:fd+hPtZ8GsbqPK1HslGp7Vhoik4arZteA/IsCEgOisw= github.com/blevesearch/scorch_segment_api/v2 v2.0.1/go.mod h1:lq7yK2jQy1yQjtjTfU931aVqz7pYxEudHaDwOt1tXfU= -github.com/blevesearch/vellum v1.0.3 h1:U86G41A7CtXNzzpIJHM8lSTUqz1Mp8U870TkcdCzZc8= -github.com/blevesearch/vellum v1.0.3/go.mod h1:2u5ax02KeDuNWu4/C+hVQMD6uLN4txH1JbtpaDNLJRo= +github.com/blevesearch/vellum v1.0.5 h1:L5dJ7hKauRVbuH7I8uqLeSK92CPPY6FfrbAmLhAug8A= +github.com/blevesearch/vellum v1.0.5/go.mod h1:atE0EH3fvk43zzS7t1YNdNC7DbmcC3uz+eMD5xZ2OyQ= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -17,19 +21,17 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dvyukov/go-fuzz v0.0.0-20210429054444-fca39067bc72/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= +github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 h1:Ujru1hufTHVb++eG6OuNDKMxZnGIvF6o/u8q/8h2+I4= github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 h1:gclg6gY70GLy3PbkQ1AERPfmLMMagS60DKF78eWwLn8= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 h1:twflg0XRTjwKpxb/jFExr4HGq6on2dEOmnL6FV+fgPw= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -38,10 +40,10 @@ github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -51,22 +53,43 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/stephens2424/writerset v1.0.2/go.mod h1:aS2JhsMn6eA7e82oNmW4rfsgAOp9COBTTl8mzkwADnc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200928182047-19e03678916f/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= diff --git a/vendor/github.com/blevesearch/zapx/v12/go.mod b/vendor/github.com/blevesearch/zapx/v12/go.mod index e6f734cfde..1ff20d9c8a 100644 --- a/vendor/github.com/blevesearch/zapx/v12/go.mod +++ b/vendor/github.com/blevesearch/zapx/v12/go.mod @@ -3,11 +3,11 @@ module github.com/blevesearch/zapx/v12 go 1.12 require ( - github.com/RoaringBitmap/roaring v0.4.23 + github.com/RoaringBitmap/roaring v0.7.3 github.com/blevesearch/bleve_index_api v1.0.0 github.com/blevesearch/mmap-go v1.0.2 github.com/blevesearch/scorch_segment_api/v2 v2.0.1 - github.com/blevesearch/vellum v1.0.3 + github.com/blevesearch/vellum v1.0.5 github.com/golang/snappy v0.0.1 github.com/spf13/cobra v0.0.5 ) diff --git a/vendor/github.com/blevesearch/zapx/v12/go.sum b/vendor/github.com/blevesearch/zapx/v12/go.sum index 68e45348c8..1c0359feab 100644 --- a/vendor/github.com/blevesearch/zapx/v12/go.sum +++ b/vendor/github.com/blevesearch/zapx/v12/go.sum @@ -1,15 +1,19 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/RoaringBitmap/roaring v0.4.23 h1:gpyfd12QohbqhFO4NVDUdoPOCXsyahYRQhINmlHxKeo= +github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= +github.com/RoaringBitmap/roaring v0.7.3 h1:RwirWpvFONt2EwHHEHhER7S4BHZkyj3qL5LXLlnQPZ4= +github.com/RoaringBitmap/roaring v0.7.3/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blevesearch/bleve_index_api v1.0.0 h1:Ds3XeuTxjXCkG6pgIwWDRyooJKNIuOKemnN0N0IkhTU= github.com/blevesearch/bleve_index_api v1.0.0/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4= github.com/blevesearch/mmap-go v1.0.2 h1:JtMHb+FgQCTTYIhtMvimw15dJwu1Y5lrZDMOFXVWPk0= github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= github.com/blevesearch/scorch_segment_api/v2 v2.0.1 h1:fd+hPtZ8GsbqPK1HslGp7Vhoik4arZteA/IsCEgOisw= github.com/blevesearch/scorch_segment_api/v2 v2.0.1/go.mod h1:lq7yK2jQy1yQjtjTfU931aVqz7pYxEudHaDwOt1tXfU= -github.com/blevesearch/vellum v1.0.3 h1:U86G41A7CtXNzzpIJHM8lSTUqz1Mp8U870TkcdCzZc8= -github.com/blevesearch/vellum v1.0.3/go.mod h1:2u5ax02KeDuNWu4/C+hVQMD6uLN4txH1JbtpaDNLJRo= +github.com/blevesearch/vellum v1.0.5 h1:L5dJ7hKauRVbuH7I8uqLeSK92CPPY6FfrbAmLhAug8A= +github.com/blevesearch/vellum v1.0.5/go.mod h1:atE0EH3fvk43zzS7t1YNdNC7DbmcC3uz+eMD5xZ2OyQ= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -17,19 +21,17 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dvyukov/go-fuzz v0.0.0-20210429054444-fca39067bc72/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= +github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 h1:Ujru1hufTHVb++eG6OuNDKMxZnGIvF6o/u8q/8h2+I4= github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 h1:gclg6gY70GLy3PbkQ1AERPfmLMMagS60DKF78eWwLn8= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 h1:twflg0XRTjwKpxb/jFExr4HGq6on2dEOmnL6FV+fgPw= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -38,10 +40,10 @@ github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -51,22 +53,43 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/stephens2424/writerset v1.0.2/go.mod h1:aS2JhsMn6eA7e82oNmW4rfsgAOp9COBTTl8mzkwADnc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200928182047-19e03678916f/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= diff --git a/vendor/github.com/blevesearch/zapx/v13/go.mod b/vendor/github.com/blevesearch/zapx/v13/go.mod index 7036e8689b..5e947d25ec 100644 --- a/vendor/github.com/blevesearch/zapx/v13/go.mod +++ b/vendor/github.com/blevesearch/zapx/v13/go.mod @@ -3,11 +3,11 @@ module github.com/blevesearch/zapx/v13 go 1.12 require ( - github.com/RoaringBitmap/roaring v0.4.23 + github.com/RoaringBitmap/roaring v0.7.3 github.com/blevesearch/bleve_index_api v1.0.0 github.com/blevesearch/mmap-go v1.0.2 github.com/blevesearch/scorch_segment_api/v2 v2.0.1 - github.com/blevesearch/vellum v1.0.3 + github.com/blevesearch/vellum v1.0.5 github.com/golang/snappy v0.0.1 github.com/spf13/cobra v0.0.5 ) diff --git a/vendor/github.com/blevesearch/zapx/v13/go.sum b/vendor/github.com/blevesearch/zapx/v13/go.sum index 68e45348c8..1c0359feab 100644 --- a/vendor/github.com/blevesearch/zapx/v13/go.sum +++ b/vendor/github.com/blevesearch/zapx/v13/go.sum @@ -1,15 +1,19 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/RoaringBitmap/roaring v0.4.23 h1:gpyfd12QohbqhFO4NVDUdoPOCXsyahYRQhINmlHxKeo= +github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= +github.com/RoaringBitmap/roaring v0.7.3 h1:RwirWpvFONt2EwHHEHhER7S4BHZkyj3qL5LXLlnQPZ4= +github.com/RoaringBitmap/roaring v0.7.3/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blevesearch/bleve_index_api v1.0.0 h1:Ds3XeuTxjXCkG6pgIwWDRyooJKNIuOKemnN0N0IkhTU= github.com/blevesearch/bleve_index_api v1.0.0/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4= github.com/blevesearch/mmap-go v1.0.2 h1:JtMHb+FgQCTTYIhtMvimw15dJwu1Y5lrZDMOFXVWPk0= github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= github.com/blevesearch/scorch_segment_api/v2 v2.0.1 h1:fd+hPtZ8GsbqPK1HslGp7Vhoik4arZteA/IsCEgOisw= github.com/blevesearch/scorch_segment_api/v2 v2.0.1/go.mod h1:lq7yK2jQy1yQjtjTfU931aVqz7pYxEudHaDwOt1tXfU= -github.com/blevesearch/vellum v1.0.3 h1:U86G41A7CtXNzzpIJHM8lSTUqz1Mp8U870TkcdCzZc8= -github.com/blevesearch/vellum v1.0.3/go.mod h1:2u5ax02KeDuNWu4/C+hVQMD6uLN4txH1JbtpaDNLJRo= +github.com/blevesearch/vellum v1.0.5 h1:L5dJ7hKauRVbuH7I8uqLeSK92CPPY6FfrbAmLhAug8A= +github.com/blevesearch/vellum v1.0.5/go.mod h1:atE0EH3fvk43zzS7t1YNdNC7DbmcC3uz+eMD5xZ2OyQ= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -17,19 +21,17 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dvyukov/go-fuzz v0.0.0-20210429054444-fca39067bc72/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= +github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 h1:Ujru1hufTHVb++eG6OuNDKMxZnGIvF6o/u8q/8h2+I4= github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 h1:gclg6gY70GLy3PbkQ1AERPfmLMMagS60DKF78eWwLn8= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 h1:twflg0XRTjwKpxb/jFExr4HGq6on2dEOmnL6FV+fgPw= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -38,10 +40,10 @@ github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -51,22 +53,43 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/stephens2424/writerset v1.0.2/go.mod h1:aS2JhsMn6eA7e82oNmW4rfsgAOp9COBTTl8mzkwADnc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200928182047-19e03678916f/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= diff --git a/vendor/github.com/blevesearch/zapx/v14/go.mod b/vendor/github.com/blevesearch/zapx/v14/go.mod index 762a0807dc..ee4f7d0a36 100644 --- a/vendor/github.com/blevesearch/zapx/v14/go.mod +++ b/vendor/github.com/blevesearch/zapx/v14/go.mod @@ -3,11 +3,11 @@ module github.com/blevesearch/zapx/v14 go 1.12 require ( - github.com/RoaringBitmap/roaring v0.4.23 + github.com/RoaringBitmap/roaring v0.7.3 github.com/blevesearch/bleve_index_api v1.0.0 github.com/blevesearch/mmap-go v1.0.2 github.com/blevesearch/scorch_segment_api/v2 v2.0.1 - github.com/blevesearch/vellum v1.0.3 + github.com/blevesearch/vellum v1.0.5 github.com/golang/snappy v0.0.1 github.com/spf13/cobra v0.0.5 ) diff --git a/vendor/github.com/blevesearch/zapx/v14/go.sum b/vendor/github.com/blevesearch/zapx/v14/go.sum index 68e45348c8..1c0359feab 100644 --- a/vendor/github.com/blevesearch/zapx/v14/go.sum +++ b/vendor/github.com/blevesearch/zapx/v14/go.sum @@ -1,15 +1,19 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/RoaringBitmap/roaring v0.4.23 h1:gpyfd12QohbqhFO4NVDUdoPOCXsyahYRQhINmlHxKeo= +github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= +github.com/RoaringBitmap/roaring v0.7.3 h1:RwirWpvFONt2EwHHEHhER7S4BHZkyj3qL5LXLlnQPZ4= +github.com/RoaringBitmap/roaring v0.7.3/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blevesearch/bleve_index_api v1.0.0 h1:Ds3XeuTxjXCkG6pgIwWDRyooJKNIuOKemnN0N0IkhTU= github.com/blevesearch/bleve_index_api v1.0.0/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4= github.com/blevesearch/mmap-go v1.0.2 h1:JtMHb+FgQCTTYIhtMvimw15dJwu1Y5lrZDMOFXVWPk0= github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= github.com/blevesearch/scorch_segment_api/v2 v2.0.1 h1:fd+hPtZ8GsbqPK1HslGp7Vhoik4arZteA/IsCEgOisw= github.com/blevesearch/scorch_segment_api/v2 v2.0.1/go.mod h1:lq7yK2jQy1yQjtjTfU931aVqz7pYxEudHaDwOt1tXfU= -github.com/blevesearch/vellum v1.0.3 h1:U86G41A7CtXNzzpIJHM8lSTUqz1Mp8U870TkcdCzZc8= -github.com/blevesearch/vellum v1.0.3/go.mod h1:2u5ax02KeDuNWu4/C+hVQMD6uLN4txH1JbtpaDNLJRo= +github.com/blevesearch/vellum v1.0.5 h1:L5dJ7hKauRVbuH7I8uqLeSK92CPPY6FfrbAmLhAug8A= +github.com/blevesearch/vellum v1.0.5/go.mod h1:atE0EH3fvk43zzS7t1YNdNC7DbmcC3uz+eMD5xZ2OyQ= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -17,19 +21,17 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dvyukov/go-fuzz v0.0.0-20210429054444-fca39067bc72/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= +github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 h1:Ujru1hufTHVb++eG6OuNDKMxZnGIvF6o/u8q/8h2+I4= github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 h1:gclg6gY70GLy3PbkQ1AERPfmLMMagS60DKF78eWwLn8= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 h1:twflg0XRTjwKpxb/jFExr4HGq6on2dEOmnL6FV+fgPw= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -38,10 +40,10 @@ github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -51,22 +53,43 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/stephens2424/writerset v1.0.2/go.mod h1:aS2JhsMn6eA7e82oNmW4rfsgAOp9COBTTl8mzkwADnc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200928182047-19e03678916f/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= diff --git a/vendor/github.com/blevesearch/zapx/v15/go.mod b/vendor/github.com/blevesearch/zapx/v15/go.mod index 5f098983b8..e74519d6d5 100644 --- a/vendor/github.com/blevesearch/zapx/v15/go.mod +++ b/vendor/github.com/blevesearch/zapx/v15/go.mod @@ -3,11 +3,11 @@ module github.com/blevesearch/zapx/v15 go 1.12 require ( - github.com/RoaringBitmap/roaring v0.4.23 + github.com/RoaringBitmap/roaring v0.7.3 github.com/blevesearch/bleve_index_api v1.0.0 github.com/blevesearch/mmap-go v1.0.2 github.com/blevesearch/scorch_segment_api/v2 v2.0.1 - github.com/blevesearch/vellum v1.0.3 + github.com/blevesearch/vellum v1.0.5 github.com/golang/snappy v0.0.1 github.com/spf13/cobra v0.0.5 ) diff --git a/vendor/github.com/blevesearch/zapx/v15/go.sum b/vendor/github.com/blevesearch/zapx/v15/go.sum index 68e45348c8..1c0359feab 100644 --- a/vendor/github.com/blevesearch/zapx/v15/go.sum +++ b/vendor/github.com/blevesearch/zapx/v15/go.sum @@ -1,15 +1,19 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/RoaringBitmap/roaring v0.4.23 h1:gpyfd12QohbqhFO4NVDUdoPOCXsyahYRQhINmlHxKeo= +github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= +github.com/RoaringBitmap/roaring v0.7.3 h1:RwirWpvFONt2EwHHEHhER7S4BHZkyj3qL5LXLlnQPZ4= +github.com/RoaringBitmap/roaring v0.7.3/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/blevesearch/bleve_index_api v1.0.0 h1:Ds3XeuTxjXCkG6pgIwWDRyooJKNIuOKemnN0N0IkhTU= github.com/blevesearch/bleve_index_api v1.0.0/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4= github.com/blevesearch/mmap-go v1.0.2 h1:JtMHb+FgQCTTYIhtMvimw15dJwu1Y5lrZDMOFXVWPk0= github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= github.com/blevesearch/scorch_segment_api/v2 v2.0.1 h1:fd+hPtZ8GsbqPK1HslGp7Vhoik4arZteA/IsCEgOisw= github.com/blevesearch/scorch_segment_api/v2 v2.0.1/go.mod h1:lq7yK2jQy1yQjtjTfU931aVqz7pYxEudHaDwOt1tXfU= -github.com/blevesearch/vellum v1.0.3 h1:U86G41A7CtXNzzpIJHM8lSTUqz1Mp8U870TkcdCzZc8= -github.com/blevesearch/vellum v1.0.3/go.mod h1:2u5ax02KeDuNWu4/C+hVQMD6uLN4txH1JbtpaDNLJRo= +github.com/blevesearch/vellum v1.0.5 h1:L5dJ7hKauRVbuH7I8uqLeSK92CPPY6FfrbAmLhAug8A= +github.com/blevesearch/vellum v1.0.5/go.mod h1:atE0EH3fvk43zzS7t1YNdNC7DbmcC3uz+eMD5xZ2OyQ= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -17,19 +21,17 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dvyukov/go-fuzz v0.0.0-20210429054444-fca39067bc72/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= +github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 h1:Ujru1hufTHVb++eG6OuNDKMxZnGIvF6o/u8q/8h2+I4= github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 h1:gclg6gY70GLy3PbkQ1AERPfmLMMagS60DKF78eWwLn8= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 h1:twflg0XRTjwKpxb/jFExr4HGq6on2dEOmnL6FV+fgPw= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -38,10 +40,10 @@ github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -51,22 +53,43 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/stephens2424/writerset v1.0.2/go.mod h1:aS2JhsMn6eA7e82oNmW4rfsgAOp9COBTTl8mzkwADnc= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a h1:aYOabOQFp6Vj6W1F80affTUvO9UxmJRx8K0gsfABByQ= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200928182047-19e03678916f/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= diff --git a/vendor/github.com/caddyserver/certmagic/acmeclient.go b/vendor/github.com/caddyserver/certmagic/acmeclient.go index 8a61a08255..cc876b9252 100644 --- a/vendor/github.com/caddyserver/certmagic/acmeclient.go +++ b/vendor/github.com/caddyserver/certmagic/acmeclient.go @@ -298,14 +298,22 @@ func (c *acmeClient) throttle(ctx context.Context, names []string) error { } rateLimitersMu.Unlock() if c.mgr.Logger != nil { - c.mgr.Logger.Info("waiting on internal rate limiter", zap.Strings("identifiers", names)) + c.mgr.Logger.Info("waiting on internal rate limiter", + zap.Strings("identifiers", names), + zap.String("ca", c.acmeClient.Directory), + zap.String("account", c.mgr.Email), + ) } err := rl.Wait(ctx) if err != nil { return err } if c.mgr.Logger != nil { - c.mgr.Logger.Info("done waiting on internal rate limiter", zap.Strings("identifiers", names)) + c.mgr.Logger.Info("done waiting on internal rate limiter", + zap.Strings("identifiers", names), + zap.String("ca", c.acmeClient.Directory), + zap.String("account", c.mgr.Email), + ) } return nil } diff --git a/vendor/github.com/caddyserver/certmagic/certificates.go b/vendor/github.com/caddyserver/certmagic/certificates.go index 09dc340d03..e6dab5e0ff 100644 --- a/vendor/github.com/caddyserver/certmagic/certificates.go +++ b/vendor/github.com/caddyserver/certmagic/certificates.go @@ -47,8 +47,11 @@ type Certificate struct { // The hex-encoded hash of this cert's chain's bytes. hash string - // Whether this certificate is under our management + // Whether this certificate is under our management. managed bool + + // The unique string identifying the issuer of this certificate. + issuerKey string } // NeedsRenewal returns true if the certificate is @@ -126,6 +129,7 @@ func (cfg *Config) loadManagedCertificate(domain string) (Certificate, error) { return cert, err } cert.managed = true + cert.issuerKey = certRes.issuerKey return cert, nil } diff --git a/vendor/github.com/caddyserver/certmagic/certmagic.go b/vendor/github.com/caddyserver/certmagic/certmagic.go index 03844b4ad9..bb33b90c55 100644 --- a/vendor/github.com/caddyserver/certmagic/certmagic.go +++ b/vendor/github.com/caddyserver/certmagic/certmagic.go @@ -410,6 +410,10 @@ type CertificateResource struct { // Any extra information associated with the certificate, // usually provided by the issuer implementation. IssuerData interface{} `json:"issuer_data,omitempty"` + + // The unique string identifying the issuer of the + // certificate; internally useful for storage access. + issuerKey string `json:"-"` } // NamesKey returns the list of SANs as a single string, diff --git a/vendor/github.com/caddyserver/certmagic/config.go b/vendor/github.com/caddyserver/certmagic/config.go index 1428a14e46..cce969b8bd 100644 --- a/vendor/github.com/caddyserver/certmagic/config.go +++ b/vendor/github.com/caddyserver/certmagic/config.go @@ -24,6 +24,7 @@ import ( "crypto/x509/pkix" "encoding/asn1" "encoding/json" + "errors" "fmt" weakrand "math/rand" "net" @@ -247,7 +248,7 @@ func newWithCache(certCache *Cache, cfg Config) *Config { // interactive use (i.e. when an administrator is present) so // that errors can be reported and fixed immediately. func (cfg *Config) ManageSync(domainNames []string) error { - return cfg.manageAll(nil, domainNames, false) + return cfg.manageAll(context.Background(), domainNames, false) } // ClientCredentials returns a list of TLS client certificate chains for the given identifiers. @@ -326,7 +327,12 @@ func (cfg *Config) manageOne(ctx context.Context, domainName string, async bool) } // if we don't have one in storage, obtain one obtain := func() error { - err := cfg.ObtainCert(ctx, domainName, !async) + var err error + if async { + err = cfg.ObtainCertAsync(ctx, domainName) + } else { + err = cfg.ObtainCertSync(ctx, domainName) + } if err != nil { return fmt.Errorf("%s: obtaining certificate: %w", domainName, err) } @@ -357,7 +363,12 @@ func (cfg *Config) manageOne(ctx context.Context, domainName string, async bool) // for an existing certificate, make sure it is renewed renew := func() error { - err := cfg.RenewCert(ctx, domainName, !async) + var err error + if async { + err = cfg.RenewCertAsync(ctx, domainName, false) + } else { + err = cfg.RenewCertSync(ctx, domainName, false) + } if err != nil { return fmt.Errorf("%s: renewing certificate: %w", domainName, err) } @@ -401,34 +412,38 @@ func (cfg *Config) Unmanage(domainNames []string) { cfg.certCache.mu.Unlock() } -// ObtainCert obtains a certificate for name using cfg, as long -// as a certificate does not already exist in storage for that -// name. The name must qualify and cfg must be flagged as Managed. -// This function is a no-op if storage already has a certificate -// for name. -// -// It only obtains and stores certificates (and their keys), -// it does not load them into memory. If interactive is true, -// the user may be shown a prompt. -// TODO: consider moving interactive param into the Config struct, -// and maybe retry settings into the Config struct as well? (same for RenewCert) -func (cfg *Config) ObtainCert(ctx context.Context, name string, interactive bool) error { +// ObtainCertSync generates a new private key and obtains a certificate for +// name using cfg in the foreground; i.e. interactively and without retries. +// It stows the renewed certificate and its assets in storage if successful. +// It DOES NOT load the certificate into the in-memory cache. This method +// is a no-op if storage already has a certificate for name. +func (cfg *Config) ObtainCertSync(ctx context.Context, name string) error { + return cfg.obtainCert(ctx, name, true) +} + +// ObtainCertAsync is the same as ObtainCertSync(), except it runs in the +// background; i.e. non-interactively, and with retries if it fails. +func (cfg *Config) ObtainCertAsync(ctx context.Context, name string) error { + return cfg.obtainCert(ctx, name, false) +} + +func (cfg *Config) obtainCert(ctx context.Context, name string, interactive bool) error { if len(cfg.Issuers) == 0 { return fmt.Errorf("no issuers configured; impossible to obtain or check for existing certificate in storage") } + + // if storage has all resources for this certificate, obtain is a no-op if cfg.storageHasCertResourcesAnyIssuer(name) { return nil } + // ensure storage is writeable and readable // TODO: this is not necessary every time; should only perform check once every so often for each storage, which may require some global state... err := cfg.checkStorage() if err != nil { return fmt.Errorf("failed storage check: %v - storage is probably misconfigured", err) } - return cfg.obtainCert(ctx, name, interactive) -} -func (cfg *Config) obtainCert(ctx context.Context, name string, interactive bool) error { log := loggerNamed(cfg.Logger, "obtain") if log != nil { @@ -437,7 +452,7 @@ func (cfg *Config) obtainCert(ctx context.Context, name string, interactive bool // ensure idempotency of the obtain operation for this name lockKey := cfg.lockKey(certIssueLockOp, name) - err := acquireLock(ctx, cfg.Storage, lockKey) + err = acquireLock(ctx, cfg.Storage, lockKey) if err != nil { return fmt.Errorf("unable to acquire lock '%s': %v", lockKey, err) } @@ -467,16 +482,24 @@ func (cfg *Config) obtainCert(ctx context.Context, name string, interactive bool return nil } - privateKey, err := cfg.KeySource.GenerateKey() + // if storage has a private key already, use it; otherwise, + // we'll generate our own + privKey, privKeyPEM, issuers, err := cfg.reusePrivateKey(name) if err != nil { return err } - privKeyPEM, err := encodePrivateKey(privateKey) - if err != nil { - return err + if privKey == nil { + privKey, err = cfg.KeySource.GenerateKey() + if err != nil { + return err + } + privKeyPEM, err = encodePrivateKey(privKey) + if err != nil { + return err + } } - csr, err := cfg.generateCSR(privateKey, []string{name}) + csr, err := cfg.generateCSR(privKey, []string{name}) if err != nil { return err } @@ -484,21 +507,37 @@ func (cfg *Config) obtainCert(ctx context.Context, name string, interactive bool // try to obtain from each issuer until we succeed var issuedCert *IssuedCertificate var issuerUsed Issuer - for _, issuer := range cfg.Issuers { + for i, issuer := range issuers { + log.Debug(fmt.Sprintf("trying issuer %d/%d", i+1, len(cfg.Issuers)), + zap.String("issuer", issuer.IssuerKey())) + if prechecker, ok := issuer.(PreChecker); ok { err = prechecker.PreCheck(ctx, []string{name}, interactive) if err != nil { continue } } + issuedCert, err = issuer.Issue(ctx, csr) if err == nil { issuerUsed = issuer break } + + // err is usually wrapped, which is nice for simply printing it, but + // with our structured error logs we only need the problem string + errToLog := err + var problem acme.Problem + if errors.As(err, &problem) { + errToLog = problem + } + log.Error("could not get certificate from issuer", + zap.String("identifier", name), + zap.String("issuer", issuer.IssuerKey()), + zap.Error(errToLog)) } if err != nil { - // TODO: only the error from the last issuer will be returned, oh well? + // only the error from the last issuer will be returned, but we logged the others return fmt.Errorf("[%s] Obtain: %w", name, err) } @@ -532,6 +571,47 @@ func (cfg *Config) obtainCert(ctx context.Context, name string, interactive bool return err } +// reusePrivateKey looks for a private key for domain in storage in the configured issuers +// paths. For the first private key it finds, it returns that key both decoded and PEM-encoded, +// as well as the reordered list of issuers to use instead of cfg.Issuers (because if a key +// is found, that issuer should be tried first, so it is moved to the front in a copy of +// cfg.Issuers). +func (cfg *Config) reusePrivateKey(domain string) (privKey crypto.PrivateKey, privKeyPEM []byte, issuers []Issuer, err error) { + // make a copy of cfg.Issuers so that if we have to reorder elements, we don't + // inadvertently mutate the configured issuers (see append calls below) + issuers = make([]Issuer, len(cfg.Issuers)) + copy(issuers, cfg.Issuers) + + for i, issuer := range issuers { + // see if this issuer location in storage has a private key for the domain + privateKeyStorageKey := StorageKeys.SitePrivateKey(issuer.IssuerKey(), domain) + privKeyPEM, err = cfg.Storage.Load(privateKeyStorageKey) + if _, ok := err.(ErrNotExist); ok { + err = nil // obviously, it's OK to not have a private key; so don't prevent obtaining a cert + continue + } + if err != nil { + return nil, nil, nil, fmt.Errorf("loading existing private key for reuse with issuer %s: %v", issuer.IssuerKey(), err) + } + + // we loaded a private key; try decoding it so we can use it + privKey, err = decodePrivateKey(privKeyPEM) + if err != nil { + return nil, nil, nil, err + } + + // since the private key was found in storage for this issuer, move it + // to the front of the list so we prefer this issuer first + issuers = append([]Issuer{issuer}, append(issuers[:i], issuers[i+1:]...)...) + break + } + + return +} + +// storageHasCertResourcesAnyIssuer returns true if storage has all the +// certificate resources in storage from any configured issuer. It checks +// all configured issuers in order. func (cfg *Config) storageHasCertResourcesAnyIssuer(name string) bool { for _, iss := range cfg.Issuers { if cfg.storageHasCertResources(iss, name) { @@ -541,23 +621,36 @@ func (cfg *Config) storageHasCertResourcesAnyIssuer(name string) bool { return false } -// RenewCert renews the certificate for name using cfg. It stows the -// renewed certificate and its assets in storage if successful. It -// DOES NOT update the in-memory cache with the new certificate. -func (cfg *Config) RenewCert(ctx context.Context, name string, interactive bool) error { +// RenewCertSync renews the certificate for name using cfg in the foreground; +// i.e. interactively and without retries. It stows the renewed certificate +// and its assets in storage if successful. It DOES NOT update the in-memory +// cache with the new certificate. The certificate will not be renewed if it +// is not close to expiring unless force is true. +// +// Renewing a certificate is the same as obtaining a certificate, except that +// the existing private key already in storage is reused. +func (cfg *Config) RenewCertSync(ctx context.Context, name string, force bool) error { + return cfg.renewCert(ctx, name, force, true) +} + +// RenewCertAsync is the same as RenewCertSync(), except it runs in the +// background; i.e. non-interactively, and with retries if it fails. +func (cfg *Config) RenewCertAsync(ctx context.Context, name string, force bool) error { + return cfg.renewCert(ctx, name, force, false) +} + +func (cfg *Config) renewCert(ctx context.Context, name string, force, interactive bool) error { if len(cfg.Issuers) == 0 { return fmt.Errorf("no issuers configured; impossible to renew or check existing certificate in storage") } + // ensure storage is writeable and readable // TODO: this is not necessary every time; should only perform check once every so often for each storage, which may require some global state... err := cfg.checkStorage() if err != nil { return fmt.Errorf("failed storage check: %v - storage is probably misconfigured", err) } - return cfg.renewCert(ctx, name, interactive) -} -func (cfg *Config) renewCert(ctx context.Context, name string, interactive bool) error { log := loggerNamed(cfg.Logger, "renew") if log != nil { @@ -566,7 +659,7 @@ func (cfg *Config) renewCert(ctx context.Context, name string, interactive bool) // ensure idempotency of the renew operation for this name lockKey := cfg.lockKey(certIssueLockOp, name) - err := acquireLock(ctx, cfg.Storage, lockKey) + err = acquireLock(ctx, cfg.Storage, lockKey) if err != nil { return fmt.Errorf("unable to acquire lock '%s': %v", lockKey, err) } @@ -597,13 +690,22 @@ func (cfg *Config) renewCert(ctx context.Context, name string, interactive bool) // check if renew is still needed - might have been renewed while waiting for lock timeLeft, needsRenew := cfg.managedCertNeedsRenewal(certRes) if !needsRenew { - if log != nil { - log.Info("certificate appears to have been renewed already", - zap.String("identifier", name), - zap.Duration("remaining", timeLeft)) + if force { + if log != nil { + log.Info("certificate does not need to be renewed, but renewal is being forced", + zap.String("identifier", name), + zap.Duration("remaining", timeLeft)) + } + } else { + if log != nil { + log.Info("certificate appears to have been renewed already", + zap.String("identifier", name), + zap.Duration("remaining", timeLeft)) + } + return nil } - return nil } + if log != nil { log.Info("renewing certificate", zap.String("identifier", name), @@ -629,14 +731,27 @@ func (cfg *Config) renewCert(ctx context.Context, name string, interactive bool) continue } } + issuedCert, err = issuer.Issue(ctx, csr) if err == nil { issuerUsed = issuer break } + + // err is usually wrapped, which is nice for simply printing it, but + // with our structured error logs we only need the problem string + errToLog := err + var problem acme.Problem + if errors.As(err, &problem) { + errToLog = problem + } + log.Error("could not get certificate from issuer", + zap.String("identifier", name), + zap.String("issuer", issuer.IssuerKey()), + zap.Error(errToLog)) } if err != nil { - // TODO: only the error from the last issuer will be returned, oh well? + // only the error from the last issuer will be returned, but we logged the others return fmt.Errorf("[%s] Renew: %w", name, err) } @@ -705,6 +820,9 @@ func (cfg *Config) generateCSR(privateKey crypto.PrivateKey, sans []string) (*x5 // RevokeCert revokes the certificate for domain via ACME protocol. It requires // that cfg.Issuers is properly configured with the same issuer that issued the // certificate being revoked. See RFC 5280 §5.3.1 for reason codes. +// +// The certificate assets are deleted from storage after successful revocation +// to prevent reuse. func (cfg *Config) RevokeCert(ctx context.Context, domain string, reason int, interactive bool) error { for i, issuer := range cfg.Issuers { issuerKey := issuer.IssuerKey() @@ -730,17 +848,9 @@ func (cfg *Config) RevokeCert(ctx context.Context, domain string, reason int, in cfg.emit("cert_revoked", domain) - err = cfg.Storage.Delete(StorageKeys.SiteCert(issuerKey, domain)) - if err != nil { - return fmt.Errorf("certificate revoked, but unable to delete certificate file: %v", err) - } - err = cfg.Storage.Delete(StorageKeys.SitePrivateKey(issuerKey, domain)) + err = cfg.deleteSiteAssets(issuerKey, domain) if err != nil { - return fmt.Errorf("certificate revoked, but unable to delete private key: %v", err) - } - err = cfg.Storage.Delete(StorageKeys.SiteMeta(issuerKey, domain)) - if err != nil { - return fmt.Errorf("certificate revoked, but unable to delete certificate metadata: %v", err) + return fmt.Errorf("certificate revoked, but unable to fully clean up assets from issuer %s: %v", issuerKey, err) } } @@ -877,6 +987,29 @@ func (cfg *Config) storageHasCertResources(issuer Issuer, domain string) bool { cfg.Storage.Exists(metaKey) } +// deleteSiteAssets deletes the folder in storage containing the +// certificate, private key, and metadata file for domain from the +// issuer with the given issuer key. +func (cfg *Config) deleteSiteAssets(issuerKey, domain string) error { + err := cfg.Storage.Delete(StorageKeys.SiteCert(issuerKey, domain)) + if err != nil { + return fmt.Errorf("deleting certificate file: %v", err) + } + err = cfg.Storage.Delete(StorageKeys.SitePrivateKey(issuerKey, domain)) + if err != nil { + return fmt.Errorf("deleting private key: %v", err) + } + err = cfg.Storage.Delete(StorageKeys.SiteMeta(issuerKey, domain)) + if err != nil { + return fmt.Errorf("deleting metadata file: %v", err) + } + err = cfg.Storage.Delete(StorageKeys.CertsSitePrefix(issuerKey, domain)) + if err != nil { + return fmt.Errorf("deleting site asset folder: %v", err) + } + return nil +} + // lockKey returns a key for a lock that is specific to the operation // named op being performed related to domainName and this config's CA. func (cfg *Config) lockKey(op, domainName string) string { diff --git a/vendor/github.com/caddyserver/certmagic/crypto.go b/vendor/github.com/caddyserver/certmagic/crypto.go index 8d9f3c7669..a705cdde2c 100644 --- a/vendor/github.com/caddyserver/certmagic/crypto.go +++ b/vendor/github.com/caddyserver/certmagic/crypto.go @@ -229,25 +229,24 @@ func (cfg *Config) loadCertResourceAnyIssuer(certNamesKey string) (CertificateRe // loadCertResource loads a certificate resource from the given issuer's storage location. func (cfg *Config) loadCertResource(issuer Issuer, certNamesKey string) (CertificateResource, error) { - var certRes CertificateResource - issuerKey := issuer.IssuerKey() + certRes := CertificateResource{issuerKey: issuer.IssuerKey()} normalizedName, err := idna.ToASCII(certNamesKey) if err != nil { - return certRes, fmt.Errorf("converting '%s' to ASCII: %v", certNamesKey, err) + return CertificateResource{}, fmt.Errorf("converting '%s' to ASCII: %v", certNamesKey, err) } - certBytes, err := cfg.Storage.Load(StorageKeys.SiteCert(issuerKey, normalizedName)) + certBytes, err := cfg.Storage.Load(StorageKeys.SiteCert(certRes.issuerKey, normalizedName)) if err != nil { return CertificateResource{}, err } certRes.CertificatePEM = certBytes - keyBytes, err := cfg.Storage.Load(StorageKeys.SitePrivateKey(issuerKey, normalizedName)) + keyBytes, err := cfg.Storage.Load(StorageKeys.SitePrivateKey(certRes.issuerKey, normalizedName)) if err != nil { return CertificateResource{}, err } certRes.PrivateKeyPEM = keyBytes - metaBytes, err := cfg.Storage.Load(StorageKeys.SiteMeta(issuerKey, normalizedName)) + metaBytes, err := cfg.Storage.Load(StorageKeys.SiteMeta(certRes.issuerKey, normalizedName)) if err != nil { return CertificateResource{}, err } diff --git a/vendor/github.com/caddyserver/certmagic/dnsutil.go b/vendor/github.com/caddyserver/certmagic/dnsutil.go index 85f7714a80..2573cb9663 100644 --- a/vendor/github.com/caddyserver/certmagic/dnsutil.go +++ b/vendor/github.com/caddyserver/certmagic/dnsutil.go @@ -313,11 +313,17 @@ func updateDomainWithCName(r *dns.Msg, fqdn string) string { } // recursiveNameservers are used to pre-check DNS propagation. It -// prepends user-configured nameservers (custom) to the defaults -// obtained from resolv.conf and defaultNameservers and ensures -// that all server addresses have a port value. +// picks user-configured nameservers (custom) OR the defaults +// obtained from resolv.conf and defaultNameservers if none is +// configured and ensures that all server addresses have a port value. func recursiveNameservers(custom []string) []string { - servers := append(custom, systemOrDefaultNameservers(defaultResolvConf, defaultNameservers)...) + var servers []string + if len(custom) == 0 { + servers = systemOrDefaultNameservers(defaultResolvConf, defaultNameservers) + } else { + servers = make([]string, len(custom)) + copy(servers, custom) + } populateNameserverPorts(servers) return servers } diff --git a/vendor/github.com/caddyserver/certmagic/go.mod b/vendor/github.com/caddyserver/certmagic/go.mod index a17f10f1bd..42665bf1b3 100644 --- a/vendor/github.com/caddyserver/certmagic/go.mod +++ b/vendor/github.com/caddyserver/certmagic/go.mod @@ -4,10 +4,10 @@ go 1.14 require ( github.com/klauspost/cpuid/v2 v2.0.6 - github.com/libdns/libdns v0.2.0 + github.com/libdns/libdns v0.2.1 github.com/mholt/acmez v0.1.3 - github.com/miekg/dns v1.1.30 - go.uber.org/zap v1.15.0 - golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de - golang.org/x/net v0.0.0-20200707034311-ab3426394381 + github.com/miekg/dns v1.1.42 + go.uber.org/zap v1.17.0 + golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a + golang.org/x/net v0.0.0-20210525063256-abc453219eb5 ) diff --git a/vendor/github.com/caddyserver/certmagic/go.sum b/vendor/github.com/caddyserver/certmagic/go.sum index ac4235326f..1251ac84f0 100644 --- a/vendor/github.com/caddyserver/certmagic/go.sum +++ b/vendor/github.com/caddyserver/certmagic/go.sum @@ -1,4 +1,3 @@ -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -12,12 +11,12 @@ github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORN github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/libdns/libdns v0.2.0 h1:ewg3ByWrdUrxrje8ChPVMBNcotg7H9LQYg+u5De2RzI= -github.com/libdns/libdns v0.2.0/go.mod h1:yQCXzk1lEZmmCPa857bnk4TsOiqYasqpyOEeSObbb40= +github.com/libdns/libdns v0.2.1 h1:Wu59T7wSHRgtA0cfxC+n1c/e+O3upJGWytknkmFEDis= +github.com/libdns/libdns v0.2.1/go.mod h1:yQCXzk1lEZmmCPa857bnk4TsOiqYasqpyOEeSObbb40= github.com/mholt/acmez v0.1.3 h1:J7MmNIk4Qf9b8mAGqAh4XkNeowv3f1zW816yf4zt7Qk= github.com/mholt/acmez v0.1.3/go.mod h1:8qnn8QA/Ewx8E3ZSsmscqsIjhhpxuy9vqdgbX2ceceM= -github.com/miekg/dns v1.1.30 h1:Qww6FseFn8PRfw07jueqIXqodm0JKiiKuK0DeXSqfyo= -github.com/miekg/dns v1.1.30/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= +github.com/miekg/dns v1.1.42 h1:gWGe42RGaIqXQZ+r3WUGEKBEtvPHY2SXo4dqixDNxuY= +github.com/miekg/dns v1.1.42/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -25,54 +24,62 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -go.uber.org/atomic v1.6.0 h1:Ezj3JGmsOnG1MoRWQkPBsKLe9DwWD9QeXzTRzzldNVk= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/multierr v1.5.0 h1:KCa4XfM8CWFCpxXRGok+Q0SS/0XBhMDbHHGABQLvD2A= +go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= +go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= -go.uber.org/zap v1.15.0 h1:ZZCA22JRF2gQE5FoNmhmrf7jeJJ2uhqDUNRYKm8dvmM= go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de h1:ikNHVSjEfnvz6sxdSPCaPt572qowuyMDMJLLm3Db3ig= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a h1:kr2P4QFmQr29mSLA43kwrOcgcReGTfbE9N577tCTuBc= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da h1:b3NXsE2LusjYGGjL5bxEVZZORm/YEFFrWFjR8eFrw/c= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425 h1:VvQyQJN0tSuecqgcIxMWnnfG5kSmgy9KZR9sW3W5QeA= -golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= diff --git a/vendor/github.com/caddyserver/certmagic/handshake.go b/vendor/github.com/caddyserver/certmagic/handshake.go index beb5cc3e9f..5506719c2b 100644 --- a/vendor/github.com/caddyserver/certmagic/handshake.go +++ b/vendor/github.com/caddyserver/certmagic/handshake.go @@ -375,7 +375,7 @@ func (cfg *Config) obtainOnDemandCertificate(hello *tls.ClientHelloInfo) (Certif defer cancel() // Obtain the certificate - err = cfg.ObtainCert(ctx, name, false) + err = cfg.ObtainCertAsync(ctx, name) // immediately unblock anyone waiting for it; doing this in // a defer would risk deadlock because of the recursive call @@ -520,7 +520,7 @@ func (cfg *Config) renewDynamicCertificate(hello *tls.ClientHelloInfo, currentCe // Renew and reload the certificate renewAndReload := func(ctx context.Context, cancel context.CancelFunc) (Certificate, error) { defer cancel() - err = cfg.RenewCert(ctx, name, false) + err = cfg.RenewCertAsync(ctx, name, false) if err == nil { // even though the recursive nature of the dynamic cert loading // would just call this function anyway, we do it here to diff --git a/vendor/github.com/caddyserver/certmagic/maintain.go b/vendor/github.com/caddyserver/certmagic/maintain.go index 3e5a8736a7..63d475ced7 100644 --- a/vendor/github.com/caddyserver/certmagic/maintain.go +++ b/vendor/github.com/caddyserver/certmagic/maintain.go @@ -25,6 +25,7 @@ import ( "strings" "time" + "github.com/mholt/acmez/acme" "go.uber.org/zap" "golang.org/x/crypto/ocsp" ) @@ -250,7 +251,7 @@ func (certCache *Cache) queueRenewalTask(ctx context.Context, oldCert Certificat } // perform renewal - crucially, this happens OUTSIDE a lock on certCache - err := cfg.RenewCert(ctx, renewName, false) + err := cfg.RenewCertAsync(ctx, renewName, false) if err != nil { if cfg.OnDemand != nil { // loaded dynamically, remove dynamically @@ -280,7 +281,7 @@ func (certCache *Cache) queueRenewalTask(ctx context.Context, oldCert Certificat // Ryan Sleevi's recommendations for good OCSP support: // https://gist.github.com/sleevi/5efe9ef98961ecfb4da8 func (certCache *Cache) updateOCSPStaples(ctx context.Context) { - log := loggerNamed(certCache.logger, "maintenance") + logger := loggerNamed(certCache.logger, "maintenance") // temporary structures to store updates or tasks // so that we can keep our locks short-lived @@ -293,9 +294,13 @@ func (certCache *Cache) updateOCSPStaples(ctx context.Context) { certHash string lastNextUpdate time.Time } + type renewQueueEntry struct { + oldCert Certificate + ocspResp *ocsp.Response + } updated := make(map[string]ocspUpdate) - var updateQueue []updateQueueEntry - var renewQueue []Certificate + var updateQueue []updateQueueEntry // certs that need a refreshed staple + var renewQueue []renewQueueEntry // certs that need to be renewed (due to revocation) configs := make(map[string]*Config) // obtain brief read lock during our scan to see which staples need updating @@ -324,8 +329,8 @@ func (certCache *Cache) updateOCSPStaples(ctx context.Context) { cfg, err := certCache.getConfig(cert) if err != nil { - if log != nil { - log.Error("unable to refresh OCSP staple because getting automation config for certificate failed", + if logger != nil { + logger.Error("unable to refresh OCSP staple because getting automation config for certificate failed", zap.Strings("identifiers", cert.Names), zap.Error(err)) } @@ -333,8 +338,8 @@ func (certCache *Cache) updateOCSPStaples(ctx context.Context) { } if cfg == nil { // this is bad if this happens, probably a programmer error (oops) - if log != nil { - log.Error("no configuration associated with certificate; unable to manage OCSP staples", + if logger != nil { + logger.Error("no configuration associated with certificate; unable to manage OCSP staples", zap.Strings("identifiers", cert.Names)) } continue @@ -344,8 +349,8 @@ func (certCache *Cache) updateOCSPStaples(ctx context.Context) { if err != nil || ocspResp == nil { if cert.ocsp != nil { // if there was no staple before, that's fine; otherwise we should log the error - if log != nil { - log.Error("stapling OCSP", + if logger != nil { + logger.Error("stapling OCSP", zap.Strings("identifiers", cert.Names), zap.Error(err)) } @@ -357,8 +362,8 @@ func (certCache *Cache) updateOCSPStaples(ctx context.Context) { // If there was no staple before, or if the response is updated, make // sure we apply the update to all names on the certificate. if cert.ocsp != nil && (lastNextUpdate.IsZero() || lastNextUpdate != cert.ocsp.NextUpdate) { - if log != nil { - log.Info("advancing OCSP staple", + if logger != nil { + logger.Info("advancing OCSP staple", zap.Strings("identifiers", cert.Names), zap.Time("from", lastNextUpdate), zap.Time("to", cert.ocsp.NextUpdate)) @@ -366,10 +371,12 @@ func (certCache *Cache) updateOCSPStaples(ctx context.Context) { updated[certHash] = ocspUpdate{rawBytes: cert.Certificate.OCSPStaple, parsed: cert.ocsp} } - // If a managed certificate was revoked, we should attempt - // to replace it with a new one. If that fails, oh well. + // If a managed certificate was revoked, we should attempt to replace it with a new one. if cert.managed && ocspResp.Status == ocsp.Revoked && len(cert.Names) > 0 { - renewQueue = append(renewQueue, cert) + renewQueue = append(renewQueue, renewQueueEntry{ + oldCert: cert, + ocspResp: ocspResp, + }) configs[cert.Names[0]] = cfg } } @@ -386,35 +393,61 @@ func (certCache *Cache) updateOCSPStaples(ctx context.Context) { // We attempt to replace any certificates that were revoked. // Crucially, this happens OUTSIDE a lock on the certCache. - for _, oldCert := range renewQueue { - if log != nil { - log.Warn("OCSP status for managed certificate is REVOKED; attempting to replace with new certificate", - zap.Strings("identifiers", oldCert.Names), - zap.Time("expiration", oldCert.Leaf.NotAfter)) + for _, renew := range renewQueue { + if logger != nil { + logger.Warn("OCSP status for managed certificate is REVOKED; attempting to replace with new certificate", + zap.Strings("identifiers", renew.oldCert.Names), + zap.Time("expiration", renew.oldCert.Leaf.NotAfter)) } - renewName := oldCert.Names[0] + renewName := renew.oldCert.Names[0] cfg := configs[renewName] - // TODO: consider using a new key in this situation, but we don't know if key storage has been compromised... - err := cfg.RenewCert(ctx, renewName, false) + // if revoked for key compromise, we can't be sure whether the storage of + // the key is still safe; however, we KNOW the old key is not safe, and we + // can only hope by the time of revocation that storage has been secured; + // key management is not something we want to get into, but in this case + // it seems prudent to replace the key - and since renewal requires reuse + // of a prior key, we can't do a "renew" to replace the cert if we need a + // new key, so we'll have to do an obtain instead + var obtainInsteadOfRenew bool + if renew.ocspResp.RevocationReason == acme.ReasonKeyCompromise { + err := cfg.moveCompromisedPrivateKey(renew.oldCert, logger) + if err != nil && logger != nil { + logger.Error("could not remove compromised private key from use", + zap.Strings("identifiers", renew.oldCert.Names), + zap.String("issuer", renew.oldCert.issuerKey), + zap.Error(err)) + } + obtainInsteadOfRenew = true + } + + var err error + if obtainInsteadOfRenew { + err = cfg.ObtainCertAsync(ctx, renewName) + } else { + // notice that we force renewal; otherwise, it might see that the + // certificate isn't close to expiring and return, but we really + // need a replacement certificate! see issue #4191 + err = cfg.RenewCertAsync(ctx, renewName, true) + } if err != nil { // probably better to not serve a revoked certificate at all - if log != nil { - log.Error("unable to obtain new to certificate after OCSP status of REVOKED; removing from cache", - zap.Strings("identifiers", oldCert.Names), + if logger != nil { + logger.Error("unable to obtain new to certificate after OCSP status of REVOKED; removing from cache", + zap.Strings("identifiers", renew.oldCert.Names), zap.Error(err)) } certCache.mu.Lock() - certCache.removeCertificate(oldCert) + certCache.removeCertificate(renew.oldCert) certCache.mu.Unlock() continue } - err = cfg.reloadManagedCertificate(oldCert) + err = cfg.reloadManagedCertificate(renew.oldCert) if err != nil { - if log != nil { - log.Error("after obtaining new certificate due to OCSP status of REVOKED", - zap.Strings("identifiers", oldCert.Names), + if logger != nil { + logger.Error("after obtaining new certificate due to OCSP status of REVOKED", + zap.Strings("identifiers", renew.oldCert.Names), zap.Error(err)) } continue @@ -566,6 +599,37 @@ func deleteExpiredCerts(ctx context.Context, storage Storage, gracePeriod time.D return nil } +// moveCompromisedPrivateKey moves the private key for cert to a ".compromised" file +// by copying the data to the new file, then deleting the old one. +func (cfg *Config) moveCompromisedPrivateKey(cert Certificate, logger *zap.Logger) error { + privKeyStorageKey := StorageKeys.SitePrivateKey(cert.issuerKey, cert.Names[0]) + + privKeyPEM, err := cfg.Storage.Load(privKeyStorageKey) + if err != nil { + return err + } + + compromisedPrivKeyStorageKey := privKeyStorageKey + ".compromised" + err = cfg.Storage.Store(compromisedPrivKeyStorageKey, privKeyPEM) + if err != nil { + // better safe than sorry: as a last resort, try deleting the key so it won't be reused + cfg.Storage.Delete(privKeyStorageKey) + return err + } + + err = cfg.Storage.Delete(privKeyStorageKey) + if err != nil { + return err + } + + logger.Info("removed certificate's compromised private key from use", + zap.String("storage_path", compromisedPrivKeyStorageKey), + zap.Strings("identifiers", cert.Names), + zap.String("issuer", cert.issuerKey)) + + return nil +} + const ( // DefaultRenewCheckInterval is how often to check certificates for expiration. // Scans are very lightweight, so this can be semi-frequent. This default should diff --git a/vendor/github.com/go-enry/go-enry/v2/README.md b/vendor/github.com/go-enry/go-enry/v2/README.md index 4f3c2abff7..3e07849c94 100644 --- a/vendor/github.com/go-enry/go-enry/v2/README.md +++ b/vendor/github.com/go-enry/go-enry/v2/README.md @@ -156,7 +156,7 @@ Generated Rust bindings using a C static library are available at https://github ## Divergences from Linguist -The `enry` library is based on the data from `github/linguist` version **v7.13.0**. +The `enry` library is based on the data from `github/linguist` version **v7.14.0**. Parsing [linguist/samples](https://github.com/github/linguist/tree/master/samples) the following `enry` results are different from the Linguist: diff --git a/vendor/github.com/go-enry/go-enry/v2/data/alias.go b/vendor/github.com/go-enry/go-enry/v2/data/alias.go index 472e256230..baf5ae653d 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/alias.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/alias.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data @@ -80,6 +80,7 @@ var LanguageByAliasMap = map[string]string{ "ballerina": "Ballerina", "bash": "Shell", "bash_session": "ShellSession", + "basic": "BASIC", "bat": "Batchfile", "batch": "Batchfile", "batchfile": "Batchfile", @@ -87,6 +88,7 @@ var LanguageByAliasMap = map[string]string{ "beef": "Beef", "befunge": "Befunge", "bibtex": "BibTeX", + "bicep": "Bicep", "bison": "Bison", "bitbake": "BitBake", "blade": "Blade", @@ -141,6 +143,7 @@ var LanguageByAliasMap = map[string]string{ "cmake": "CMake", "cobol": "COBOL", "coccinelle": "SmPL", + "codeowners": "CODEOWNERS", "codeql": "CodeQL", "coffee": "CoffeeScript", "coffee-script": "CoffeeScript", @@ -195,7 +198,8 @@ var LanguageByAliasMap = map[string]string{ "digital_command_language": "DIGITAL Command Language", "dircolors": "dircolors", "directx_3d_file": "DirectX 3D File", - "django": "HTML+Django", + "django": "Jinja", + "dlang": "D", "dm": "DM", "dns_zone": "DNS Zone", "dockerfile": "Dockerfile", @@ -240,6 +244,7 @@ var LanguageByAliasMap = map[string]string{ "fancy": "Fancy", "fantom": "Fantom", "faust": "Faust", + "fb": "FreeBasic", "figfont": "FIGlet Font", "figlet_font": "FIGlet Font", "filebench_wml": "Filebench WML", @@ -252,6 +257,7 @@ var LanguageByAliasMap = map[string]string{ "fortran": "Fortran", "fortran_free_form": "Fortran Free Form", "foxpro": "xBase", + "freebasic": "FreeBasic", "freemarker": "FreeMarker", "frege": "Frege", "fsharp": "F#", @@ -268,6 +274,7 @@ var LanguageByAliasMap = map[string]string{ "gdb": "GDB", "gdscript": "GDScript", "gedcom": "GEDCOM", + "gemfile.lock": "Gemfile.lock", "genie": "Genie", "genshi": "Genshi", "gentoo_ebuild": "Gentoo Ebuild", @@ -316,17 +323,16 @@ var LanguageByAliasMap = map[string]string{ "hlsl": "HLSL", "holyc": "HolyC", "html": "HTML", - "html+django": "HTML+Django", - "html+django/jinja": "HTML+Django", + "html+django": "Jinja", "html+ecr": "HTML+ECR", "html+eex": "HTML+EEX", "html+erb": "HTML+ERB", - "html+jinja": "HTML+Django", + "html+jinja": "Jinja", "html+php": "HTML+PHP", "html+razor": "HTML+Razor", "html+ruby": "HTML+ERB", "htmlbars": "Handlebars", - "htmldjango": "HTML+Django", + "htmldjango": "Jinja", "http": "HTTP", "hxml": "HXML", "hy": "Hy", @@ -365,9 +371,11 @@ var LanguageByAliasMap = map[string]string{ "javascript": "JavaScript", "javascript+erb": "JavaScript+ERB", "jflex": "JFlex", + "jinja": "Jinja", "jison": "Jison", "jison_lex": "Jison Lex", "jolie": "Jolie", + "jq": "jq", "jruby": "Ruby", "js": "JavaScript", "json": "JSON", @@ -388,6 +396,7 @@ var LanguageByAliasMap = map[string]string{ "kotlin": "Kotlin", "krl": "KRL", "ksy": "Kaitai Struct", + "kusto": "Kusto", "labview": "LabVIEW", "lark": "Lark", "lasso": "Lasso", @@ -456,6 +465,7 @@ var LanguageByAliasMap = map[string]string{ "metal": "Metal", "mf": "Makefile", "microsoft_developer_studio_project": "Microsoft Developer Studio Project", + "microsoft_visual_studio_solution": "Microsoft Visual Studio Solution", "minid": "MiniD", "mirah": "Mirah", "mirc_script": "mIRC Script", @@ -649,6 +659,8 @@ var LanguageByAliasMap = map[string]string{ "red": "Red", "red/system": "Red", "redcode": "Redcode", + "redirect_rules": "Redirect Rules", + "redirects": "Redirect Rules", "regex": "Regular Expression", "regexp": "Regular Expression", "regular_expression": "Regular Expression", @@ -664,6 +676,9 @@ var LanguageByAliasMap = map[string]string{ "riot": "Riot", "rmarkdown": "RMarkdown", "robotframework": "RobotFramework", + "robots": "robots.txt", + "robots.txt": "robots.txt", + "robots_txt": "robots.txt", "roff": "Roff", "roff_manpage": "Roff Manpage", "rouge": "Rouge", @@ -698,6 +713,7 @@ var LanguageByAliasMap = map[string]string{ "shellsession": "ShellSession", "shen": "Shen", "sieve": "Sieve", + "singularity": "Singularity", "slash": "Slash", "slice": "Slice", "slim": "Slim", @@ -729,6 +745,7 @@ var LanguageByAliasMap = map[string]string{ "starlark": "Starlark", "stata": "Stata", "ston": "STON", + "stringtemplate": "StringTemplate", "stylus": "Stylus", "subrip_text": "SubRip Text", "sugarss": "SugarSS", @@ -812,6 +829,10 @@ var LanguageByAliasMap = map[string]string{ "winbatch": "Batchfile", "windows_registry_entries": "Windows Registry Entries", "wisp": "wisp", + "wl": "Mathematica", + "wolfram": "Mathematica", + "wolfram_lang": "Mathematica", + "wolfram_language": "Mathematica", "wollok": "Wollok", "world_of_warcraft_addon_data": "World of Warcraft Addon Data", "wsdl": "XML", @@ -830,6 +851,7 @@ var LanguageByAliasMap = map[string]string{ "xml+kid": "Genshi", "xml_property_list": "XML Property List", "xojo": "Xojo", + "xonsh": "Xonsh", "xpages": "XPages", "xpm": "X PixMap", "xproc": "XProc", diff --git a/vendor/github.com/go-enry/go-enry/v2/data/colors.go b/vendor/github.com/go-enry/go-enry/v2/data/colors.go index 55df0ce9b0..ffaa7d3ce9 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/colors.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/colors.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data @@ -29,9 +29,11 @@ var LanguagesColor = map[string]string{ "Asymptote": "#ff0000", "AutoHotkey": "#6594b9", "AutoIt": "#1C3552", + "BASIC": "#ff0000", "Ballerina": "#FF5000", "Batchfile": "#C1F12E", "Beef": "#a52f4e", + "Bicep": "#519aba", "Bison": "#6A463F", "Blade": "#f7523f", "BlitzMax": "#cd6400", @@ -89,6 +91,7 @@ var LanguagesColor = map[string]string{ "Faust": "#c37240", "Forth": "#341708", "Fortran": "#4d41b1", + "FreeBasic": "#867db1", "FreeMarker": "#0050b2", "Frege": "#00cafe", "Futhark": "#5f021f", @@ -96,6 +99,7 @@ var LanguagesColor = map[string]string{ "GAML": "#FFC766", "GDScript": "#355570", "Game Maker Language": "#71b417", + "Gemfile.lock": "#701516", "Genie": "#fb855d", "Gherkin": "#5B2063", "Glyph": "#c1ac7f", @@ -128,6 +132,7 @@ var LanguagesColor = map[string]string{ "JSONiq": "#40d47e", "Java": "#b07219", "JavaScript": "#f1e05a", + "Jinja": "#a52a22", "Jolie": "#843179", "Jsonnet": "#0064bd", "Julia": "#a270ba", @@ -139,7 +144,7 @@ var LanguagesColor = map[string]string{ "LLVM": "#185619", "LOLCODE": "#cc9900", "LSL": "#3d9970", - "Lark": "#0b130f", + "Lark": "#2980B9", "Lasso": "#999999", "Latte": "#f2a542", "Less": "#1d365d", @@ -254,6 +259,7 @@ var LanguagesColor = map[string]string{ "Self": "#0579aa", "Shell": "#89e051", "Shen": "#120F14", + "Singularity": "#64E6AD", "Slash": "#007eff", "Slice": "#003fa2", "Slim": "#2b2b2b", @@ -265,6 +271,7 @@ var LanguagesColor = map[string]string{ "Stan": "#b2011d", "Standard ML": "#dc566d", "Starlark": "#76d275", + "StringTemplate": "#3fb34f", "Stylus": "#ff6347", "SuperCollider": "#46390b", "Svelte": "#ff3e00", @@ -297,6 +304,7 @@ var LanguagesColor = map[string]string{ "XC": "#99DA07", "XQuery": "#5232e7", "XSLT": "#EB8CEB", + "Xonsh": "#285EEF", "YAML": "#cb171e", "YARA": "#220000", "YASnippet": "#32AB90", @@ -307,6 +315,7 @@ var LanguagesColor = map[string]string{ "Zephir": "#118f9e", "Zig": "#ec915c", "eC": "#913960", + "jq": "#c7254e", "mIRC Script": "#3d57c3", "mcfunction": "#E22837", "nesC": "#94B0C7", diff --git a/vendor/github.com/go-enry/go-enry/v2/data/commit.go b/vendor/github.com/go-enry/go-enry/v2/data/commit.go index 23769932d5..8d9f271a46 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/commit.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/commit.go @@ -1,7 +1,7 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data // linguist's commit from which files were generated. -var LinguistCommit = "6aed0bd564f55c4f2d987c2e6035eda7aea26375" +var LinguistCommit = "95636e415749b0bf8fbf3f86922f788cf91c11a2" diff --git a/vendor/github.com/go-enry/go-enry/v2/data/content.go b/vendor/github.com/go-enry/go-enry/v2/data/content.go index b35ffa4060..cb11d35c87 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/content.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/content.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data @@ -619,6 +619,16 @@ var ContentHeuristics = map[string]*Heuristics{ rule.MatchingLanguages("Asymptote"), ), }, + ".bas": &Heuristics{ + rule.Or( + rule.MatchingLanguages("FreeBasic"), + regexp.MustCompile(`(?m)^[ \t]*#(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s`), + ), + rule.Or( + rule.MatchingLanguages("BASIC"), + regexp.MustCompile(`(?m)^\s*\d+`), + ), + }, ".bb": &Heuristics{ rule.Or( rule.MatchingLanguages("BlitzBasic"), @@ -629,6 +639,12 @@ var ContentHeuristics = map[string]*Heuristics{ regexp.MustCompile(`(?m)^\s*(# |include|require)\b`), ), }, + ".bi": &Heuristics{ + rule.Or( + rule.MatchingLanguages("FreeBasic"), + regexp.MustCompile(`(?m)^[ \t]*#(?:define|endif|endmacro|ifn?def|if|include|lang|macro)\s`), + ), + }, ".builds": &Heuristics{ rule.Or( rule.MatchingLanguages("XML"), @@ -658,7 +674,7 @@ var ContentHeuristics = map[string]*Heuristics{ ".cls": &Heuristics{ rule.Or( rule.MatchingLanguages("TeX"), - regexp.MustCompile(`(?m)\\\w+{`), + regexp.MustCompile(`(?m)^\s*\\(?:NeedsTeXFormat|ProvidesClass){`), ), rule.Or( rule.MatchingLanguages("ObjectScript"), @@ -681,6 +697,16 @@ var ContentHeuristics = map[string]*Heuristics{ regexp.MustCompile(`(?m)^(\s*namespace\s*[\w\.]+\s*{|\s*\/\/)`), ), }, + ".csl": &Heuristics{ + rule.Or( + rule.MatchingLanguages("XML"), + regexp.MustCompile(`(?m)(?i:^\s*(\<\?xml|xmlns))`), + ), + rule.Or( + rule.MatchingLanguages("Kusto"), + regexp.MustCompile(`(?m)(^\|\s*(where|extend|project|limit|summarize))|(^\.\w+)`), + ), + }, ".d": &Heuristics{ rule.Or( rule.MatchingLanguages("D"), @@ -1390,6 +1416,12 @@ var ContentHeuristics = map[string]*Heuristics{ regexp.MustCompile(`(?m)^(\d{2}:\d{2}:\d{2},\d{3})\s*(-->)\s*(\d{2}:\d{2}:\d{2},\d{3})$`), ), }, + ".st": &Heuristics{ + rule.Or( + rule.MatchingLanguages("Smalltalk"), + regexp.MustCompile(`(?m)\A\s*[\[{(^"'\w#]|[a-zA-Z_]\w*\s*:=\s*[a-zA-Z_]\w*|class\s*>>\s*[a-zA-Z_]\w*|^[a-zA-Z_]\w*\s+[a-zA-Z_]\w*:|^Class\s*{|if(?:True|False):\s*\[`), + ), + }, ".t": &Heuristics{ rule.Or( rule.MatchingLanguages("Perl"), diff --git a/vendor/github.com/go-enry/go-enry/v2/data/documentation.go b/vendor/github.com/go-enry/go-enry/v2/data/documentation.go index 1ef16fd48a..41e771c13f 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/documentation.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/documentation.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data diff --git a/vendor/github.com/go-enry/go-enry/v2/data/extension.go b/vendor/github.com/go-enry/go-enry/v2/data/extension.go index 66b409dbb3..4d60d1b395 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/extension.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/extension.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data @@ -97,7 +97,7 @@ var LanguagesByExtension = map[string][]string{ ".axs.erb": {"NetLinx+ERB"}, ".b": {"Brainfuck", "Limbo"}, ".bal": {"Ballerina"}, - ".bas": {"VBA"}, + ".bas": {"BASIC", "FreeBasic", "VBA"}, ".bash": {"Shell"}, ".bat": {"Batchfile"}, ".bats": {"Shell"}, @@ -107,8 +107,10 @@ var LanguagesByExtension = map[string][]string{ ".bdy": {"PLSQL"}, ".befunge": {"Befunge"}, ".bf": {"Beef", "Brainfuck", "HyPhy"}, + ".bi": {"FreeBasic"}, ".bib": {"BibTeX"}, ".bibtex": {"BibTeX"}, + ".bicep": {"Bicep"}, ".bison": {"Bison"}, ".blade": {"Blade"}, ".blade.php": {"Blade"}, @@ -200,7 +202,7 @@ var LanguagesByExtension = map[string][]string{ ".csdef": {"XML"}, ".csh": {"Tcsh"}, ".cshtml": {"HTML+Razor"}, - ".csl": {"XML"}, + ".csl": {"Kusto", "XML"}, ".cson": {"CSON"}, ".csproj": {"XML"}, ".css": {"CSS"}, @@ -474,19 +476,19 @@ var LanguagesByExtension = map[string][]string{ ".iuml": {"PlantUML"}, ".ivy": {"XML"}, ".j": {"Jasmin", "Objective-J"}, - ".j2": {"HTML+Django"}, + ".j2": {"Jinja"}, ".jade": {"Pug"}, ".jake": {"JavaScript"}, ".java": {"Java"}, ".jbuilder": {"Ruby"}, ".jelly": {"XML"}, ".jflex": {"JFlex"}, - ".jinja": {"HTML+Django"}, - ".jinja2": {"HTML+Django"}, + ".jinja": {"Jinja"}, + ".jinja2": {"Jinja"}, ".jison": {"Jison"}, ".jisonlex": {"Jison Lex"}, ".jl": {"Julia"}, - ".jq": {"JSONiq"}, + ".jq": {"JSONiq", "jq"}, ".js": {"JavaScript"}, ".js.erb": {"JavaScript+ERB"}, ".jsb": {"JavaScript"}, @@ -781,6 +783,7 @@ var LanguagesByExtension = map[string][]string{ ".pov": {"POV-Ray SDL"}, ".pp": {"Pascal", "Puppet"}, ".pprx": {"REXX"}, + ".prawn": {"Ruby"}, ".prc": {"PLSQL", "SQL"}, ".prefab": {"Unity3D Asset"}, ".prefs": {"INI"}, @@ -938,6 +941,7 @@ var LanguagesByExtension = map[string][]string{ ".sl": {"Slash"}, ".sld": {"Scheme"}, ".slim": {"Slim"}, + ".sln": {"Microsoft Visual Studio Solution"}, ".sls": {"SaltStack", "Scheme"}, ".sma": {"Pawn"}, ".smali": {"Smali"}, @@ -966,7 +970,7 @@ var LanguagesByExtension = map[string][]string{ ".ss": {"Scheme"}, ".ssjs": {"JavaScript"}, ".sss": {"SugarSS"}, - ".st": {"HTML", "Smalltalk"}, + ".st": {"Smalltalk", "StringTemplate"}, ".stan": {"Stan"}, ".sthlp": {"Stata"}, ".ston": {"STON"}, @@ -1138,6 +1142,7 @@ var LanguagesByExtension = map[string][]string{ ".xmi": {"XML"}, ".xml": {"XML"}, ".xml.dist": {"XML"}, + ".xmp": {"XML"}, ".xojo_code": {"Xojo"}, ".xojo_menu": {"Xojo"}, ".xojo_report": {"Xojo"}, @@ -1157,6 +1162,7 @@ var LanguagesByExtension = map[string][]string{ ".xrl": {"Erlang"}, ".xs": {"XS"}, ".xsd": {"XML"}, + ".xsh": {"Xonsh"}, ".xsjs": {"JavaScript"}, ".xsjslib": {"JavaScript"}, ".xsl": {"XSLT"}, @@ -1233,11 +1239,13 @@ var ExtensionsByLanguage = map[string][]string{ "AutoIt": {".au3"}, "Avro IDL": {".avdl"}, "Awk": {".awk", ".auk", ".gawk", ".mawk", ".nawk"}, + "BASIC": {".bas"}, "Ballerina": {".bal"}, "Batchfile": {".bat", ".cmd"}, "Beef": {".bf"}, "Befunge": {".befunge"}, "BibTeX": {".bib", ".bibtex"}, + "Bicep": {".bicep"}, "Bison": {".bison"}, "BitBake": {".bb"}, "Blade": {".blade", ".blade.php"}, @@ -1341,6 +1349,7 @@ var ExtensionsByLanguage = map[string][]string{ "Forth": {".fth", ".4th", ".f", ".for", ".forth", ".fr", ".frt", ".fs"}, "Fortran": {".f", ".f77", ".for", ".fpp"}, "Fortran Free Form": {".f90", ".f03", ".f08", ".f95"}, + "FreeBasic": {".bi", ".bas"}, "FreeMarker": {".ftl"}, "Frege": {".fr"}, "Futhark": {".fut"}, @@ -1380,8 +1389,7 @@ var ExtensionsByLanguage = map[string][]string{ "HAProxy": {".cfg"}, "HCL": {".hcl", ".nomad", ".tf", ".tfvars", ".workflow"}, "HLSL": {".hlsl", ".cginc", ".fx", ".fxh", ".hlsli"}, - "HTML": {".html", ".htm", ".html.hl", ".inc", ".st", ".xht", ".xhtml"}, - "HTML+Django": {".jinja", ".j2", ".jinja2"}, + "HTML": {".html", ".htm", ".html.hl", ".inc", ".xht", ".xhtml"}, "HTML+ECR": {".ecr"}, "HTML+EEX": {".eex", ".html.leex"}, "HTML+ERB": {".erb", ".erb.deface", ".rhtml"}, @@ -1424,6 +1432,7 @@ var ExtensionsByLanguage = map[string][]string{ "Java Server Pages": {".jsp"}, "JavaScript": {".js", "._js", ".bones", ".cjs", ".es", ".es6", ".frag", ".gs", ".jake", ".jsb", ".jscad", ".jsfl", ".jsm", ".jss", ".jsx", ".mjs", ".njs", ".pac", ".sjs", ".ssjs", ".xsjs", ".xsjslib"}, "JavaScript+ERB": {".js.erb"}, + "Jinja": {".jinja", ".j2", ".jinja2"}, "Jison": {".jison"}, "Jison Lex": {".jisonlex"}, "Jolie": {".ol", ".iol"}, @@ -1437,6 +1446,7 @@ var ExtensionsByLanguage = map[string][]string{ "KiCad Schematic": {".sch"}, "Kit": {".kit"}, "Kotlin": {".kt", ".ktm", ".kts"}, + "Kusto": {".csl"}, "LFE": {".lfe"}, "LLVM": {".ll"}, "LOLCODE": {".lol"}, @@ -1485,6 +1495,7 @@ var ExtensionsByLanguage = map[string][]string{ "Mercury": {".m", ".moo"}, "Metal": {".metal"}, "Microsoft Developer Studio Project": {".dsp"}, + "Microsoft Visual Studio Solution": {".sln"}, "MiniD": {".minid"}, "Mirah": {".druby", ".duby", ".mirah"}, "Modelica": {".mo"}, @@ -1616,7 +1627,7 @@ var ExtensionsByLanguage = map[string][]string{ "Roff": {".roff", ".1", ".1in", ".1m", ".1x", ".2", ".3", ".3in", ".3m", ".3p", ".3pm", ".3qt", ".3x", ".4", ".5", ".6", ".7", ".8", ".9", ".l", ".man", ".mdoc", ".me", ".ms", ".n", ".nr", ".rno", ".tmac"}, "Roff Manpage": {".1", ".1in", ".1m", ".1x", ".2", ".3", ".3in", ".3m", ".3p", ".3pm", ".3qt", ".3x", ".4", ".5", ".6", ".7", ".8", ".9", ".man", ".mdoc"}, "Rouge": {".rg"}, - "Ruby": {".rb", ".builder", ".eye", ".fcgi", ".gemspec", ".god", ".jbuilder", ".mspec", ".pluginspec", ".podspec", ".rabl", ".rake", ".rbi", ".rbuild", ".rbw", ".rbx", ".ru", ".ruby", ".spec", ".thor", ".watchr"}, + "Ruby": {".rb", ".builder", ".eye", ".fcgi", ".gemspec", ".god", ".jbuilder", ".mspec", ".pluginspec", ".podspec", ".prawn", ".rabl", ".rake", ".rbi", ".rbuild", ".rbw", ".rbx", ".ru", ".ruby", ".spec", ".thor", ".watchr"}, "Rust": {".rs", ".rs.in"}, "SAS": {".sas"}, "SCSS": {".scss"}, @@ -1657,6 +1668,7 @@ var ExtensionsByLanguage = map[string][]string{ "Standard ML": {".ml", ".fun", ".sig", ".sml"}, "Starlark": {".bzl"}, "Stata": {".do", ".ado", ".doh", ".ihlp", ".mata", ".matah", ".sthlp"}, + "StringTemplate": {".st"}, "Stylus": {".styl"}, "SubRip Text": {".srt"}, "SugarSS": {".sss"}, @@ -1717,7 +1729,7 @@ var ExtensionsByLanguage = map[string][]string{ "X PixMap": {".xpm", ".pm"}, "X10": {".x10"}, "XC": {".xc"}, - "XML": {".xml", ".adml", ".admx", ".ant", ".axml", ".builds", ".ccproj", ".ccxml", ".clixml", ".cproject", ".cscfg", ".csdef", ".csl", ".csproj", ".ct", ".depproj", ".dita", ".ditamap", ".ditaval", ".dll.config", ".dotsettings", ".filters", ".fsproj", ".fxml", ".glade", ".gml", ".gmx", ".grxml", ".gst", ".iml", ".ivy", ".jelly", ".jsproj", ".kml", ".launch", ".mdpolicy", ".mjml", ".mm", ".mod", ".mxml", ".natvis", ".ncl", ".ndproj", ".nproj", ".nuspec", ".odd", ".osm", ".pkgproj", ".pluginspec", ".proj", ".props", ".ps1xml", ".psc1", ".pt", ".rdf", ".res", ".resx", ".rs", ".rss", ".sch", ".scxml", ".sfproj", ".shproj", ".srdf", ".storyboard", ".sublime-snippet", ".targets", ".tml", ".ts", ".tsx", ".ui", ".urdf", ".ux", ".vbproj", ".vcxproj", ".vsixmanifest", ".vssettings", ".vstemplate", ".vxml", ".wixproj", ".workflow", ".wsdl", ".wsf", ".wxi", ".wxl", ".wxs", ".x3d", ".xacro", ".xaml", ".xib", ".xlf", ".xliff", ".xmi", ".xml.dist", ".xproj", ".xsd", ".xspec", ".xul", ".zcml"}, + "XML": {".xml", ".adml", ".admx", ".ant", ".axml", ".builds", ".ccproj", ".ccxml", ".clixml", ".cproject", ".cscfg", ".csdef", ".csl", ".csproj", ".ct", ".depproj", ".dita", ".ditamap", ".ditaval", ".dll.config", ".dotsettings", ".filters", ".fsproj", ".fxml", ".glade", ".gml", ".gmx", ".grxml", ".gst", ".iml", ".ivy", ".jelly", ".jsproj", ".kml", ".launch", ".mdpolicy", ".mjml", ".mm", ".mod", ".mxml", ".natvis", ".ncl", ".ndproj", ".nproj", ".nuspec", ".odd", ".osm", ".pkgproj", ".pluginspec", ".proj", ".props", ".ps1xml", ".psc1", ".pt", ".rdf", ".res", ".resx", ".rs", ".rss", ".sch", ".scxml", ".sfproj", ".shproj", ".srdf", ".storyboard", ".sublime-snippet", ".targets", ".tml", ".ts", ".tsx", ".ui", ".urdf", ".ux", ".vbproj", ".vcxproj", ".vsixmanifest", ".vssettings", ".vstemplate", ".vxml", ".wixproj", ".workflow", ".wsdl", ".wsf", ".wxi", ".wxl", ".wxs", ".x3d", ".xacro", ".xaml", ".xib", ".xlf", ".xliff", ".xmi", ".xml.dist", ".xmp", ".xproj", ".xsd", ".xspec", ".xul", ".zcml"}, "XML Property List": {".plist", ".sttheme", ".tmcommand", ".tmlanguage", ".tmpreferences", ".tmsnippet", ".tmtheme"}, "XPages": {".xsp-config", ".xsp.metadata"}, "XProc": {".xpl", ".xproc"}, @@ -1725,6 +1737,7 @@ var ExtensionsByLanguage = map[string][]string{ "XS": {".xs"}, "XSLT": {".xslt", ".xsl"}, "Xojo": {".xojo_code", ".xojo_menu", ".xojo_report", ".xojo_script", ".xojo_toolbar", ".xojo_window"}, + "Xonsh": {".xsh"}, "Xtend": {".xtend"}, "YAML": {".yml", ".mir", ".reek", ".rviz", ".sublime-syntax", ".syntax", ".yaml", ".yaml-tmlanguage", ".yaml.sed", ".yml.mysql"}, "YANG": {".yang"}, @@ -1743,6 +1756,7 @@ var ExtensionsByLanguage = map[string][]string{ "eC": {".ec", ".eh"}, "edn": {".edn"}, "fish": {".fish"}, + "jq": {".jq"}, "mIRC Script": {".mrc"}, "mcfunction": {".mcfunction"}, "mupad": {".mu"}, diff --git a/vendor/github.com/go-enry/go-enry/v2/data/filename.go b/vendor/github.com/go-enry/go-enry/v2/data/filename.go index a1b2c0b27a..76ab0fa96e 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/filename.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/filename.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data @@ -98,6 +98,7 @@ var LanguagesByFilename = map[string][]string{ "Brewfile": {"Ruby"}, "Buildfile": {"Ruby"}, "CMakeLists.txt": {"CMake"}, + "CODEOWNERS": {"CODEOWNERS"}, "COPYING": {"Text"}, "COPYING.regex": {"Text"}, "COPYRIGHT.regex": {"Text"}, @@ -116,7 +117,7 @@ var LanguagesByFilename = map[string][]string{ "Fastfile": {"Ruby"}, "GNUmakefile": {"Makefile"}, "Gemfile": {"Ruby"}, - "Gemfile.lock": {"Ruby"}, + "Gemfile.lock": {"Gemfile.lock"}, "Gopkg.lock": {"TOML"}, "Guardfile": {"Ruby"}, "INSTALL": {"Text"}, @@ -159,6 +160,7 @@ var LanguagesByFilename = map[string][]string{ "SConscript": {"Python"}, "SConstruct": {"Python"}, "Settings.StyleCop": {"XML"}, + "Singularity": {"Singularity"}, "Slakefile": {"LiveScript"}, "Snakefile": {"Python"}, "Snapfile": {"Ruby"}, @@ -174,6 +176,7 @@ var LanguagesByFilename = map[string][]string{ "_dir_colors": {"dircolors"}, "_dircolors": {"dircolors"}, "_emacs": {"Emacs Lisp"}, + "_redirects": {"Redirect Rules"}, "_vimrc": {"Vim script"}, "abbrev_defs": {"Emacs Lisp"}, "ack": {"Perl"}, @@ -257,6 +260,7 @@ var LanguagesByFilename = map[string][]string{ "rebar.config.lock": {"Erlang"}, "rebar.lock": {"Erlang"}, "riemann.config": {"Clojure"}, + "robots.txt": {"robots.txt"}, "ssh-config": {"SSH Config"}, "ssh_config": {"SSH Config"}, "sshconfig": {"SSH Config"}, diff --git a/vendor/github.com/go-enry/go-enry/v2/data/frequencies.go b/vendor/github.com/go-enry/go-enry/v2/data/frequencies.go index e9631ff71e..84339f8156 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/frequencies.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/frequencies.go @@ -1,521 +1,534 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data var LanguagesLogProbabilities = map[string]float64{ - "1C Enterprise": -6.005943, - "4D": -6.411408, - "ABAP": -7.797702, - "ABAP CDS": -7.104555, - "ABNF": -7.797702, - "AGS Script": -6.411408, - "AL": -6.699090, - "AMPL": -7.104555, - "API Blueprint": -6.699090, - "APL": -6.699090, - "ASL": -7.104555, - "ASN.1": -7.797702, - "ASP.NET": -6.411408, - "ATS": -5.600477, - "ActionScript": -6.411408, - "Adobe Font Metrics": -6.699090, - "Agda": -7.797702, - "Alloy": -6.699090, - "Alpine Abuild": -7.797702, - "Altium Designer": -6.411408, - "AngelScript": -7.104555, - "Ant Build System": -7.797702, - "ApacheConf": -6.411408, - "Apex": -6.005943, - "Apollo Guidance Computer": -7.797702, - "AppleScript": -5.851792, - "AsciiDoc": -6.699090, - "AspectJ": -7.104555, - "Assembly": -5.600477, - "Asymptote": -7.104555, - "AutoHotkey": -7.797702, - "Avro IDL": -7.797702, - "Awk": -7.797702, - "Ballerina": -6.188264, - "Beef": -6.699090, - "BibTeX": -7.104555, - "BitBake": -7.104555, - "Blade": -7.104555, - "BlitzBasic": -6.699090, - "BlitzMax": -7.797702, - "Bluespec": -7.104555, - "Boogie": -6.699090, - "Brainfuck": -6.188264, - "Brightscript": -7.797702, - "Browserslist": -7.104555, - "C": -3.754651, - "C#": -6.005943, - "C++": -3.885679, - "CLIPS": -7.104555, - "CMake": -5.851792, - "COBOL": -6.411408, - "CSON": -6.411408, - "CSS": -7.104555, - "CSV": -7.797702, - "CWeb": -7.104555, - "Cabal Config": -6.411408, - "CartoCSS": -7.797702, - "Ceylon": -7.797702, - "Chapel": -6.188264, - "Charity": -7.797702, - "Cirru": -5.158645, - "Clarion": -6.411408, - "Classic ASP": -7.104555, - "Clean": -5.600477, - "Click": -7.104555, - "Clojure": -5.600477, - "Closure Templates": -7.797702, - "Cloud Firestore Security Rules": -7.797702, - "CoNLL-U": -6.699090, - "CodeQL": -6.005943, - "CoffeeScript": -5.495117, - "ColdFusion": -7.797702, - "ColdFusion CFC": -7.104555, - "Common Lisp": -5.600477, - "Common Workflow Language": -7.797702, - "Component Pascal": -7.104555, - "Cool": -7.104555, - "Coq": -5.232753, - "Creole": -7.797702, - "Crystal": -6.699090, - "Csound": -6.699090, - "Csound Document": -6.699090, - "Csound Score": -6.699090, - "Cuda": -7.104555, - "Cycript": -7.797702, - "D": -5.600477, - "DIGITAL Command Language": -6.411408, - "DM": -7.797702, - "DNS Zone": -7.104555, - "DTrace": -6.699090, - "Dafny": -7.104555, - "Dart": -7.797702, - "DataWeave": -6.188264, - "Dhall": -7.104555, - "Diff": -7.797702, - "DirectX 3D File": -7.797702, - "Dockerfile": -7.797702, - "Dogescript": -7.797702, - "E": -5.851792, - "EBNF": -6.411408, - "ECL": -7.797702, - "ECLiPSe": -7.797702, - "EJS": -6.411408, - "EML": -7.797702, - "EQ": -6.699090, - "Eagle": -7.104555, - "Easybuild": -7.797702, - "EditorConfig": -7.797702, - "Edje Data Collection": -7.797702, - "Eiffel": -6.699090, - "Elixir": -7.797702, - "Elm": -6.699090, - "Emacs Lisp": -5.399807, - "EmberScript": -7.797702, - "Erlang": -5.158645, - "F#": -5.718260, - "FIGlet Font": -7.797702, - "FLUX": -6.411408, - "Fantom": -7.104555, - "Faust": -7.104555, - "Filebench WML": -7.797702, - "Filterscript": -7.104555, - "Formatted": -6.699090, - "Forth": -5.025113, - "Fortran": -6.188264, - "FreeMarker": -7.104555, - "Frege": -6.411408, - "Fstar": -7.104555, - "Futhark": -7.797702, - "G-code": -6.699090, - "GAML": -6.005943, - "GAMS": -7.797702, - "GAP": -5.600477, - "GCC Machine Description": -7.797702, - "GDB": -7.104555, - "GDScript": -6.411408, - "GEDCOM": -7.797702, - "GLSL": -5.025113, - "GN": -5.399807, - "Game Maker Language": -5.399807, - "Genie": -6.411408, - "Gerber Image": -4.907330, - "Gherkin": -7.104555, - "Git Attributes": -7.797702, - "Git Config": -6.699090, - "Glyph Bitmap Distribution Format": -7.797702, - "Gnuplot": -5.851792, - "Go": -6.411408, - "Golo": -4.501865, - "Gosu": -6.188264, - "Grace": -7.104555, - "Gradle": -7.104555, - "Grammatical Framework": -4.084130, - "Graph Modeling Language": -6.699090, - "GraphQL": -6.411408, - "Graphviz (DOT)": -7.104555, - "Groovy": -6.005943, - "Groovy Server Pages": -6.411408, - "HAProxy": -6.411408, - "HCL": -6.005943, - "HLSL": -6.188264, - "HTML": -5.851792, - "HTML+Django": -7.104555, - "HTML+ECR": -7.797702, - "HTML+EEX": -7.104555, - "HTML+ERB": -6.699090, - "HTML+Razor": -7.104555, - "HXML": -7.104555, - "Hack": -4.396505, - "Haml": -7.104555, - "Handlebars": -7.104555, - "Haskell": -6.188264, - "HiveQL": -7.104555, - "HolyC": -6.188264, - "Hy": -6.699090, - "HyPhy": -5.718260, - "IDL": -6.411408, - "IGOR Pro": -6.699090, - "INI": -5.718260, - "Idris": -7.797702, - "Ignore List": -4.964489, - "ImageJ Macro": -7.104555, - "Inform 7": -7.104555, - "Inno Setup": -7.104555, - "Ioke": -7.797702, - "Isabelle": -7.797702, - "Isabelle ROOT": -7.797702, - "J": -7.104555, - "JFlex": -7.104555, - "JSON": -4.578826, - "JSON with Comments": -4.662208, - "JSON5": -7.104555, - "JSONLD": -7.797702, - "JSONiq": -7.104555, - "Jasmin": -5.718260, - "Java": -5.495117, - "Java Properties": -7.104555, - "JavaScript": -4.108823, - "JavaScript+ERB": -7.797702, - "Jison": -6.699090, - "Jison Lex": -7.104555, - "Jolie": -6.188264, - "Jsonnet": -7.797702, - "Julia": -7.104555, - "Jupyter Notebook": -7.797702, - "KRL": -7.797702, - "Kaitai Struct": -7.104555, - "KiCad Layout": -5.025113, - "KiCad Legacy Layout": -7.797702, - "KiCad Schematic": -6.005943, - "Kit": -7.797702, - "Kotlin": -7.797702, - "LFE": -6.411408, - "LOLCODE": -7.797702, - "LSL": -7.104555, - "LTspice Symbol": -7.797702, - "LabVIEW": -5.495117, - "Lark": -6.699090, - "Lasso": -6.699090, - "Latte": -7.104555, - "Lean": -7.104555, - "Less": -7.797702, - "Lex": -7.104555, - "Limbo": -6.699090, - "Linker Script": -6.411408, - "Linux Kernel Module": -6.699090, - "Liquid": -7.104555, - "Literate Agda": -7.797702, - "Literate CoffeeScript": -7.104555, - "LiveScript": -7.797702, - "Logos": -6.188264, - "Logtalk": -7.797702, - "LookML": -6.699090, - "LoomScript": -7.104555, - "Lua": -5.851792, - "M": -4.430406, - "M4": -6.411408, - "M4Sugar": -6.699090, - "MATLAB": -4.134140, - "MAXScript": -6.188264, - "MLIR": -6.411408, - "MQL4": -6.699090, - "MQL5": -6.699090, - "MTML": -7.797702, - "MUF": -7.104555, - "Macaulay2": -7.797702, - "Makefile": -5.312795, - "Markdown": -5.495117, - "Marko": -6.699090, - "Mask": -7.797702, - "Mathematica": -5.312795, - "Maven POM": -7.797702, - "Max": -6.699090, - "MediaWiki": -7.104555, - "Mercury": -5.495117, - "Meson": -7.104555, - "Metal": -7.797702, - "Microsoft Developer Studio Project": -7.797702, - "Modelica": -5.312795, - "Modula-2": -7.797702, - "Modula-3": -6.188264, - "Module Management System": -6.188264, - "Monkey": -6.188264, - "Moocode": -6.699090, - "MoonScript": -7.797702, - "Motorola 68K Assembly": -6.005943, - "Muse": -7.104555, - "Mustache": -6.411408, - "NASL": -5.495117, - "NCL": -5.025113, - "NEON": -7.104555, - "NL": -7.104555, - "NPM Config": -7.797702, - "NSIS": -7.104555, - "NWScript": -6.005943, - "Nearley": -7.797702, - "Nemerle": -7.797702, - "NetLinx": -7.104555, - "NetLinx+ERB": -7.104555, - "NetLogo": -7.797702, - "NewLisp": -6.699090, - "Nextflow": -6.411408, - "Nginx": -6.699090, - "Nim": -6.188264, - "Nit": -4.619648, - "Nix": -7.797702, - "Nu": -7.104555, - "Nunjucks": -7.797702, - "OCaml": -5.495117, - "Object Data Instance Notation": -7.797702, - "ObjectScript": -7.797702, - "Objective-C": -4.706660, - "Objective-C++": -7.104555, - "Objective-J": -6.699090, - "Odin": -7.797702, - "Omgrofl": -7.797702, - "Opa": -7.104555, - "Opal": -7.797702, - "Open Policy Agent": -6.411408, - "OpenCL": -7.104555, - "OpenEdge ABL": -6.005943, - "OpenQASM": -7.797702, - "OpenRC runscript": -7.797702, - "OpenSCAD": -7.104555, - "OpenStep Property List": -7.104555, - "Org": -7.797702, - "Ox": -6.699090, - "Oxygene": -7.797702, - "Oz": -7.797702, - "P4": -7.104555, - "PHP": -4.853263, - "PLSQL": -5.718260, - "PLpgSQL": -5.851792, - "POV-Ray SDL": -5.312795, - "Pan": -4.907330, - "Papyrus": -6.699090, - "Parrot Assembly": -7.797702, - "Parrot Internal Representation": -7.797702, - "Pascal": -5.312795, - "Pawn": -6.005943, - "Pep8": -5.851792, - "Perl": -4.619648, - "Pic": -6.699090, - "Pickle": -6.411408, - "PicoLisp": -7.797702, - "PigLatin": -7.797702, - "Pike": -6.699090, - "PlantUML": -5.851792, - "Pod": -6.411408, - "Pod 6": -7.797702, - "PogoScript": -7.797702, - "Pony": -6.005943, - "PostCSS": -7.104555, - "PostScript": -6.699090, - "PowerBuilder": -6.005943, - "PowerShell": -6.411408, - "Prisma": -6.188264, - "Processing": -7.797702, - "Proguard": -6.699090, - "Prolog": -5.600477, - "Propeller Spin": -5.495117, - "Protocol Buffer": -7.797702, - "Public Key": -5.851792, - "Pug": -7.104555, - "Puppet": -6.188264, - "PureBasic": -7.104555, - "PureScript": -6.411408, - "Python": -4.662208, - "Q#": -7.104555, - "QML": -7.797702, - "QMake": -6.411408, - "Qt Script": -7.104555, - "Quake": -7.104555, - "R": -5.718260, - "RAML": -7.797702, - "RDoc": -7.797702, - "REXX": -6.411408, - "RMarkdown": -7.797702, - "RPC": -6.699090, - "RPM Spec": -6.699090, - "RUNOFF": -6.411408, - "Racket": -7.104555, - "Ragel": -6.699090, - "Raku": -4.619648, - "Rascal": -6.411408, - "ReScript": -7.797702, - "Readline Config": -7.797702, - "Reason": -6.005943, - "Rebol": -6.005943, - "Record Jar": -7.797702, - "Red": -7.104555, - "Regular Expression": -6.411408, - "Ren'Py": -7.797702, - "RenderScript": -7.104555, - "Rich Text Format": -7.104555, - "Ring": -6.411408, - "Riot": -7.104555, - "RobotFramework": -6.699090, - "Roff": -4.964489, - "Roff Manpage": -5.312795, - "Ruby": -4.271342, - "Rust": -6.699090, - "SAS": -6.699090, - "SCSS": -7.797702, - "SMT": -6.411408, - "SPARQL": -7.104555, - "SQF": -7.104555, - "SQL": -5.158645, - "SQLPL": -6.005943, - "SRecode Template": -7.797702, - "SSH Config": -6.005943, - "STON": -5.851792, - "SWIG": -6.699090, - "Sage": -7.797702, - "SaltStack": -6.005943, - "Sass": -7.797702, - "Scala": -5.851792, - "Scaml": -7.797702, - "Scheme": -6.411408, - "Scilab": -6.699090, - "ShaderLab": -6.699090, - "Shell": -3.905882, - "ShellSession": -6.699090, - "Shen": -6.699090, - "Sieve": -5.399807, - "Slash": -7.797702, - "Slice": -6.699090, - "Slim": -7.797702, - "SmPL": -7.797702, - "Smali": -5.851792, - "Smalltalk": -5.495117, - "SourcePawn": -7.104555, - "Squirrel": -7.797702, - "Stan": -6.699090, - "Standard ML": -6.188264, - "Starlark": -6.005943, - "Stata": -5.851792, - "Stylus": -7.797702, - "SubRip Text": -7.797702, - "SugarSS": -7.797702, - "SuperCollider": -6.188264, - "Svelte": -7.797702, - "Swift": -4.036502, - "SystemVerilog": -6.411408, - "TI Program": -6.411408, - "TLA": -7.104555, - "TOML": -6.411408, - "TSQL": -6.411408, - "TSV": -7.797702, - "TSX": -6.411408, - "TXL": -7.797702, - "Tcl": -6.411408, - "Tcsh": -7.797702, - "TeX": -5.851792, - "Tea": -7.797702, - "Terra": -6.699090, - "Texinfo": -7.797702, - "Text": -4.539605, - "Thrift": -7.797702, - "Turing": -6.411408, - "Turtle": -7.104555, - "Type Language": -7.104555, - "TypeScript": -6.699090, - "Unity3D Asset": -6.005943, - "Unix Assembly": -6.411408, - "Uno": -6.699090, - "UnrealScript": -7.104555, - "UrWeb": -7.104555, - "V": -5.600477, - "VBA": -6.411408, - "VBScript": -7.797702, - "VCL": -7.104555, - "VHDL": -7.797702, - "Verilog": -5.158645, - "Vim Help File": -7.797702, - "Vim Snippet": -7.104555, - "Vim script": -5.718260, - "Visual Basic .NET": -6.699090, - "Volt": -7.797702, - "Vue": -7.104555, - "Wavefront Material": -6.411408, - "Wavefront Object": -6.188264, - "Web Ontology Language": -7.797702, - "WebAssembly": -6.005943, - "WebIDL": -7.104555, - "WebVTT": -7.104555, - "Wget Config": -7.797702, - "Windows Registry Entries": -7.797702, - "Wollok": -7.104555, - "World of Warcraft Addon Data": -6.699090, - "X BitMap": -7.797702, - "X Font Directory Index": -6.411408, - "X PixMap": -7.104555, - "X10": -4.907330, - "XC": -7.797702, - "XCompose": -7.797702, - "XML": -3.593009, - "XML Property List": -5.851792, - "XPages": -7.104555, - "XProc": -7.797702, - "XQuery": -7.797702, - "XS": -7.797702, - "XSLT": -7.797702, - "Xojo": -6.005943, - "Xtend": -7.104555, - "YAML": -5.312795, - "YANG": -7.797702, - "YARA": -6.699090, - "YASnippet": -7.104555, - "Yacc": -7.797702, - "ZAP": -7.797702, - "ZIL": -7.797702, - "Zeek": -6.699090, - "ZenScript": -7.797702, - "Zephir": -7.104555, - "Zig": -6.699090, - "Zimpl": -7.797702, - "cURL Config": -7.797702, - "desktop": -7.797702, - "dircolors": -7.797702, - "eC": -7.797702, - "edn": -7.797702, - "fish": -6.699090, - "mIRC Script": -6.411408, - "mcfunction": -7.797702, - "nanorc": -6.699090, - "q": -7.104555, - "reStructuredText": -7.797702, - "sed": -7.797702, - "wdl": -6.699090, - "wisp": -7.797702, - "xBase": -6.699090, + "1C Enterprise": -6.014123, + "4D": -6.419588, + "ABAP": -7.805882, + "ABAP CDS": -7.112735, + "ABNF": -7.805882, + "AGS Script": -6.419588, + "AL": -6.707270, + "AMPL": -7.112735, + "API Blueprint": -6.707270, + "APL": -6.707270, + "ASL": -7.112735, + "ASN.1": -7.805882, + "ASP.NET": -6.419588, + "ATS": -5.608657, + "ActionScript": -6.419588, + "Adobe Font Metrics": -6.707270, + "Agda": -7.805882, + "Alloy": -6.707270, + "Alpine Abuild": -7.805882, + "Altium Designer": -6.419588, + "AngelScript": -7.112735, + "Ant Build System": -7.805882, + "ApacheConf": -6.419588, + "Apex": -6.014123, + "Apollo Guidance Computer": -7.805882, + "AppleScript": -5.859972, + "AsciiDoc": -6.707270, + "AspectJ": -7.112735, + "Assembly": -5.608657, + "Asymptote": -7.112735, + "AutoHotkey": -7.805882, + "Avro IDL": -7.805882, + "Awk": -7.805882, + "BASIC": -7.805882, + "Ballerina": -6.196444, + "Beef": -6.707270, + "BibTeX": -7.112735, + "Bicep": -7.112735, + "BitBake": -7.112735, + "Blade": -7.112735, + "BlitzBasic": -6.707270, + "BlitzMax": -7.805882, + "Bluespec": -7.112735, + "Boogie": -6.707270, + "Brainfuck": -6.196444, + "Brightscript": -7.805882, + "Browserslist": -7.112735, + "C": -3.762831, + "C#": -6.014123, + "C++": -3.893859, + "CLIPS": -7.112735, + "CMake": -5.859972, + "COBOL": -6.419588, + "CODEOWNERS": -7.805882, + "CSON": -6.419588, + "CSS": -7.112735, + "CSV": -7.805882, + "CWeb": -7.112735, + "Cabal Config": -6.419588, + "CartoCSS": -7.805882, + "Ceylon": -7.805882, + "Chapel": -6.196444, + "Charity": -7.805882, + "Cirru": -5.166825, + "Clarion": -6.419588, + "Classic ASP": -7.112735, + "Clean": -5.608657, + "Click": -7.112735, + "Clojure": -5.608657, + "Closure Templates": -7.805882, + "Cloud Firestore Security Rules": -7.805882, + "CoNLL-U": -6.707270, + "CodeQL": -6.014123, + "CoffeeScript": -5.503297, + "ColdFusion": -7.805882, + "ColdFusion CFC": -7.112735, + "Common Lisp": -5.608657, + "Common Workflow Language": -7.805882, + "Component Pascal": -7.112735, + "Cool": -7.112735, + "Coq": -5.240933, + "Creole": -7.805882, + "Crystal": -6.707270, + "Csound": -6.707270, + "Csound Document": -6.707270, + "Csound Score": -6.707270, + "Cuda": -7.112735, + "Cycript": -7.805882, + "D": -5.608657, + "DIGITAL Command Language": -6.419588, + "DM": -7.805882, + "DNS Zone": -7.112735, + "DTrace": -6.707270, + "Dafny": -7.112735, + "Dart": -7.805882, + "DataWeave": -6.196444, + "Dhall": -7.112735, + "Diff": -7.805882, + "DirectX 3D File": -7.805882, + "Dockerfile": -7.805882, + "Dogescript": -7.805882, + "E": -5.859972, + "EBNF": -6.419588, + "ECL": -7.805882, + "ECLiPSe": -7.805882, + "EJS": -6.419588, + "EML": -7.805882, + "EQ": -6.707270, + "Eagle": -7.112735, + "Easybuild": -7.805882, + "EditorConfig": -7.805882, + "Edje Data Collection": -7.805882, + "Eiffel": -6.707270, + "Elixir": -7.805882, + "Elm": -6.707270, + "Emacs Lisp": -5.407987, + "EmberScript": -7.805882, + "Erlang": -5.166825, + "F#": -5.726440, + "FIGlet Font": -7.805882, + "FLUX": -6.419588, + "Fantom": -7.112735, + "Faust": -7.112735, + "Filebench WML": -7.805882, + "Filterscript": -7.112735, + "Formatted": -6.707270, + "Forth": -5.033293, + "Fortran": -6.196444, + "FreeBasic": -6.707270, + "FreeMarker": -7.112735, + "Frege": -6.419588, + "Fstar": -7.112735, + "Futhark": -7.805882, + "G-code": -6.707270, + "GAML": -6.014123, + "GAMS": -7.805882, + "GAP": -5.608657, + "GCC Machine Description": -7.805882, + "GDB": -7.112735, + "GDScript": -6.419588, + "GEDCOM": -7.805882, + "GLSL": -5.033293, + "GN": -5.407987, + "Game Maker Language": -5.407987, + "Gemfile.lock": -7.805882, + "Genie": -6.419588, + "Gerber Image": -4.915510, + "Gherkin": -7.112735, + "Git Attributes": -7.805882, + "Git Config": -6.707270, + "Glyph Bitmap Distribution Format": -7.805882, + "Gnuplot": -5.859972, + "Go": -6.419588, + "Golo": -4.510045, + "Gosu": -6.196444, + "Grace": -7.112735, + "Gradle": -7.112735, + "Grammatical Framework": -4.092310, + "Graph Modeling Language": -6.707270, + "GraphQL": -6.419588, + "Graphviz (DOT)": -7.112735, + "Groovy": -6.014123, + "Groovy Server Pages": -6.419588, + "HAProxy": -6.419588, + "HCL": -6.014123, + "HLSL": -6.196444, + "HTML": -6.014123, + "HTML+ECR": -7.805882, + "HTML+EEX": -7.112735, + "HTML+ERB": -6.707270, + "HTML+Razor": -7.112735, + "HXML": -7.112735, + "Hack": -4.404685, + "Haml": -7.112735, + "Handlebars": -7.112735, + "Haskell": -6.196444, + "HiveQL": -7.112735, + "HolyC": -6.196444, + "Hy": -6.707270, + "HyPhy": -5.726440, + "IDL": -6.419588, + "IGOR Pro": -6.707270, + "INI": -5.726440, + "Idris": -7.805882, + "Ignore List": -4.972669, + "ImageJ Macro": -7.112735, + "Inform 7": -7.112735, + "Inno Setup": -7.112735, + "Ioke": -7.805882, + "Isabelle": -7.805882, + "Isabelle ROOT": -7.805882, + "J": -7.112735, + "JFlex": -7.112735, + "JSON": -4.587006, + "JSON with Comments": -4.670388, + "JSON5": -7.112735, + "JSONLD": -7.805882, + "JSONiq": -7.112735, + "Jasmin": -5.726440, + "Java": -5.503297, + "Java Properties": -7.112735, + "JavaScript": -4.117003, + "JavaScript+ERB": -7.805882, + "Jinja": -7.112735, + "Jison": -6.707270, + "Jison Lex": -7.112735, + "Jolie": -6.196444, + "Jsonnet": -7.805882, + "Julia": -7.112735, + "Jupyter Notebook": -7.805882, + "KRL": -7.805882, + "Kaitai Struct": -7.112735, + "KiCad Layout": -5.033293, + "KiCad Legacy Layout": -7.805882, + "KiCad Schematic": -6.014123, + "Kit": -7.805882, + "Kotlin": -7.805882, + "Kusto": -6.707270, + "LFE": -6.419588, + "LOLCODE": -7.805882, + "LSL": -7.112735, + "LTspice Symbol": -7.805882, + "LabVIEW": -5.503297, + "Lark": -6.707270, + "Lasso": -6.707270, + "Latte": -7.112735, + "Lean": -7.112735, + "Less": -7.805882, + "Lex": -7.112735, + "Limbo": -6.707270, + "Linker Script": -6.419588, + "Linux Kernel Module": -6.707270, + "Liquid": -7.112735, + "Literate Agda": -7.805882, + "Literate CoffeeScript": -7.112735, + "LiveScript": -7.805882, + "Logos": -6.196444, + "Logtalk": -7.805882, + "LookML": -6.707270, + "LoomScript": -7.112735, + "Lua": -5.859972, + "M": -4.438586, + "M4": -6.419588, + "M4Sugar": -6.707270, + "MATLAB": -4.142320, + "MAXScript": -6.196444, + "MLIR": -6.419588, + "MQL4": -6.707270, + "MQL5": -6.707270, + "MTML": -7.805882, + "MUF": -7.112735, + "Macaulay2": -7.805882, + "Makefile": -5.320975, + "Markdown": -5.503297, + "Marko": -6.707270, + "Mask": -7.805882, + "Mathematica": -5.320975, + "Maven POM": -7.805882, + "Max": -6.707270, + "MediaWiki": -7.112735, + "Mercury": -5.503297, + "Meson": -7.112735, + "Metal": -7.805882, + "Microsoft Developer Studio Project": -7.805882, + "Microsoft Visual Studio Solution": -7.805882, + "Modelica": -5.320975, + "Modula-2": -7.805882, + "Modula-3": -6.196444, + "Module Management System": -6.196444, + "Monkey": -6.196444, + "Moocode": -6.707270, + "MoonScript": -7.805882, + "Motorola 68K Assembly": -6.014123, + "Muse": -7.112735, + "Mustache": -6.419588, + "NASL": -5.503297, + "NCL": -5.033293, + "NEON": -7.112735, + "NL": -7.112735, + "NPM Config": -7.805882, + "NSIS": -7.112735, + "NWScript": -6.014123, + "Nearley": -7.805882, + "Nemerle": -7.805882, + "NetLinx": -7.112735, + "NetLinx+ERB": -7.112735, + "NetLogo": -7.805882, + "NewLisp": -6.707270, + "Nextflow": -6.419588, + "Nginx": -6.707270, + "Nim": -6.014123, + "Nit": -4.627828, + "Nix": -7.805882, + "Nu": -7.112735, + "Nunjucks": -7.805882, + "OCaml": -5.503297, + "Object Data Instance Notation": -7.805882, + "ObjectScript": -7.805882, + "Objective-C": -4.714840, + "Objective-C++": -7.112735, + "Objective-J": -6.707270, + "Odin": -7.805882, + "Omgrofl": -7.805882, + "Opa": -7.112735, + "Opal": -7.805882, + "Open Policy Agent": -6.419588, + "OpenCL": -7.112735, + "OpenEdge ABL": -6.014123, + "OpenQASM": -7.805882, + "OpenRC runscript": -7.805882, + "OpenSCAD": -7.112735, + "OpenStep Property List": -7.112735, + "Org": -7.805882, + "Ox": -6.707270, + "Oxygene": -7.805882, + "Oz": -7.805882, + "P4": -7.112735, + "PHP": -4.861443, + "PLSQL": -5.726440, + "PLpgSQL": -5.859972, + "POV-Ray SDL": -5.320975, + "Pan": -4.915510, + "Papyrus": -6.707270, + "Parrot Assembly": -7.805882, + "Parrot Internal Representation": -7.805882, + "Pascal": -5.320975, + "Pawn": -6.014123, + "Pep8": -5.859972, + "Perl": -4.627828, + "Pic": -6.707270, + "Pickle": -6.419588, + "PicoLisp": -7.805882, + "PigLatin": -7.805882, + "Pike": -6.707270, + "PlantUML": -5.859972, + "Pod": -6.419588, + "Pod 6": -7.805882, + "PogoScript": -7.805882, + "Pony": -6.014123, + "PostCSS": -7.112735, + "PostScript": -6.707270, + "PowerBuilder": -6.014123, + "PowerShell": -6.419588, + "Prisma": -6.196444, + "Processing": -7.805882, + "Proguard": -6.707270, + "Prolog": -5.608657, + "Propeller Spin": -5.503297, + "Protocol Buffer": -7.805882, + "Public Key": -5.859972, + "Pug": -7.112735, + "Puppet": -6.196444, + "PureBasic": -7.112735, + "PureScript": -6.419588, + "Python": -4.670388, + "Q#": -7.112735, + "QML": -7.805882, + "QMake": -6.419588, + "Qt Script": -7.112735, + "Quake": -7.112735, + "R": -5.726440, + "RAML": -7.805882, + "RDoc": -7.805882, + "REXX": -6.419588, + "RMarkdown": -7.805882, + "RPC": -6.707270, + "RPM Spec": -6.707270, + "RUNOFF": -6.419588, + "Racket": -7.112735, + "Ragel": -6.707270, + "Raku": -4.627828, + "Rascal": -6.419588, + "ReScript": -7.805882, + "Readline Config": -7.805882, + "Reason": -6.014123, + "Rebol": -6.014123, + "Record Jar": -7.805882, + "Red": -7.112735, + "Redirect Rules": -7.805882, + "Regular Expression": -6.419588, + "Ren'Py": -7.805882, + "RenderScript": -7.112735, + "Rich Text Format": -7.112735, + "Ring": -6.419588, + "Riot": -7.112735, + "RobotFramework": -6.707270, + "Roff": -4.972669, + "Roff Manpage": -5.320975, + "Ruby": -4.279522, + "Rust": -6.707270, + "SAS": -6.707270, + "SCSS": -7.805882, + "SMT": -6.419588, + "SPARQL": -7.112735, + "SQF": -7.112735, + "SQL": -5.166825, + "SQLPL": -6.014123, + "SRecode Template": -7.805882, + "SSH Config": -6.014123, + "STON": -5.859972, + "SWIG": -6.707270, + "Sage": -7.805882, + "SaltStack": -6.014123, + "Sass": -7.805882, + "Scala": -5.859972, + "Scaml": -7.805882, + "Scheme": -6.419588, + "Scilab": -6.707270, + "ShaderLab": -6.707270, + "Shell": -3.914062, + "ShellSession": -6.707270, + "Shen": -6.707270, + "Sieve": -5.407987, + "Singularity": -7.805882, + "Slash": -7.805882, + "Slice": -6.707270, + "Slim": -7.805882, + "SmPL": -7.805882, + "Smali": -5.859972, + "Smalltalk": -5.503297, + "SourcePawn": -7.112735, + "Squirrel": -7.805882, + "Stan": -6.707270, + "Standard ML": -6.196444, + "Starlark": -6.014123, + "Stata": -5.859972, + "StringTemplate": -7.805882, + "Stylus": -7.805882, + "SubRip Text": -7.805882, + "SugarSS": -7.805882, + "SuperCollider": -6.196444, + "Svelte": -7.805882, + "Swift": -4.044682, + "SystemVerilog": -6.419588, + "TI Program": -6.419588, + "TLA": -7.112735, + "TOML": -6.419588, + "TSQL": -6.419588, + "TSV": -7.805882, + "TSX": -6.419588, + "TXL": -7.805882, + "Tcl": -6.419588, + "Tcsh": -7.805882, + "TeX": -5.859972, + "Tea": -7.805882, + "Terra": -6.707270, + "Texinfo": -7.805882, + "Text": -4.547786, + "Thrift": -7.805882, + "Turing": -6.419588, + "Turtle": -7.112735, + "Type Language": -7.112735, + "TypeScript": -6.707270, + "Unity3D Asset": -6.014123, + "Unix Assembly": -6.419588, + "Uno": -6.707270, + "UnrealScript": -7.112735, + "UrWeb": -7.112735, + "V": -5.608657, + "VBA": -6.419588, + "VBScript": -7.805882, + "VCL": -7.112735, + "VHDL": -7.805882, + "Verilog": -5.166825, + "Vim Help File": -7.805882, + "Vim Snippet": -7.112735, + "Vim script": -5.726440, + "Visual Basic .NET": -6.707270, + "Volt": -7.805882, + "Vue": -7.112735, + "Wavefront Material": -6.419588, + "Wavefront Object": -6.196444, + "Web Ontology Language": -7.805882, + "WebAssembly": -6.014123, + "WebIDL": -7.112735, + "WebVTT": -7.112735, + "Wget Config": -7.805882, + "Windows Registry Entries": -7.805882, + "Wollok": -7.112735, + "World of Warcraft Addon Data": -6.707270, + "X BitMap": -7.805882, + "X Font Directory Index": -6.419588, + "X PixMap": -7.112735, + "X10": -4.915510, + "XC": -7.805882, + "XCompose": -7.805882, + "XML": -3.586374, + "XML Property List": -5.859972, + "XPages": -7.112735, + "XProc": -7.805882, + "XQuery": -7.805882, + "XS": -7.805882, + "XSLT": -7.805882, + "Xojo": -6.014123, + "Xonsh": -7.805882, + "Xtend": -7.112735, + "YAML": -5.320975, + "YANG": -7.805882, + "YARA": -6.707270, + "YASnippet": -7.112735, + "Yacc": -7.805882, + "ZAP": -7.805882, + "ZIL": -7.805882, + "Zeek": -6.707270, + "ZenScript": -7.805882, + "Zephir": -7.112735, + "Zig": -6.707270, + "Zimpl": -7.805882, + "cURL Config": -7.805882, + "desktop": -7.805882, + "dircolors": -7.805882, + "eC": -7.805882, + "edn": -7.805882, + "fish": -6.707270, + "jq": -7.112735, + "mIRC Script": -6.419588, + "mcfunction": -7.805882, + "nanorc": -6.707270, + "q": -7.112735, + "reStructuredText": -7.805882, + "robots.txt": -7.805882, + "sed": -7.805882, + "wdl": -6.707270, + "wisp": -7.805882, + "xBase": -6.707270, } var TokensLogProbabilities = map[string]map[string]float64{ @@ -8956,6 +8969,59 @@ var TokensLogProbabilities = map[string]map[string]float64{ "}": -2.950612, "~": -4.174387, }, + "BASIC": map[string]float64{ + "$": -4.025352, + "(": -2.726069, + ")": -2.726069, + "*": -2.926739, + "+": -2.639057, + ",": -5.123964, + "-": -2.821379, + "/": -4.025352, + "//github.com/telnet": -5.123964, + ":": -5.123964, + ";": -4.025352, + "<": -5.123964, + "=": -2.351375, + ">": -5.123964, + "ANSI": -5.123964, + "BASIC": -5.123964, + "CHR": -4.430817, + "CLS": -5.123964, + "Colors": -5.123964, + "FOR": -4.430817, + "GOTO": -4.430817, + "HEIGHT": -4.430817, + "IF": -4.430817, + "IMC": -4.430817, + "IMF": -3.044522, + "INT": -5.123964, + "K": -3.514526, + "LOCATE": -5.123964, + "M": -4.430817, + "MAXIM": -4.430817, + "MAXK": -4.025352, + "MAXRE": -4.430817, + "MINIM": -4.025352, + "MINRE": -4.025352, + "Mandelbrot": -5.123964, + "NEXT": -4.430817, + "November": -5.123964, + "PRINT": -4.025352, + "REC": -4.430817, + "REF": -3.044522, + "REM": -4.025352, + "STR": -5.123964, + "Set": -5.123964, + "THEN": -4.430817, + "TO": -4.430817, + "WIDTH": -4.430817, + "X": -3.737670, + "Y": -3.737670, + "https": -5.123964, + "in": -5.123964, + "with": -5.123964, + }, "Ballerina": map[string]float64{ "!": -6.152733, "(": -2.785437, @@ -9905,6 +9971,91 @@ var TokensLogProbabilities = map[string]map[string]float64{ "{": -2.260025, "}": -2.260025, }, + "Bicep": map[string]float64{ + "(": -3.413032, + ")": -3.413032, + ",": -5.358942, + ".id": -6.052089, + ".location": -5.358942, + ":": -1.708284, + "=": -2.833213, + "@allowed": -6.052089, + "@description": -4.665795, + "@maxLength": -6.052089, + "@minLength": -6.052089, + "@secure": -6.052089, + "Id": -5.358942, + "Name": -3.854865, + "[": -4.260330, + "]": -4.260330, + "access": -6.052089, + "acr": -6.052089, + "acr.properties.loginServer": -6.052089, + "acrAdminUserEnabled": -5.358942, + "acrLoginServer": -6.052089, + "acrName": -5.358942, + "acrSku": -5.358942, + "addressPrefix": -5.358942, + "addressPrefixes": -6.052089, + "addressSpace": -6.052089, + "adminPassword": -4.953477, + "adminUserEnabled": -6.052089, + "adminUsername": -4.953477, + "bool": -6.052089, + "concat": -5.358942, + "destinationAddressPrefix": -6.052089, + "destinationPortRange": -6.052089, + "diagStorageAccountName": -5.358942, + "diagsAccount": -6.052089, + "diagsAccount.properties.primaryEndpoints.blob": -6.052089, + "diagsStorageUri": -6.052089, + "direction": -6.052089, + "false": -6.052089, + "id": -3.972648, + "ipConfigurations": -5.358942, + "kind": -6.052089, + "location": -3.161717, + "module": -6.052089, + "name": -3.279500, + "networkSecurityGroup": -5.358942, + "networkSecurityGroupName": -4.665795, + "nic": -3.749504, + "nsg": -4.953477, + "nsg.id": -6.052089, + "output": -5.358942, + "param": -3.854865, + "params": -6.052089, + "pip": -6.052089, + "pip.id": -6.052089, + "pip.properties.ipAddress": -6.052089, + "priority": -6.052089, + "privateIPAllocationMethod": -5.358942, + "properties": -3.567183, + "protocol": -6.052089, + "publicIPAddress": -6.052089, + "publicIPAddressName": -5.358942, + "publicIPAllocationMethod": -6.052089, + "publicIp": -6.052089, + "resource": -3.972648, + "resourceGroup": -4.953477, + "securityRules": -6.052089, + "sku": -5.358942, + "sourceAddressPrefix": -6.052089, + "sourcePortRange": -6.052089, + "storageAccountType": -5.358942, + "string": -3.749504, + "subnet": -4.106179, + "subnets": -6.052089, + "uniqueString": -6.052089, + "var": -3.854865, + "virtualMachineName": -6.052089, + "virtualMachineSize": -4.953477, + "virtualNetworkName": -5.358942, + "vmMod": -6.052089, + "vnet": -6.052089, + "{": -2.496741, + "}": -2.496741, + }, "BitBake": map[string]float64{ "$": -2.926739, "(": -4.025352, @@ -20264,6 +20415,22 @@ var TokensLogProbabilities = map[string]map[string]float64{ "run.": -4.499810, "stop": -4.499810, }, + "CODEOWNERS": map[string]float64{ + "#": -4.151040, + "*": -4.844187, + "-": -0.125688, + "/csharp/**": -4.844187, + "/machine": -4.844187, + "/windowsforms/**": -4.844187, + "/wpf/**": -4.844187, + "@BillWagner": -4.844187, + "@adegeo": -4.151040, + "@dotnet/docs": -4.844187, + "@dotnet/dotnet": -4.844187, + "@luisquintanilla": -4.844187, + "learning/**": -4.844187, + "winforms": -4.844187, + }, "CSON": map[string]float64{ "$": -3.984860, "(": -4.795791, @@ -38539,6 +38706,246 @@ var TokensLogProbabilities = map[string]map[string]float64{ "twomu/": -5.429346, "x": -3.349904, }, + "FreeBasic": map[string]float64{ + "#define": -5.453182, + "#include": -5.230039, + "&": -6.839476, + "(": -2.362140, + ")": -2.362140, + "*": -5.740864, + "**********************************************************************************************": -6.146329, + "+": -5.047717, + ",": -2.470029, + "-": -4.536891, + ".byte": -5.740864, + "/": -5.740864, + ":": -4.200419, + ";": -5.740864, + "<": -5.230039, + "=": -2.185516, + ">": -5.230039, + "@": -6.839476, + "@WndProc": -6.839476, + "@dvi": -6.839476, + "@dvi.dwMajorVersion": -6.839476, + "@msg": -5.740864, + "@wc": -6.839476, + "And": -6.839476, + "Any": -6.839476, + "AppendMenu": -5.453182, + "As": -5.047717, + "Asm": -5.740864, + "Breakpoint": -6.146329, + "ByVal": -6.146329, + "COLOR_BTNFACE": -6.839476, + "CS_HREDRAW": -6.839476, + "CS_VREDRAW": -6.839476, + "Cast": -6.839476, + "Catch": -6.839476, + "Catch_Any": -4.642252, + "Command": -6.839476, + "CreatePopupMenu": -6.839476, + "CreateWindowEx": -6.839476, + "DIVISION_BY_ZERO": -5.453182, + "Dim": -5.740864, + "DispatchMessage": -6.839476, + "Do": -6.146329, + "Double": -6.146329, + "EXCEPTION_CONTINUE_EXECUTION": -6.839476, + "EXCEPTION_CONTINUE_SEARCH": -6.839476, + "Else": -6.146329, + "ElseIf": -6.839476, + "End": -4.642252, + "EndIf": -6.839476, + "EndTry": -4.642252, + "Exit": -6.839476, + "ExitDo": -6.146329, + "FB": -6.839476, + "FORCED_TO_ZERO": -6.839476, + "Finally": -4.642252, + "For": -6.839476, + "FreeLibrary": -6.146329, + "Function": -5.740864, + "GenPlasma": -6.839476, + "GetMessage": -6.839476, + "GetModuleHandle": -6.839476, + "GetProcAddress": -6.839476, + "GetStockObject": -6.839476, + "GetSystemMetrics": -6.146329, + "Goto": -6.839476, + "Grad": -6.839476, + "IDC_ARROW": -6.839476, + "INT": -6.146329, + "If": -3.949105, + "Inkey": -6.839476, + "Int": -5.453182, + "Integer": -5.740864, + "It": -6.839476, + "LoadCursor": -6.839476, + "LoadLibrary": -6.839476, + "Locate": -6.839476, + "Long": -6.839476, + "Loop": -6.146329, + "MB_ICONERROR": -6.839476, + "MB_OK": -6.839476, + "MF_STRING": -5.453182, + "MessageBox": -6.839476, + "MultiKey": -6.146329, + "NOTHING_EX": -6.146329, + "NULL": -6.146329, + "Next": -6.839476, + "Or": -6.146329, + "Print": -3.661423, + "Ptr": -6.839476, + "RGB": -6.839476, + "Rainbow": -6.146329, + "Randomize": -6.839476, + "RegisterClassEx": -6.839476, + "Return": -5.740864, + "Rnd": -5.453182, + "Rnd*x": -6.839476, + "SC_SPACE": -6.839476, + "SM_CXSCREEN": -6.839476, + "SM_CYSCREEN": -6.839476, + "SW_NORMAL": -6.839476, + "ScreenRes": -6.839476, + "SetMenu": -6.839476, + "Show_Catch": -4.536891, + "SizeOf": -6.839476, + "Sleep": -6.146329, + "Str": -6.146329, + "Sub": -5.230039, + "THROW_MSG": -5.740864, + "The": -6.839476, + "Then": -4.131426, + "Timer": -6.839476, + "To": -6.839476, + "TranslateMessage": -6.839476, + "Try": -4.760035, + "Using": -6.839476, + "VERBOSE": -6.839476, + "WNDCLASSEX": -6.839476, + "WS_OVERLAPPEDWINDOW": -6.839476, + "WS_VISIBLE": -6.839476, + "Wend": -6.146329, + "While": -6.146329, + "WinMain": -6.839476, + "_": -6.146329, + "a": -5.047717, + "abort": -6.839476, + "add": -6.146329, + "add_div": -5.453182, + "an": -6.839476, + "and": -6.839476, + "any": -6.146329, + "as": -6.839476, + "b": -4.200419, + "badd": -5.230039, + "be": -6.839476, + "been": -6.839476, + "before": -6.839476, + "butterfly": -6.839476, + "bx": -5.230039, + "can": -6.146329, + "catch": -6.839476, + "code": -6.839476, + "cooler": -6.839476, + "crashs": -6.839476, + "create": -6.146329, + "d": -6.839476, + "define": -6.839476, + "difficult": -6.839476, + "div": -5.453182, + "dvi.dwMajorVersion": -6.839476, + "dvi.dwMinorVersion": -6.839476, + "e": -3.843744, + "e_exception": -6.839476, + "e_exceptions": -6.146329, + "each": -6.839476, + "foo": -6.839476, + "func": -6.839476, + "function": -6.839476, + "g": -4.760035, + "gadd": -5.230039, + "get": -6.839476, + "gx": -5.230039, + "h": -6.839476, + "hDll": -5.740864, + "hIconLib": -6.839476, + "hInstance": -6.146329, + "hMenu": -6.839476, + "hPop": -6.146329, + "hPopup": -5.740864, + "hWnd": -6.839476, + "i": -5.453182, + "icon": -6.839476, + "iflag": -6.839476, + "instantaneously": -6.839476, + "instead": -6.839476, + "is": -6.146329, + "it": -5.740864, + "item": -6.839476, + "iteration": -6.839476, + "k": -6.146329, + "lines": -6.839476, + "looks": -6.839476, + "main": -5.230039, + "malloc": -6.839476, + "menu": -5.453182, + "messagebox": -6.839476, + "more": -6.839476, + "msg.wParam": -6.839476, + "not": -6.146329, + "number": -6.839476, + "one": -6.839476, + "only": -6.839476, + "other": -6.839476, + "over": -6.839476, + "pGetVersion": -6.146329, + "plasma": -6.839476, + "print": -6.146329, + "probably": -6.839476, + "protected": -6.839476, + "r": -4.760035, + "radd": -5.230039, + "raise": -6.839476, + "really": -6.146329, + "reason": -6.839476, + "return": -6.146329, + "ri": -5.230039, + "rx": -5.230039, + "segfault": -6.839476, + "signal": -6.839476, + "sleep": -6.839476, + "stack_overflow": -6.839476, + "status": -6.839476, + "sub": -6.839476, + "test": -5.230039, + "that": -6.146329, + "the": -5.453182, + "these": -6.839476, + "this": -5.740864, + "throw": -6.839476, + "to": -5.740864, + "trapped": -6.839476, + "trapped....": -6.839476, + "types": -6.839476, + "uncomment": -6.839476, + "various": -6.839476, + "wc.cbSize": -6.839476, + "wc.hCursor": -6.839476, + "wc.hIcon": -6.839476, + "wc.hIconSm": -6.839476, + "wc.hInstance": -6.839476, + "wc.hbrBackground": -6.839476, + "wc.lpfnWndProc": -6.839476, + "wc.lpszClassName": -6.146329, + "wc.style": -6.839476, + "will": -6.839476, + "with": -6.839476, + "x": -6.839476, + "\ufeff": -6.146329, + }, "FreeMarker": map[string]float64{ "$": -3.339322, ".now": -4.948760, @@ -46080,6 +46487,286 @@ var TokensLogProbabilities = map[string]map[string]float64{ "||": -7.272259, "}": -3.672211, }, + "Gemfile.lock": map[string]float64{ + "!": -6.237999, + "(": -1.749363, + ")": -1.749363, + ",": -3.986707, + "-": -2.427640, + ".": -8.029759, + "//github.com/QueueClassic/queue_classic.git": -8.029759, + "//github.com/brianmario/mysql": -8.029759, + "//github.com/matthewd/websocket": -8.029759, + "//rubygems.org/": -8.029759, + ":": -5.139387, + "<": -4.392172, + "=": -2.831261, + ">": -2.398547, + "BUNDLED": -8.029759, + "DEPENDENCIES": -8.029759, + "GEM": -8.029759, + "GIT": -6.931146, + "PATH": -8.029759, + "PLATFORMS": -8.029759, + "WITH": -8.029759, + "_": -7.336611, + "_keywords": -6.931146, + "a": -8.029759, + "actioncable": -7.336611, + "actionmailbox": -7.336611, + "actionmailer": -7.336611, + "actionpack": -5.832534, + "actiontext": -7.336611, + "actionview": -6.643464, + "activejob": -6.420321, + "activemodel": -6.931146, + "activerecord": -5.196545, + "activestorage": -6.643464, + "activesupport": -5.034026, + "ad": -8.029759, + "adapter": -5.727173, + "addressable": -6.083848, + "alpha": -4.022425, + "amq": -7.336611, + "ansi": -7.336611, + "apis": -6.083848, + "ast": -6.420321, + "aws": -5.034026, + "azure": -6.643464, + "b": -6.237999, + "backburner": -7.336611, + "bcrypt": -6.931146, + "beaneater": -7.336611, + "benchmark": -7.336611, + "beta.": -8.029759, + "bisect": -7.336611, + "blade": -6.643464, + "blob": -7.336611, + "bootsnap": -6.931146, + "branch": -8.029759, + "builder": -6.931146, + "bundler": -8.029759, + "bunny": -7.336611, + "byebug": -7.336611, + "c": -6.643464, + "c_validators": -7.336611, + "cache": -7.336611, + "capybara": -7.336611, + "childprocess": -7.336611, + "client": -6.931146, + "close": -8.029759, + "cloud": -5.950317, + "coffee": -6.420321, + "common": -7.336611, + "concurrent": -5.950317, + "connection_pool": -6.643464, + "cookiejar": -6.931146, + "core": -5.832534, + "crack": -7.336611, + "crass": -7.336611, + "crc": -7.336611, + "curses": -7.336611, + "d": -8.029759, + "da": -8.029759, + "daemons": -7.336611, + "dalli": -7.336611, + "dante": -7.336611, + "darwin": -7.336611, + "data": -7.336611, + "dc": -8.029759, + "ddd": -8.029759, + "declarative": -6.643464, + "delayed_job": -6.931146, + "delayed_job_active_record": -7.336611, + "df": -8.029759, + "digest": -7.336611, + "display_width": -7.336611, + "dom": -6.643464, + "driver": -6.420321, + "e": -6.420321, + "ead": -8.029759, + "ee": -8.029759, + "em": -6.643464, + "env": -7.336611, + "errors": -7.336611, + "erubi": -7.336611, + "et": -7.336611, + "event_emitter": -7.336611, + "eventmachine": -6.083848, + "eventstream": -6.931146, + "execjs": -6.931146, + "export": -7.336611, + "extensions": -6.931146, + "faraday": -5.950317, + "faraday_middleware": -7.336611, + "faye": -6.643464, + "ffi": -5.950317, + "fsevent": -7.336611, + "fugit": -7.336611, + "git": -8.029759, + "globalid": -7.336611, + "google": -5.321708, + "googleauth": -6.931146, + "hashdiff": -7.336611, + "hiredis": -6.931146, + "html": -6.931146, + "http": -6.643464, + "http_parser.rb": -7.336611, + "httpclient": -7.336611, + "https": -6.643464, + "i": -7.336611, + "iamcredentials_v": -7.336611, + "image_processing": -7.336611, + "inotify": -7.336611, + "ips": -7.336611, + "java": -5.321708, + "jdbc": -5.727173, + "jdbcmysql": -7.336611, + "jdbcpostgresql": -7.336611, + "jdbcsqlite": -7.336611, + "jmespath": -7.336611, + "json": -6.643464, + "jwt": -6.931146, + "kindlerb": -7.336611, + "kms": -7.336611, + "libxml": -7.336611, + "listen": -7.336611, + "loofah": -7.336611, + "mail": -6.931146, + "marcel": -7.336611, + "memoist": -7.336611, + "method_source": -7.336611, + "mimemagic": -6.931146, + "mingw": -5.631863, + "mini_magick": -7.336611, + "mini_mime": -6.420321, + "mini_portile": -7.336611, + "minitest": -5.464809, + "mono_logger": -6.931146, + "msgpack": -6.237999, + "mswin": -7.336611, + "multi_json": -6.420321, + "multipart": -7.336611, + "mustache": -7.336611, + "mustermann": -7.336611, + "mysql": -6.643464, + "n": -7.336611, + "namespace": -6.931146, + "net": -7.336611, + "net_http": -7.336611, + "nio": -6.420321, + "nokogiri": -5.257170, + "option": -7.336611, + "orbi": -7.336611, + "os": -7.336611, + "packaging": -7.336611, + "parallel": -7.336611, + "parser": -6.931146, + "partitions": -7.336611, + "path_expander": -7.336611, + "performance": -7.336611, + "persistent": -7.336611, + "pg": -6.420321, + "post": -7.336611, + "postgres": -7.336611, + "pre.alpha": -8.029759, + "progressbar": -6.931146, + "protection": -7.336611, + "protocol": -7.336611, + "proxy": -7.336611, + "psych": -7.336611, + "public_suffix": -7.336611, + "puma": -6.931146, + "que": -7.336611, + "queue_classic": -7.336611, + "qunit": -7.336611, + "qunit_adapter": -7.336611, + "r": -6.420321, + "raabro": -7.336611, + "racc": -6.083848, + "race": -8.029759, + "rack": -4.894264, + "rails": -5.139387, + "railties": -6.643464, + "rainbow": -7.336611, + "rake": -6.420321, + "rb": -6.643464, + "rc": -6.931146, + "rdoc": -7.336611, + "redcarpet": -7.336611, + "redis": -5.950317, + "regexp_parser": -6.931146, + "remote": -6.420321, + "reporters": -7.336611, + "representable": -7.336611, + "request": -7.336611, + "resque": -6.420321, + "retriable": -7.336611, + "retry": -7.336611, + "revision": -6.931146, + "rexml": -6.237999, + "rouge": -7.336611, + "rubocop": -5.390701, + "ruby": -5.085320, + "rubyzip": -6.931146, + "rufus": -7.336611, + "s": -7.336611, + "sanitizer": -6.931146, + "sass": -7.336611, + "sassc": -6.420321, + "scheduler": -6.643464, + "script": -6.420321, + "sdk": -5.727173, + "sdoc": -7.336611, + "selenium": -6.237999, + "semantic_range": -7.336611, + "sequel": -7.336611, + "server": -7.336611, + "serverengine": -7.336611, + "sidekiq": -7.336611, + "sigdump": -7.336611, + "signet": -6.931146, + "sigv": -6.420321, + "simple": -7.336611, + "simple.git": -8.029759, + "sinatra": -7.336611, + "sneakers": -7.336611, + "sns": -7.336611, + "socksify": -7.336611, + "source": -6.420321, + "specs": -6.420321, + "sprockets": -5.832534, + "sqlite": -6.643464, + "stackprof": -7.336611, + "storage": -6.237999, + "storage_v": -7.336611, + "sucker_punch": -7.336611, + "test": -6.931146, + "testing": -6.643464, + "thin": -7.336611, + "thor": -6.420321, + "tilt": -6.931146, + "turbolinks": -6.643464, + "tzinfo": -6.237999, + "uber": -7.336611, + "uglifier": -7.336611, + "unicode": -7.336611, + "useragent": -7.336611, + "vegas": -7.336611, + "vips": -7.336611, + "w": -7.336611, + "wdm": -7.336611, + "webdriver": -6.643464, + "webdrivers": -7.336611, + "webmock": -7.336611, + "webpacker": -7.336611, + "webrick": -7.336611, + "websocket": -5.321708, + "x": -5.390701, + "xpath": -7.336611, + "zeitwerk": -7.336611, + "~": -3.080999, + }, "Genie": map[string]float64{ "(": -1.820090, ")": -1.820090, @@ -49864,797 +50551,600 @@ var TokensLogProbabilities = map[string]map[string]float64{ "}": -3.919424, }, "HTML": map[string]float64{ - "!": -4.963777, - "$": -4.899238, - "&": -7.266362, - "(": -3.229176, - ")": -3.229176, - "+": -6.573215, - ",": -4.963777, - "-": -3.265108, - ".": -5.800025, - "//": -7.266362, - "//pkgdown.r": -8.364974, - "/docs": -8.364974, - "/h": -5.320452, - "0": -6.755536, - "1": -6.755536, - "2": -8.364974, - "3": -8.364974, - "4": -7.671827, - "5": -8.364974, - "9": -8.364974, - ":": -4.160281, - ";": -4.701412, - "<": -4.536333, - "<!--[if>": -8.364974, - "<!DOCTYPE>": -6.755536, - "<![CDATA[>": -8.364974, - "<![endif]-->": -8.364974, - "</A>": -8.364974, - "</BODY>": -8.364974, - "</HEAD>": -8.364974, - "</P>": -8.364974, - "</UL>": -8.364974, - "</a>": -4.116479, - "</body>": -6.573215, - "</button>": -5.656924, - "</code>": -5.656924, - "</div>": -4.321923, - "</footer>": -8.364974, - "</form>": -8.364974, - "</head>": -6.755536, - "</header>": -8.364974, - "</html>": -6.755536, - "</li>": -4.930987, - "</loop-tpl>": -6.573215, - "</p>": -4.997678, - "</pre>": -7.671827, - "</script>": -5.800025, - "</small>": -6.978680, - "</span>": -5.474602, - "</strong>": -7.671827, - "</style>": -8.364974, - "</table>": -5.880067, - "</tbody>": -8.364974, - "</td>": -5.032769, - "</text>": -6.573215, - "</title>": -6.978680, - "</tr>": -5.725917, - "</ul>": -6.285532, - "<A>": -8.364974, - "<P>": -8.364974, - "<a>": -4.116479, - "<body>": -6.573215, - "<br/>": -7.266362, - "<br>": -6.573215, - "<button>": -5.656924, - "<code>": -5.656924, - "<div>": -4.339622, - "<footer>": -8.364974, - "<form>": -8.364974, - "<head>": -6.573215, - "<header>": -8.364974, - "<html>": -6.573215, - "<img>": -5.880067, - "<input>": -8.364974, - "<li>": -4.930987, - "<link>": -6.167749, - "<loop-tpl>": -6.573215, - "<meta>": -6.062389, - "<p>": -4.997678, - "<pre>": -7.671827, - "<script>": -5.800025, - "<small>": -6.978680, - "<span>": -5.474602, - "<strong>": -7.671827, - "<style>": -8.364974, - "<table>": -5.880067, - "<tbody>": -8.364974, - "<td>": -5.032769, - "<text>": -6.573215, - "<title>": -6.978680, - "<tr>": -5.725917, - "<ul>": -6.285532, - "=": -1.886464, - ">": -4.493773, - "?": -7.671827, - "@ex": -5.146098, - "A": -8.364974, - "API": -6.419064, - "API.": -7.266362, - "APIs": -8.364974, - "APIs.": -8.364974, - "All": -8.364974, - "Android": -6.755536, - "Articles": -8.364974, - "As": -8.364974, - "Author": -7.671827, - "B": -8.364974, - "Be": -8.364974, - "Browse": -8.364974, - "Button": -7.671827, - "By": -8.364974, - "CRAN": -8.364974, - "Changelog": -8.364974, - "Class": -7.671827, - "Classes": -8.364974, - "Click": -7.266362, - "Cmd": -7.671827, - "Code": -7.671827, - "Common_meta": -8.364974, - "Comparing": -8.364974, - "Compatible": -8.364974, - "Conduct": -8.364974, - "Congratulation": -8.364974, - "Content": -7.671827, - "Contributor": -8.364974, - "Copyright": -8.364974, - "Custom": -8.364974, - "DTD": -6.755536, - "Details": -8.364974, - "Dev": -8.364974, - "Developed": -8.364974, - "Developers": -8.364974, - "Differences": -7.671827, - "Documentation": -7.671827, - "Download": -8.364974, - "Doxygen": -8.364974, - "EN": -7.266362, - "Each": -8.364974, - "Example": -5.474602, - "External": -8.364974, - "FOCUS": -8.364974, - "Figures": -8.364974, - "For": -8.364974, - "Frameset": -8.364974, - "Full": -8.364974, - "Generated": -8.364974, - "Get": -8.364974, - "GitHub": -7.671827, - "Go": -7.671827, - "HREF=": -8.364974, - "HTML": -6.755536, - "Hadley": -7.671827, - "Header": -8.364974, - "Here": -7.671827, - "Hesselberth": -7.671827, - "Hierarchy": -8.364974, - "Highlighting": -8.364974, - "I": -8.364974, - "IE": -8.364974, - "If": -8.364974, - "In": -8.364974, - "Installation": -8.364974, - "It": -7.671827, - "JSS": -8.364974, - "Jay": -7.671827, - "Just": -8.364974, - "Kinetics": -8.364974, - "LICENSE": -8.364974, - "Layout": -8.364974, - "Learn": -8.364974, - "License": -8.364974, - "Links": -8.364974, - "MCMC": -8.364974, - "MIT": -8.364974, - "Main": -8.364974, - "Make": -8.364974, - "ModelElementRow": -8.364974, - "NMF": -7.671827, - "Next": -7.671827, - "No": -8.364974, - "Overview": -7.671827, - "PDF": -7.266362, - "PUBLIC": -7.266362, - "Package": -7.671827, - "PackageAddedLink": -8.364974, - "PackageChangedLink": -8.364974, - "Page": -8.364974, - "Pages": -7.671827, - "Please": -8.364974, - "Previous": -7.671827, - "README": -8.364974, - "README.md": -8.364974, - "REC": -8.364974, - "RStudio": -8.364974, - "Reference": -8.364974, - "Related": -7.671827, - "Report": -6.978680, - "Run": -8.364974, - "SDK": -8.364974, - "STOP": -7.671827, - "Search": -8.364974, - "Shift": -7.671827, - "SimpleTableRow": -7.671827, - "Site": -8.364974, - "So": -8.364974, - "Static": -7.671827, - "Status": -8.364974, - "Strict": -8.364974, - "Supported": -8.364974, - "System": -8.364974, - "TR": -7.266362, - "Table": -7.266362, - "Targets": -8.364974, - "Test": -6.285532, - "The": -6.978680, - "This": -7.266362, - "To": -8.364974, - "Toggle": -8.364974, - "Transitional": -8.364974, - "Type": -7.671827, - "UA": -8.364974, - "URL": -8.364974, - "Usage": -8.364974, - "W": -7.671827, - "W3C": -7.266362, - "Wickham": -7.671827, - "Widgets": -8.364974, - "X": -8.364974, - "XHTML": -6.978680, - "You": -7.671827, - "[": -4.809626, - "]": -4.809626, - "_pkgdown.yml": -8.364974, - "a": -5.146098, - "aardvark": -7.671827, - "abide": -8.364974, - "about": -7.671827, - "action": -8.364974, - "add": -8.364974, - "added_packages": -7.671827, - "additions": -8.364974, - "agree": -8.364974, - "align=": -8.364974, - "all": -7.266362, - "also": -8.364974, - "alt=": -5.880067, - "an": -6.755536, - "analysis": -8.364974, - "and": -5.531761, - "animals": -6.419064, - "any": -8.364974, - "apiKey": -8.364974, - "applied": -8.364974, - "are": -6.755536, - "aria": -7.266362, - "article": -7.671827, - "as": -7.671827, - "at": -6.755536, - "attractive": -8.364974, - "autocomplete=": -8.364974, - "available.": -8.364974, - "b": -6.978680, - "background": -8.364974, - "based": -7.671827, - "bayesplot": -8.364974, - "be": -7.671827, - "beetle": -7.671827, - "between": -8.364974, - "bind": -8.364974, - "bindings=": -6.573215, - "bottom": -8.364974, - "branch": -8.364974, - "brief": -8.364974, - "bug": -8.364974, - "build": -7.266362, - "build_site": -7.671827, - "built": -8.364974, - "button": -5.420535, - "by": -6.978680, - "calculation": -8.364974, - "can": -6.978680, - "card": -6.419064, - "cat": -7.671827, - "cell": -6.978680, - "change": -7.671827, - "changed_packages": -7.671827, - "changes": -7.671827, - "charset=": -6.978680, - "check": -8.364974, - "checking": -8.364974, - "class": -6.167749, - "class=": -3.497440, - "classes": -8.364974, - "click": -4.838613, - "clientX": -8.364974, - "clientY": -8.364974, - "close": -8.364974, - "cloud.r": -8.364974, - "code": -8.364974, - "collapse": -7.671827, - "collapsed": -8.364974, - "color": -8.364974, - "command": -8.364974, - "compares": -8.364974, - "comparison": -8.364974, - "conduct": -8.364974, - "conj": -6.062389, - "content": -5.273932, - "content=": -6.285532, - "contents": -8.364974, - "contributors": -8.364974, - "converts": -8.364974, - "corner": -8.364974, - "count": -5.106877, - "coverage": -8.364974, - "create": -8.364974, - "created": -8.364974, - "crossorigin=": -6.419064, - "customise": -7.671827, - "danger": -8.364974, - "data": -5.967079, - "dec": -6.755536, - "default": -8.364974, - "defc": -5.320452, - "defn": -5.531761, - "described": -7.671827, - "description": -8.364974, - "designed": -8.364974, - "details": -8.364974, - "detected": -8.364974, - "development": -8.364974, - "devtools": -8.364974, - "diagnostics.": -8.364974, - "differences": -7.671827, - "directory": -8.364974, - "directory.": -7.671827, - "disabled": -6.978680, - "do": -6.167749, - "docs/": -8.364974, - "docsearch": -8.364974, - "document": -8.364974, - "documentation": -6.978680, - "dog": -7.671827, - "dropdown": -8.364974, - "dtd": -7.266362, - "e": -6.062389, - "each": -8.364974, - "easiest": -8.364974, - "easily": -8.364974, - "easy": -7.671827, - "elk": -7.671827, - "endif": -6.978680, - "equiv": -7.266362, - "ex": -4.088308, - "ex1": -7.671827, - "ex10": -6.285532, - "ex2": -7.671827, - "ex3": -8.364974, - "ex3a": -8.364974, - "ex3b": -8.364974, - "ex6": -6.978680, - "ex7": -6.978680, - "ex8": -7.671827, - "ex9": -6.573215, - "example": -7.671827, - "examples": -8.364974, - "expanded": -7.671827, - "explanation": -8.364974, - "fa": -6.978680, - "factorization": -8.364974, - "false": -7.671827, - "ferret": -7.671827, - "few": -8.364974, - "fields.": -8.364974, - "file": -7.266362, - "files": -8.364974, - "fixed": -8.364974, - "folder": -8.364974, - "for": -6.167749, - "frameset": -8.364974, - "framework": -7.266362, - "from": -6.755536, - "function": -7.266362, - "functions": -8.364974, - "funder": -8.364974, - "generate": -8.364974, - "generated": -7.671827, - "genome": -8.364974, - "git": -8.364974, - "github": -7.671827, - "github.com/": -7.671827, - "go": -8.364974, - "goose": -7.671827, - "great": -8.364974, - "h": -5.320452, - "height=": -6.573215, - "hidden": -7.671827, - "hippo": -7.671827, - "hit": -7.266362, - "hit.url": -8.364974, - "hits": -8.364974, - "hits.map": -8.364974, - "holder": -8.364974, - "home": -7.671827, - "homepage": -8.364974, - "href=": -4.074515, - "html": -6.978680, - "html40": -8.364974, - "http": -6.573215, - "https": -6.978680, - "ibis": -7.671827, - "icon": -8.364974, - "id=": -4.221839, - "if": -5.967079, - "in": -6.062389, - "inc": -6.285532, - "includes": -7.671827, - "index": -5.592385, - "indexName": -8.364974, - "indicated": -8.364974, - "information": -7.671827, - "initial": -8.364974, - "inputSelector": -8.364974, - "install.packages": -8.364974, - "install_github": -8.364974, - "integrity=": -6.419064, - "intervals": -8.364974, - "into": -8.364974, - "is": -6.062389, - "issues": -8.364974, - "it": -6.755536, - "it.from": -8.364974, - "it.to": -7.671827, - "its": -8.364974, - "jellyfish": -7.671827, - "k": -7.266362, - "kangaroo": -7.671827, - "keyCode": -7.671827, - "keyboard": -8.364974, - "keydown": -8.364974, - "keys": -7.671827, - "label": -7.671827, - "lang=": -8.364974, - "last": -8.364974, - "latest": -8.364974, - "learn": -8.364974, - "let": -6.978680, - "level1": -8.364974, - "level2": -6.978680, - "lg": -7.671827, - "lib.org": -8.364974, - "lib/": -7.671827, - "license": -8.364974, - "like": -8.364974, - "line": -6.573215, - "list": -8.364974, - "loc": -7.266362, - "longer": -8.364974, - "lt": -8.364974, - "m": -7.671827, - "maintainer": -8.364974, - "make": -7.266362, - "making": -8.364974, - "man/": -8.364974, - "manipulate": -8.364974, - "master": -8.364974, - "matrix": -8.364974, - "maturing": -8.364974, - "max": -7.266362, - "me": -7.266362, - "methods": -8.364974, - "middot": -7.266362, - "mkin": -8.364974, - "mnemonic": -8.364974, - "mod": -8.364974, - "model": -8.364974, - "modifications": -8.364974, - "modify": -8.364974, - "more": -7.266362, - "mouse": -7.266362, - "mousemove": -7.671827, - "name": -4.997678, - "name=": -7.266362, - "nav": -6.419064, - "navbar": -6.419064, - "navigate": -8.364974, - "navigation": -8.364974, - "need": -8.364974, - "negative": -8.364974, - "new": -6.573215, - "newer": -8.364974, - "next": -6.419064, - "no": -8.364974, - "no_delta": -8.364974, - "non": -8.364974, - "not": -7.671827, - "note": -8.364974, - "noting": -8.364974, - "nth": -7.671827, - "number": -6.573215, - "of": -6.062389, - "older": -7.671827, - "on": -5.531761, - "online": -8.364974, - "or": -8.364974, - "org": -7.266362, - "other": -7.671827, - "others": -8.364974, - "output": -7.266362, - "over": -8.364974, - "package": -6.167749, - "package.": -8.364974, - "packages": -7.671827, - "page": -7.671827, - "page.": -7.671827, - "pages": -7.671827, - "participating": -8.364974, - "people": -8.364974, - "perform": -8.364974, - "pkgdown": -5.656924, - "pkgdown.": -8.364974, - "pkgdown/": -8.364974, - "pkgdown/_pkgdown.yml": -8.364974, - "placeholder=": -8.364974, - "placement": -8.364974, - "plotting": -8.364974, - "posterior": -8.364974, - "present": -8.364974, - "prev": -6.419064, - "product": -8.364974, - "project": -7.671827, - "project.org/": -8.364974, - "property=": -7.266362, - "provided": -8.364974, - "quick": -8.364974, - "r": -6.573215, - "rarely": -8.364974, - "read": -8.364974, - "recommend": -8.364974, - "reference": -7.671827, - "rel=": -6.167749, - "related": -8.364974, - "relative": -8.364974, - "release": -8.364974, - "released": -8.364974, - "removals": -7.671827, - "removed_packages": -7.671827, - "replaces": -8.364974, - "repo": -8.364974, - "report": -8.364974, - "repository": -8.364974, - "reset": -6.573215, - "return": -7.671827, - "right": -7.266362, - "role=": -6.978680, - "routines": -8.364974, - "rows": -7.266362, - "s": -8.364974, - "sample": -8.364974, - "scale": -8.364974, - "see": -7.671827, - "set": -8.364974, - "settings": -8.364974, - "share": -8.364974, - "shortcut.": -8.364974, - "shows": -8.364974, - "signals.": -8.364974, - "simple": -8.364974, - "site": -7.671827, - "site.": -7.671827, - "sites": -8.364974, - "sm": -8.364974, - "so": -8.364974, - "source": -6.285532, - "specified": -8.364974, - "src=": -5.229480, - "started": -8.364974, - "status": -7.266362, - "str": -7.266362, - "strict": -8.364974, - "suggested": -8.364974, - "sure": -7.671827, - "swap": -5.369242, - "tabs": -8.364974, - "tag": -8.364974, - "target": -8.364974, - "target=": -6.755536, - "techniques.": -8.364974, - "template": -8.364974, - "terms.": -8.364974, - "test": -7.671827, - "tests": -8.364974, - "text": -6.755536, - "that": -7.266362, - "the": -5.069137, - "then": -8.364974, - "these": -8.364974, - "this": -6.573215, - "time": -8.364974, - "title=": -8.364974, - "to": -5.369242, - "toggle": -6.419064, - "tooltip": -8.364974, - "top": -8.364974, - "transformData": -8.364974, - "transitional": -8.364974, - "two": -8.364974, - "type=": -6.167749, - "update": -8.364974, - "updateHitURL": -8.364974, - "upper": -8.364974, - "use": -8.364974, - "used": -7.671827, - "useful": -8.364974, - "uses": -8.364974, - "using": -8.364974, - "valr": -8.364974, - "vec": -7.266362, - "version": -7.266362, - "versions": -8.364974, - "vignette": -8.364974, - "vignettes": -8.364974, - "w3": -7.266362, - "way": -7.671827, - "website": -7.266362, - "website.": -8.364974, - "were": -8.364974, - "when": -5.369242, - "where": -8.364974, - "whose": -8.364974, - "width=": -7.671827, - "wild": -8.364974, - "will": -7.266362, - "with": -7.266362, - "workaround": -8.364974, - "worksheets": -8.364974, - "www": -7.266362, - "x": -5.800025, - "xhtml1": -6.978680, - "xmlns=": -7.671827, - "xs": -8.364974, - "y": -7.671827, - "yellow": -8.364974, - "you": -6.755536, - "your": -5.967079, - "zero": -8.364974, - "{": -5.880067, - "}": -5.880067, - "~": -6.573215, - "М": -8.364974, - "П": -8.364974, - "Р": -8.364974, - "а": -7.671827, - "в": -8.364974, - "г": -8.364974, - "д": -7.671827, - "е": -7.671827, - "ж": -8.364974, - "и": -8.364974, - "к": -7.671827, - "н": -8.364974, - "о": -7.266362, - "р": -8.364974, - "с": -8.364974, - "ы": -8.364974, - "\u200b": -6.167749, - "’": -8.364974, - "“": -8.364974, - "”": -8.364974, - "•": -8.364974, - }, - "HTML+Django": map[string]float64{ - "!": -5.799093, - "%": -4.412798, - "(": -5.799093, - ")": -5.799093, - ",": -5.799093, - "-": -4.412798, - "/h": -4.700480, - "5": -5.799093, - ":": -4.700480, - "<": -4.007333, - "</a>": -5.105945, - "</code>": -5.105945, - "</div>": -5.105945, - "</li>": -5.799093, - "</p>": -4.700480, - "</pre>": -5.105945, - "</table>": -5.105945, - "</tbody>": -5.799093, - "</td>": -3.719651, - "</th>": -3.314186, - "</thead>": -5.799093, - "</tr>": -4.189655, - "</ul>": -5.799093, - "<a>": -5.105945, - "<code>": -5.105945, - "<div>": -5.105945, - "<hr>": -5.799093, - "<li>": -5.799093, - "<p>": -4.700480, - "<pre>": -5.105945, - "<table>": -5.105945, - "<tbody>": -5.799093, - "<td>": -3.719651, - "<th>": -3.314186, - "<thead>": -5.799093, - "<tr>": -4.189655, - "<ul>": -5.799093, - ">": -4.007333, - "Client": -4.700480, - "Data": -5.799093, - "File": -5.799093, - "Functions": -5.799093, - "Helper": -5.799093, - "ID": -5.105945, - "IP": -5.799093, - "Job": -5.799093, - "List": -5.799093, - "New": -5.799093, - "No": -5.799093, - "None": -5.799093, - "Not": -5.799093, - "OAuth": -5.105945, - "TODO": -5.799093, - "This": -5.799093, - "WTF": -5.799093, - "Workers": -5.799093, - "[": -3.314186, - "]": -3.314186, - "about": -5.799093, - "actually": -5.799093, - "add": -5.799093, - "and": -5.105945, - "auto": -5.799093, - "btn": -5.799093, - "class=": -3.314186, - "client_id": -5.799093, - "clients": -5.799093, - "col": -5.799093, - "col_client_index": -5.105945, - "configured": -5.799093, - "current": -5.799093, - "data": -5.105945, - "descriptor": -5.799093, - "easier": -5.799093, - "endif": -5.105945, - "failed": -5.799093, - "getting": -5.799093, - "going": -5.799093, - "h": -4.700480, - "help": -5.799093, - "here": -5.799093, - "here....": -5.799093, - "hover": -5.799093, - "href=": -5.105945, - "if": -5.105945, - "index0": -5.799093, - "is": -5.105945, - "item": -5.799093, - "join": -5.799093, - "key": -5.799093, - "loop": -5.799093, - "loop.index": -5.799093, - "make": -5.799093, - "more": -5.799093, - "notes": -5.799093, - "of": -5.799093, - "on": -5.799093, - "outer_loop.index": -5.799093, - "primary": -5.799093, - "pt": -5.799093, - "pushing": -5.799093, - "responding": -5.799093, - "role=": -5.799093, - "scope=": -5.105945, - "server": -5.799093, - "server_info": -4.412798, - "setting": -5.799093, - "small": -5.799093, - "some": -5.799093, - "status": -5.799093, - "summary": -5.799093, - "table": -5.799093, - "to": -5.799093, - "tokens": -5.799093, - "w": -5.799093, - "worker": -4.412798, - "{": -1.704748, - "|": -5.799093, - "}": -2.708050, + "!": -4.919981, + "&": -7.188664, + "(": -3.237421, + ")": -3.237421, + "+": -6.495517, + ",": -5.454063, + "-": -3.193527, + ".": -5.802370, + "//": -7.188664, + "//pkgdown.r": -8.287277, + "/docs": -8.287277, + "/h": -5.342838, + "0": -6.900982, + "1": -6.677839, + "2": -8.287277, + "3": -8.287277, + "4": -8.287277, + "5": -8.287277, + "9": -8.287277, + ":": -4.209739, + ";": -4.623715, + "<": -4.549607, + "<!--[if>": -8.287277, + "<!DOCTYPE>": -6.900982, + "<![CDATA[>": -8.287277, + "<![endif]-->": -8.287277, + "</A>": -8.287277, + "</BODY>": -8.287277, + "</HEAD>": -8.287277, + "</P>": -8.287277, + "</UL>": -8.287277, + "</a>": -4.053170, + "</body>": -6.677839, + "</button>": -5.579227, + "</code>": -5.579227, + "</div>": -4.279944, + "</footer>": -8.287277, + "</form>": -8.287277, + "</head>": -6.677839, + "</header>": -8.287277, + "</html>": -6.900982, + "</li>": -4.853290, + "</loop-tpl>": -6.495517, + "</p>": -5.029180, + "</pre>": -7.594130, + "</script>": -5.722327, + "</small>": -6.900982, + "</span>": -5.396905, + "</strong>": -7.594130, + "</style>": -8.287277, + "</table>": -5.802370, + "</tbody>": -8.287277, + "</td>": -4.955072, + "</text>": -6.495517, + "</title>": -7.188664, + "</tr>": -5.648219, + "</ul>": -6.207835, + "<A>": -8.287277, + "<P>": -8.287277, + "<a>": -4.053170, + "<body>": -6.677839, + "<br>": -6.495517, + "<button>": -5.579227, + "<code>": -5.579227, + "<div>": -4.298293, + "<footer>": -8.287277, + "<form>": -8.287277, + "<head>": -6.677839, + "<header>": -8.287277, + "<html>": -6.677839, + "<img>": -5.802370, + "<input>": -8.287277, + "<li>": -4.853290, + "<link>": -6.090052, + "<loop-tpl>": -6.495517, + "<meta>": -5.984692, + "<p>": -5.029180, + "<pre>": -7.594130, + "<script>": -5.722327, + "<small>": -6.900982, + "<span>": -5.396905, + "<strong>": -7.594130, + "<style>": -8.287277, + "<table>": -5.802370, + "<tbody>": -8.287277, + "<td>": -4.955072, + "<text>": -6.495517, + "<title>": -7.188664, + "<tr>": -5.648219, + "<ul>": -6.207835, + "=": -1.818026, + ">": -4.503087, + "?": -7.594130, + "@ex": -5.068401, + "A": -8.287277, + "All": -8.287277, + "Articles": -8.287277, + "As": -8.287277, + "Author": -7.594130, + "B": -8.287277, + "Be": -8.287277, + "Browse": -8.287277, + "Button": -7.594130, + "By": -8.287277, + "CRAN": -8.287277, + "Changelog": -8.287277, + "Class": -7.594130, + "Classes": -8.287277, + "Click": -7.188664, + "Cmd": -7.594130, + "Code": -7.594130, + "Comparing": -8.287277, + "Compatible": -8.287277, + "Conduct": -8.287277, + "Content": -7.594130, + "Contributor": -8.287277, + "Copyright": -8.287277, + "Custom": -8.287277, + "DTD": -6.900982, + "Details": -8.287277, + "Dev": -8.287277, + "Developed": -8.287277, + "Developers": -8.287277, + "Documentation": -7.594130, + "Download": -8.287277, + "Doxygen": -8.287277, + "EN": -7.594130, + "Example": -5.396905, + "External": -8.287277, + "FOCUS": -8.287277, + "Figures": -8.287277, + "Full": -8.287277, + "Generated": -8.287277, + "Get": -8.287277, + "GitHub": -7.594130, + "Go": -7.594130, + "HREF=": -8.287277, + "HTML": -7.188664, + "Hadley": -7.594130, + "Here": -7.594130, + "Hesselberth": -7.594130, + "Hierarchy": -8.287277, + "Highlighting": -8.287277, + "I": -8.287277, + "IE": -8.287277, + "If": -8.287277, + "In": -8.287277, + "Installation": -8.287277, + "JSS": -8.287277, + "Jay": -7.594130, + "Just": -8.287277, + "Kinetics": -8.287277, + "LICENSE": -8.287277, + "Layout": -8.287277, + "Learn": -8.287277, + "License": -8.287277, + "Links": -8.287277, + "MCMC": -8.287277, + "MIT": -8.287277, + "Main": -8.287277, + "Make": -8.287277, + "NMF": -7.594130, + "Next": -7.594130, + "Overview": -7.594130, + "PDF": -7.188664, + "PUBLIC": -7.594130, + "Package": -7.594130, + "Page": -8.287277, + "Pages": -7.594130, + "Please": -8.287277, + "Previous": -7.594130, + "README": -8.287277, + "README.md": -8.287277, + "RStudio": -8.287277, + "Reference": -8.287277, + "Related": -7.594130, + "Report": -7.594130, + "Run": -8.287277, + "STOP": -7.594130, + "Search": -8.287277, + "Shift": -7.594130, + "Site": -8.287277, + "Static": -7.594130, + "Status": -8.287277, + "Strict": -8.287277, + "Supported": -8.287277, + "System": -8.287277, + "TR": -7.594130, + "Targets": -8.287277, + "Test": -6.207835, + "The": -7.188664, + "This": -7.594130, + "To": -8.287277, + "Toggle": -8.287277, + "Transitional": -8.287277, + "Type": -7.594130, + "UA": -8.287277, + "URL": -8.287277, + "Usage": -8.287277, + "W": -7.594130, + "W3C": -7.594130, + "Wickham": -7.594130, + "Widgets": -8.287277, + "X": -8.287277, + "XHTML": -6.900982, + "You": -7.594130, + "[": -4.731929, + "]": -4.731929, + "_pkgdown.yml": -8.287277, + "a": -5.196234, + "aardvark": -7.594130, + "abide": -8.287277, + "about": -8.287277, + "action": -8.287277, + "add": -8.287277, + "agree": -8.287277, + "align=": -8.287277, + "all": -7.188664, + "also": -8.287277, + "alt=": -5.802370, + "an": -7.594130, + "analysis": -8.287277, + "and": -5.802370, + "animals": -6.341367, + "apiKey": -8.287277, + "applied": -8.287277, + "are": -7.594130, + "aria": -7.188664, + "article": -7.594130, + "as": -7.594130, + "at": -6.677839, + "attractive": -8.287277, + "autocomplete=": -8.287277, + "b": -6.900982, + "background": -8.287277, + "based": -8.287277, + "bayesplot": -8.287277, + "be": -7.594130, + "beetle": -7.594130, + "bind": -8.287277, + "bindings=": -6.495517, + "bottom": -8.287277, + "branch": -8.287277, + "bug": -8.287277, + "build": -7.188664, + "build_site": -7.594130, + "built": -8.287277, + "button": -5.342838, + "by": -6.900982, + "calculation": -8.287277, + "can": -6.900982, + "card": -6.341367, + "cat": -7.594130, + "cell": -6.900982, + "charset=": -6.900982, + "check": -8.287277, + "checking": -8.287277, + "class": -6.090052, + "class=": -3.435246, + "click": -4.760916, + "clientX": -8.287277, + "clientY": -8.287277, + "close": -8.287277, + "cloud.r": -8.287277, + "code": -8.287277, + "collapse": -7.594130, + "collapsed": -8.287277, + "color": -8.287277, + "command": -8.287277, + "conduct": -8.287277, + "conj": -5.984692, + "content": -5.196234, + "content=": -6.207835, + "contents": -8.287277, + "contributors": -8.287277, + "converts": -8.287277, + "count": -5.029180, + "coverage": -8.287277, + "create": -8.287277, + "created": -8.287277, + "crossorigin=": -6.341367, + "customise": -7.594130, + "danger": -8.287277, + "data": -5.889381, + "dec": -6.677839, + "default": -8.287277, + "defc": -5.242754, + "defn": -5.454063, + "described": -8.287277, + "designed": -8.287277, + "development": -8.287277, + "devtools": -8.287277, + "diagnostics.": -8.287277, + "directory": -8.287277, + "directory.": -7.594130, + "disabled": -6.900982, + "do": -6.090052, + "docs/": -8.287277, + "docsearch": -8.287277, + "documentation": -6.900982, + "dog": -7.594130, + "dropdown": -8.287277, + "dtd": -7.594130, + "e": -5.984692, + "each": -8.287277, + "easiest": -8.287277, + "easily": -8.287277, + "easy": -7.594130, + "elk": -7.594130, + "equiv": -7.188664, + "ex": -4.010611, + "ex1": -7.594130, + "ex10": -6.207835, + "ex2": -7.594130, + "ex3": -8.287277, + "ex3a": -8.287277, + "ex3b": -8.287277, + "ex6": -6.900982, + "ex7": -6.900982, + "ex8": -7.594130, + "ex9": -6.495517, + "example": -8.287277, + "examples": -8.287277, + "expanded": -7.594130, + "fa": -6.900982, + "factorization": -8.287277, + "false": -7.594130, + "ferret": -7.594130, + "few": -8.287277, + "file": -7.188664, + "files": -8.287277, + "fixed": -8.287277, + "folder": -8.287277, + "for": -6.341367, + "framework": -8.287277, + "from": -6.677839, + "function": -7.188664, + "functions": -8.287277, + "funder": -8.287277, + "generate": -8.287277, + "generated": -7.594130, + "genome": -8.287277, + "git": -8.287277, + "github": -7.594130, + "github.com/": -7.594130, + "go": -8.287277, + "goose": -7.594130, + "great": -8.287277, + "h": -5.342838, + "height=": -6.495517, + "hidden": -7.594130, + "hippo": -7.594130, + "hit": -7.188664, + "hit.url": -8.287277, + "hits": -8.287277, + "hits.map": -8.287277, + "holder": -8.287277, + "home": -7.594130, + "homepage": -8.287277, + "href=": -4.010611, + "html": -6.900982, + "http": -6.677839, + "https": -6.900982, + "ibis": -7.594130, + "icon": -8.287277, + "id=": -4.144142, + "if": -6.341367, + "in": -6.495517, + "inc": -6.207835, + "includes": -8.287277, + "index": -5.514688, + "indexName": -8.287277, + "information": -8.287277, + "initial": -8.287277, + "inputSelector": -8.287277, + "install.packages": -8.287277, + "install_github": -8.287277, + "integrity=": -6.341367, + "intervals": -8.287277, + "into": -8.287277, + "is": -5.984692, + "issues": -8.287277, + "it": -6.677839, + "its": -8.287277, + "jellyfish": -7.594130, + "k": -7.188664, + "kangaroo": -7.594130, + "keyCode": -7.594130, + "keyboard": -8.287277, + "keydown": -8.287277, + "keys": -7.594130, + "label": -7.594130, + "lang=": -8.287277, + "last": -8.287277, + "latest": -8.287277, + "learn": -8.287277, + "let": -6.900982, + "level1": -8.287277, + "level2": -6.900982, + "lg": -7.594130, + "lib.org": -8.287277, + "lib/": -7.594130, + "license": -8.287277, + "like": -8.287277, + "line": -6.495517, + "list": -8.287277, + "loc": -7.188664, + "lt": -8.287277, + "m": -7.594130, + "maintainer": -8.287277, + "make": -7.188664, + "making": -8.287277, + "man/": -8.287277, + "manipulate": -8.287277, + "master": -8.287277, + "matrix": -8.287277, + "maturing": -8.287277, + "max": -7.188664, + "me": -7.188664, + "middot": -7.188664, + "mkin": -8.287277, + "mnemonic": -8.287277, + "mod": -8.287277, + "model": -8.287277, + "modify": -8.287277, + "more": -7.594130, + "mouse": -7.188664, + "mousemove": -7.594130, + "name": -5.029180, + "name=": -7.188664, + "nav": -6.341367, + "navbar": -6.341367, + "navigate": -8.287277, + "navigation": -8.287277, + "need": -8.287277, + "negative": -8.287277, + "new": -6.495517, + "next": -6.341367, + "non": -8.287277, + "not": -7.594130, + "note": -8.287277, + "nth": -7.594130, + "number": -6.495517, + "of": -6.495517, + "on": -5.454063, + "online": -8.287277, + "or": -8.287277, + "org": -7.594130, + "other": -7.594130, + "others": -8.287277, + "output": -7.188664, + "over": -8.287277, + "package": -6.090052, + "package.": -8.287277, + "packages": -8.287277, + "page": -7.594130, + "page.": -8.287277, + "pages": -7.594130, + "participating": -8.287277, + "people": -8.287277, + "perform": -8.287277, + "pkgdown": -5.579227, + "pkgdown.": -8.287277, + "pkgdown/": -8.287277, + "pkgdown/_pkgdown.yml": -8.287277, + "placeholder=": -8.287277, + "placement": -8.287277, + "plotting": -8.287277, + "posterior": -8.287277, + "prev": -6.341367, + "project": -7.594130, + "project.org/": -8.287277, + "property=": -7.188664, + "quick": -8.287277, + "r": -6.495517, + "rarely": -8.287277, + "read": -8.287277, + "recommend": -8.287277, + "reference": -8.287277, + "rel=": -6.090052, + "related": -8.287277, + "release": -8.287277, + "released": -8.287277, + "replaces": -8.287277, + "repo": -8.287277, + "repository": -8.287277, + "reset": -6.495517, + "return": -7.594130, + "right": -7.594130, + "role=": -6.900982, + "routines": -8.287277, + "s": -8.287277, + "sample": -8.287277, + "scale": -8.287277, + "see": -8.287277, + "set": -8.287277, + "settings": -8.287277, + "share": -8.287277, + "shortcut.": -8.287277, + "signals.": -8.287277, + "simple": -8.287277, + "site": -8.287277, + "site.": -7.594130, + "sites": -8.287277, + "sm": -8.287277, + "so": -8.287277, + "source": -6.207835, + "src=": -5.151783, + "started": -8.287277, + "status": -7.188664, + "str": -7.188664, + "strict": -8.287277, + "sure": -7.594130, + "swap": -5.291544, + "tabs": -8.287277, + "tag": -8.287277, + "target": -8.287277, + "target=": -6.900982, + "techniques.": -8.287277, + "template": -8.287277, + "terms.": -8.287277, + "test": -7.594130, + "tests": -8.287277, + "text": -6.677839, + "that": -7.188664, + "the": -5.514688, + "then": -8.287277, + "these": -8.287277, + "this": -6.900982, + "time": -8.287277, + "title=": -8.287277, + "to": -5.454063, + "toggle": -6.341367, + "tooltip": -8.287277, + "top": -8.287277, + "transformData": -8.287277, + "transitional": -8.287277, + "type=": -6.090052, + "update": -8.287277, + "updateHitURL": -8.287277, + "use": -8.287277, + "used": -7.594130, + "useful": -8.287277, + "uses": -8.287277, + "using": -8.287277, + "valr": -8.287277, + "vec": -7.188664, + "version": -7.594130, + "vignette": -8.287277, + "vignettes": -8.287277, + "w3": -7.594130, + "way": -7.594130, + "website": -7.188664, + "website.": -8.287277, + "when": -5.291544, + "width=": -7.594130, + "wild": -8.287277, + "will": -7.188664, + "with": -7.188664, + "worksheets": -8.287277, + "www": -7.594130, + "x": -5.722327, + "xhtml1": -6.900982, + "xmlns=": -7.594130, + "xs": -8.287277, + "y": -7.594130, + "yellow": -8.287277, + "you": -6.677839, + "your": -5.889381, + "zero": -8.287277, + "{": -6.090052, + "}": -6.090052, + "~": -6.495517, + "М": -8.287277, + "П": -8.287277, + "Р": -8.287277, + "а": -7.594130, + "в": -8.287277, + "г": -8.287277, + "д": -7.594130, + "е": -7.594130, + "ж": -8.287277, + "и": -8.287277, + "к": -7.594130, + "н": -8.287277, + "о": -7.188664, + "р": -8.287277, + "с": -8.287277, + "ы": -8.287277, + "\u200b": -6.090052, + "’": -8.287277, + "“": -8.287277, + "”": -8.287277, + "•": -8.287277, }, "HTML+ECR": map[string]float64{ "!": -2.197225, @@ -62718,6 +63208,127 @@ var TokensLogProbabilities = map[string]map[string]float64{ ".appendTo": -1.945910, ";": -1.945910, }, + "Jinja": map[string]float64{ + "!": -5.799093, + "%": -4.412798, + "(": -5.799093, + ")": -5.799093, + ",": -5.799093, + "-": -4.412798, + "/h": -4.700480, + "5": -5.799093, + ":": -4.700480, + "<": -4.007333, + "</a>": -5.105945, + "</code>": -5.105945, + "</div>": -5.105945, + "</li>": -5.799093, + "</p>": -4.700480, + "</pre>": -5.105945, + "</table>": -5.105945, + "</tbody>": -5.799093, + "</td>": -3.719651, + "</th>": -3.314186, + "</thead>": -5.799093, + "</tr>": -4.189655, + "</ul>": -5.799093, + "<a>": -5.105945, + "<code>": -5.105945, + "<div>": -5.105945, + "<hr>": -5.799093, + "<li>": -5.799093, + "<p>": -4.700480, + "<pre>": -5.105945, + "<table>": -5.105945, + "<tbody>": -5.799093, + "<td>": -3.719651, + "<th>": -3.314186, + "<thead>": -5.799093, + "<tr>": -4.189655, + "<ul>": -5.799093, + ">": -4.007333, + "Client": -4.700480, + "Data": -5.799093, + "File": -5.799093, + "Functions": -5.799093, + "Helper": -5.799093, + "ID": -5.105945, + "IP": -5.799093, + "Job": -5.799093, + "List": -5.799093, + "New": -5.799093, + "No": -5.799093, + "None": -5.799093, + "Not": -5.799093, + "OAuth": -5.105945, + "TODO": -5.799093, + "This": -5.799093, + "WTF": -5.799093, + "Workers": -5.799093, + "[": -3.314186, + "]": -3.314186, + "about": -5.799093, + "actually": -5.799093, + "add": -5.799093, + "and": -5.105945, + "auto": -5.799093, + "btn": -5.799093, + "class=": -3.314186, + "client_id": -5.799093, + "clients": -5.799093, + "col": -5.799093, + "col_client_index": -5.105945, + "configured": -5.799093, + "current": -5.799093, + "data": -5.105945, + "descriptor": -5.799093, + "easier": -5.799093, + "endif": -5.105945, + "failed": -5.799093, + "getting": -5.799093, + "going": -5.799093, + "h": -4.700480, + "help": -5.799093, + "here": -5.799093, + "here....": -5.799093, + "hover": -5.799093, + "href=": -5.105945, + "if": -5.105945, + "index0": -5.799093, + "is": -5.105945, + "item": -5.799093, + "join": -5.799093, + "key": -5.799093, + "loop": -5.799093, + "loop.index": -5.799093, + "make": -5.799093, + "more": -5.799093, + "notes": -5.799093, + "of": -5.799093, + "on": -5.799093, + "outer_loop.index": -5.799093, + "primary": -5.799093, + "pt": -5.799093, + "pushing": -5.799093, + "responding": -5.799093, + "role=": -5.799093, + "scope=": -5.105945, + "server": -5.799093, + "server_info": -4.412798, + "setting": -5.799093, + "small": -5.799093, + "some": -5.799093, + "status": -5.799093, + "summary": -5.799093, + "table": -5.799093, + "to": -5.799093, + "tokens": -5.799093, + "w": -5.799093, + "worker": -4.412798, + "{": -1.704748, + "|": -5.799093, + "}": -2.708050, + }, "Jison": map[string]float64{ "$": -5.102911, "%": -3.759176, @@ -75743,6 +76354,199 @@ var TokensLogProbabilities = map[string]map[string]float64{ "{": -3.491444, "}": -3.491444, }, + "Kusto": map[string]float64{ + "!": -4.439706, + "$": -4.727388, + "%": -6.519147, + "(": -3.341093, + ")": -3.341093, + "*": -6.519147, + "+": -5.132853, + ",": -2.539466, + "-": -4.034241, + "..": -6.113682, + ".create": -7.212294, + "/": -6.519147, + "//": -3.523415, + "//CounterName": -6.519147, + "//For": -7.212294, + "//HM": -7.212294, + "//e": -7.212294, + "//let": -7.212294, + "//regex": -7.212294, + "//todatetime": -7.212294, + "/e": -6.519147, + "/w": -6.519147, + ":": -4.321923, + ";": -4.167772, + "<disk>": -7.212294, + "<ms>": -7.212294, + "=": -3.405632, + ">": -6.519147, + "@": -4.439706, + "BeginResolve": -6.519147, + "Building": -7.212294, + "Cache": -7.212294, + "Client": -7.212294, + "ClientFactory": -5.826000, + "CodePackage": -7.212294, + "CounterName": -3.523415, + "CounterValue": -6.113682, + "DistinctEvents": -6.519147, + "ETag": -7.212294, + "Enqueue": -6.519147, + "ErrorCode": -7.212294, + "FABRIC_E": -7.212294, + "FM.": -6.519147, + "FM.Background_FTUpdate@": -6.519147, + "FileType": -5.420535, + "HM.Entity_QueryCompleted@": -7.212294, + "Informational": -7.212294, + "Invalid": -6.519147, + "Level": -4.909709, + "LogType": -7.212294, + "NodeName": -4.573237, + "PID": -5.266384, + "Partition": -7.212294, + "PartitionKey": -5.266384, + "PropertyName": -5.132853, + "PropertyValue": -4.909709, + "Query": -7.212294, + "Regex": -7.212294, + "RelativeUri": -6.113682, + "Replica": -7.212294, + "ReverseProxy": -5.602857, + "ReverseProxy.RequestReceived": -6.519147, + "RowKey": -5.266384, + "Rsp": -7.212294, + "ServicePartitionClient": -7.212294, + "StateStore": -6.519147, + "T": -5.602857, + "TID": -5.266384, + "Text": -3.916458, + "There": -7.212294, + "Timestamp": -3.844999, + "Timstamp": -7.212294, + "Transport.Activity_Dispatch": -7.212294, + "Transport.Enqueue": -7.212294, + "Transport.Msg_Dispatch": -7.212294, + "Transport.SecurityContextSsl": -7.212294, + "Type": -4.076800, + "TypeTimeStamp": -7.212294, + "Types": -7.212294, + "VerifyCertificate": -7.212294, + "[": -4.814399, + "\\": -4.216562, + "]": -5.015070, + "a": -4.909709, + "ago": -7.212294, + "an": -7.212294, + "and": -4.216562, + "appName": -5.826000, + "asc": -4.647345, + "avg": -7.212294, + "b": -6.519147, + "bab": -7.212294, + "bag": -6.519147, + "bag_unpack": -7.212294, + "between": -6.113682, + "bfe": -7.212294, + "bin": -5.602857, + "by": -4.167772, + "c": -6.519147, + "cc": -7.212294, + "cert": -7.212294, + "chaos": -7.212294, + "code": -5.602857, + "com/": -7.212294, + "contains": -2.908229, + "count": -5.420535, + "d": -5.015070, + "datetime": -6.113682, + "desc": -7.212294, + "disk": -6.113682, + "distinct": -6.519147, + "durationMs": -5.826000, + "e": -5.602857, + "eaed": -7.212294, + "ebb": -7.212294, + "ed": -7.212294, + "endTime": -5.826000, + "error": -6.113682, + "evaluate": -7.212294, + "excludePattern": -5.420535, + "exclusion": -5.420535, + "exitcode": -7.212294, + "extend": -6.113682, + "extract": -6.113682, + "fabric": -7.212294, + "filterPattern": -4.647345, + "found": -7.212294, + "https": -7.212294, + "in": -6.519147, + "incoming": -7.212294, + "info": -7.212294, + "int": -6.519147, + "join": -5.826000, + "kusto": -6.519147, + "left.PartitionKey": -7.212294, + "left.RowKey": -5.826000, + "left.Timestamp": -7.212294, + "let": -4.216562, + "limit": -5.420535, + "long": -7.212294, + "m": -5.826000, + "make_bag": -7.212294, + "matches": -4.909709, + "name": -6.519147, + "now": -7.212294, + "on": -5.826000, + "or": -4.647345, + "order": -4.647345, + "pack": -7.212294, + "partitionid": -7.212294, + "patterns": -7.212294, + "percentiles": -7.212294, + "project": -5.015070, + "propertyPack": -6.519147, + "regex": -4.909709, + "regexPattern": -6.113682, + "render": -6.113682, + "right.PartitionKey": -7.212294, + "right.RowKey": -5.826000, + "right.Timestamp": -7.212294, + "s": -7.212294, + "sample": -7.212294, + "search": -7.212294, + "services": -7.212294, + "show": -7.212294, + "sok": -6.519147, + "startTime": -5.826000, + "status": -5.602857, + "strcat": -5.420535, + "string": -5.602857, + "summarize": -5.132853, + "t": -5.132853, + "table": -6.113682, + "terminated": -7.212294, + "timechart": -6.113682, + "todatetime": -6.519147, + "try": -7.212294, + "typeof": -7.212294, + "unknown": -7.212294, + "usage": -7.212294, + "verbose": -7.212294, + "w_": -6.519147, + "was": -7.212294, + "where": -3.134757, + "with": -7.212294, + "xtime": -5.602857, + "your_tablename_here": -7.212294, + "z": -5.602857, + "{": -5.602857, + "|": -2.511814, + "}": -5.602857, + }, "LFE": map[string]float64{ "!": -6.793466, "#": -6.793466, @@ -96479,6 +97283,83 @@ var TokensLogProbabilities = map[string]map[string]float64{ "valid": -5.826000, "when": -5.826000, }, + "Microsoft Visual Studio Solution": map[string]float64{ + "(": -4.364222, + ")": -4.364222, + ",": -3.901598, + "-": -1.859897, + ".Debug": -3.939339, + ".Release": -3.939339, + "=": -2.879947, + "A": -3.285412, + "ABDA": -5.811141, + "AC": -5.811141, + "AD": -5.811141, + "AEAE": -5.811141, + "AFF": -7.197435, + "Any": -2.515304, + "B": -3.246192, + "BC": -5.811141, + "BCAB": -5.811141, + "BD": -5.811141, + "BDEA": -5.811141, + "BE": -5.811141, + "BEEB": -5.811141, + "BFBF": -5.811141, + "C": -2.906976, + "CA": -4.712529, + "CBF": -5.811141, + "CD": -5.117994, + "CF": -5.811141, + "CFF": -7.197435, + "CPU": -3.172084, + "CPU.ActiveCfg": -3.939339, + "CPU.Build.": -3.939339, + "D": -3.508556, + "DA": -5.811141, + "DB": -5.117994, + "DCD": -5.811141, + "DD": -5.811141, + "DDE": -5.811141, + "DFC": -5.811141, + "Debug": -3.865231, + "E": -3.305615, + "EA": -5.811141, + "EC": -5.117994, + "ECA": -5.811141, + "ECC": -5.811141, + "EDAB": -5.811141, + "EndGlobal": -7.197435, + "EndGlobalSection": -5.811141, + "EndProject": -4.632486, + "ExtensibilityGlobals": -7.197435, + "F": -5.811141, + "FALSE": -7.197435, + "FC": -5.811141, + "File": -7.197435, + "Format": -7.197435, + "Global": -7.197435, + "GlobalSection": -5.811141, + "HideSolutionNode": -7.197435, + "Microsoft": -7.197435, + "MinimumVisualStudioVersion": -7.197435, + "Project": -4.632486, + "ProjectConfigurationPlatforms": -7.197435, + "Release": -3.865231, + "Solution": -7.197435, + "SolutionConfigurationPlatforms": -7.197435, + "SolutionGuid": -7.197435, + "SolutionProperties": -7.197435, + "Studio": -7.197435, + "Version": -7.197435, + "Visual": -7.197435, + "VisualStudioVersion": -7.197435, + "postSolution": -6.504288, + "preSolution": -6.504288, + "{": -3.227143, + "|": -2.515304, + "}": -3.227143, + }, "Modelica": map[string]float64{ "(": -2.652625, ")": -2.654017, @@ -105978,496 +106859,528 @@ var TokensLogProbabilities = map[string]map[string]float64{ "~": -3.965564, }, "Nim": map[string]float64{ - "!": -6.802950, - "#": -5.704338, - "#buildTool": -8.189245, - "#copyExe": -8.189245, - "#define": -8.189245, - "#exec": -8.189245, - "#execCleanPath": -8.189245, - "#gcc.path": -8.189245, - "#hint": -8.189245, - "#passl": -8.189245, - "$": -6.579807, - "%": -5.356031, - "&": -3.689435, - "(": -2.207830, - ")": -2.251708, - "+": -7.496097, - ",": -3.107840, - "-": -6.802950, - ".": -6.802950, - "..": -8.189245, - ".add": -7.496097, - ".contains": -8.189245, - ".exe": -4.857040, - ".filterIt": -8.189245, - ".link": -6.802950, - ".mapconcat": -8.189245, - ".name.exe": -8.189245, - ".splitLines": -8.189245, - ".tail": -8.189245, - ".thVersion": -8.189245, - "/": -4.030361, - ":": -2.515921, - ";": -6.579807, - "<": -7.090632, - "<docOutBaseName>": -8.189245, - "<pkgName>": -8.189245, - "=": -2.439852, - ">": -6.579807, - "@": -8.189245, - "@elif": -6.802950, - "@else": -6.802950, - "@end": -5.011191, - "@if": -5.011191, - "CompileDate": -8.189245, - "CompileTime": -8.189245, - "ExeExt": -8.189245, - "HelpText": -7.496097, - "LineTooLong": -8.189245, - "PathSep": -7.496097, - "Posix": -8.189245, - "QuitFailure": -8.189245, - "QuitSuccess": -8.189245, - "T": -6.579807, - "Version": -8.189245, - "VersionAsString": -7.090632, - "XDeclaredButNotUsed": -7.496097, - "[": -4.931148, - "\\": -7.496097, - "]": -4.857040, - "_": -7.090632, - "`": -6.397485, - "a": -5.886659, - "a.len": -8.189245, - "amd": -7.090632, - "and": -5.704338, - "android": -8.189245, - "arch": -6.802950, - "args": -4.970369, - "args.len": -6.802950, - "args.startsWith": -8.189245, - "arm": -7.496097, - "arm.linux.gcc.exe": -8.189245, - "arm.linux.gcc.linkerexe": -8.189245, - "assertions": -8.189245, - "author": -8.189245, - "b": -7.496097, - "baseName": -7.496097, - "binFile": -6.397485, - "binOptimize": -7.496097, - "body": -6.802950, - "bool": -5.992020, - "boot": -7.496097, - "bootArgs": -7.496097, - "bootOptions": -8.189245, - "booting": -8.189245, - "bound_checks": -8.189245, - "break": -7.496097, - "bsd": -7.496097, - "buildDocs": -7.090632, - "buildExe": -7.090632, - "buildNimble": -6.802950, - "buildPdfDoc": -8.189245, - "buildScript": -6.397485, - "buildTool": -7.496097, - "buildTools": -7.090632, - "buildVccTool": -7.090632, - "bundleNimbleExe": -7.090632, - "bundleNimbleSrc": -7.090632, - "bundleNimsuggest": -6.579807, - "bundleWinTools": -6.802950, - "case": -6.579807, - "cc": -6.802950, - "changeFileExt": -8.189245, - "clang": -7.496097, - "clang.cpp.options.linker": -6.802950, - "clang.objc.options.linker": -7.496097, - "clang.options.always": -8.189245, - "clang.options.debug": -8.189245, - "clang.options.linker": -6.802950, - "clang.options.size": -8.189245, - "clang.options.speed": -8.189245, - "clean": -7.496097, - "cleanAux": -7.090632, - "cleanExt": -8.189245, - "cleanExt.contains": -8.189245, - "cmd": -6.243334, - "cmdArgument": -8.189245, - "cmdEnd": -8.189245, - "cmdLineRest": -7.090632, - "cmdLongOption": -8.189245, - "cmdShortOption": -8.189245, - "compileNimInst": -8.189245, - "const": -6.243334, - "copyDir": -8.189245, - "copyExe": -5.624295, - "copyFile": -6.243334, - "cpu": -8.189245, - "cryptoLibFile": -7.090632, - "cs": -8.189245, - "csource": -6.579807, - "csources": -8.189245, - "cwd": -7.496097, - "d": -6.109803, - "dead_code_elim": -8.189245, - "debugger": -8.189245, - "define": -6.579807, - "defined": -5.098202, - "deployDir": -6.397485, - "deployHtmlFile": -8.189245, - "deployIdxFile": -7.496097, - "deployJsFile": -7.496097, - "description": -8.189245, - "dest": -5.992020, - "destDir": -6.243334, - "dir": -6.243334, - "dirExists": -5.992020, - "dirName": -7.496097, - "discard": -7.090632, - "doAssert": -8.189245, - "doOptimize": -7.090632, - "docHackJsSource": -7.496097, - "docOutBaseName": -7.090632, - "docs": -8.189245, - "dollar": -7.496097, - "echo": -4.970369, - "elif": -8.189245, - "else": -4.970369, - "endsWith": -8.189245, - "ensureCleanGit": -7.496097, - "error": -6.802950, - "exec": -4.200260, - "execCleanPath": -6.243334, - "execProcess": -8.189245, - "execShellCmd": -8.189245, - "existsDir": -6.579807, - "existsEnv": -7.496097, - "existsFile": -5.416656, - "ext": -7.090632, - "extraSwitches": -7.090632, - "f": -6.243334, - "false": -6.109803, - "field_checks": -8.189245, - "fileExists": -8.189245, - "filename": -7.090632, - "filterIt": -8.189245, - "finalDest": -6.397485, - "finally": -6.579807, - "findExe": -7.090632, - "findNim": -8.189245, - "findStartNim": -7.496097, - "for": -5.791349, - "fpUserExec": -8.189245, - "freebsd": -7.496097, - "from": -6.579807, - "gaCode": -7.496097, - "gcc": -7.090632, - "gcc.cpp.exe": -7.496097, - "gcc.cpp.options.always": -6.802950, - "gcc.cpp.options.debug": -8.189245, - "gcc.cpp.options.linker": -6.802950, - "gcc.cpp.options.size": -8.189245, - "gcc.cpp.options.speed": -8.189245, - "gcc.exe": -7.496097, - "gcc.objc.options.linker": -7.496097, - "gcc.options.always": -6.802950, - "gcc.options.debug": -7.496097, - "gcc.options.linker": -6.579807, - "gcc.options.size": -8.189245, - "gcc.options.speed": -8.189245, - "gcc.path": -8.189245, - "genDocCmd": -7.496097, - "genTheIndexCmd": -7.496097, - "geninstall": -6.802950, - "genode": -8.189245, - "getAppDir": -7.496097, - "getCurrentDir": -6.397485, - "getEnv": -6.579807, - "getTempDir": -8.189245, - "haiku": -7.496097, - "hint": -7.496097, - "hostCpu": -8.189245, - "hostOs": -8.189245, - "i": -5.011191, - "i.thVersion": -7.496097, - "icl.options.always": -8.189245, - "icl.options.speed": -8.189245, - "id": -6.802950, - "if": -4.200260, - "ignore": -8.189245, - "ignore.contains": -8.189245, - "import": -6.243334, - "in": -5.550187, - "inc": -7.090632, - "inclFilePermissions": -8.189245, - "initOptParser": -8.189245, - "install": -7.496097, - "installDir": -6.109803, - "installLibreSsl": -8.189245, - "installOpenSsl": -8.189245, - "installPcre": -8.189245, - "int": -8.189245, - "isMainModule": -8.189245, - "it.endsWith": -8.189245, - "it.len": -8.189245, - "kind": -6.397485, - "kochdocs": -8.189245, - "latest": -5.098202, - "let": -4.931148, - "libreCryptoLibFile": -7.090632, - "libreSslArchiveFile": -6.802950, - "libreSslConfigureCmd": -8.189245, - "libreSslConfigureCmd.mapconcat": -8.189245, - "libreSslDownloadLink": -7.496097, - "libreSslIncludeDir": -7.090632, - "libreSslInstallDir": -6.802950, - "libreSslLibDir": -6.802950, - "libreSslLibFile": -6.802950, - "libreSslSourceDir": -6.579807, - "libreSslVersion": -7.090632, - "libressl": -6.802950, - "license": -8.189245, - "line_dir": -8.189245, - "linetrace": -8.189245, - "listFiles": -8.189245, - "llvm_gcc.cpp.options.linker": -8.189245, - "llvm_gcc.objc.options.linker": -7.496097, - "llvm_gcc.options.always": -8.189245, - "llvm_gcc.options.debug": -8.189245, - "llvm_gcc.options.linker": -8.189245, - "llvm_gcc.options.size": -8.189245, - "llvm_gcc.options.speed": -8.189245, - "macosx": -7.496097, - "macros": -8.189245, - "mapconcat": -8.189245, - "mips.linux.gcc.exe": -8.189245, - "mips.linux.gcc.linkerexe": -8.189245, - "mkDir": -8.189245, - "moveFile": -8.189245, - "musl": -7.496097, - "muslGccPath": -6.397485, - "name": -7.496097, - "netbsd": -8.189245, - "nilchecks": -8.189245, - "nim": -6.397485, - "nimArgs": -7.090632, - "nimArgsArray": -8.189245, - "nimArgsArray.mapconcat": -8.189245, - "nimFiles": -7.496097, - "nimFiles.add": -8.189245, - "nimFiles.len": -8.189245, - "nimHasNilChecks": -8.189245, - "nimbabel": -8.189245, - "nimblepath": -7.496097, - "nimcmd": -7.496097, - "nimcmd.add": -6.802950, - "nimexec": -5.011191, - "nimfix": -7.496097, - "nintendoswitch": -8.189245, - "noDocgen": -8.189245, - "normalize": -7.496097, - "not": -4.857040, - "nsis": -7.496097, - "numParams": -7.496097, - "obj_checks": -8.189245, - "of": -4.755257, - "off": -5.550187, - "old": -7.496097, - "oldCurrentDir": -7.496097, - "on": -6.579807, - "op": -7.090632, - "op.cmdLineRest": -5.416656, - "op.key": -7.496097, - "op.kind": -8.189245, - "op.next": -8.189245, - "openArray": -8.189245, - "openCryptoLibFile": -7.090632, - "openSslArchiveFile": -6.802950, - "openSslConfigureCmd": -8.189245, - "openSslConfigureCmd.mapconcat": -8.189245, - "openSslDownloadLink": -7.496097, - "openSslIncludeDir": -7.090632, - "openSslInstallDir": -6.802950, - "openSslLibDir": -6.802950, - "openSslLibFile": -6.802950, - "openSslSeedConfigOsCompiler": -7.496097, - "openSslSourceDir": -6.579807, - "openSslVersion": -7.090632, - "openbsd": -8.189245, - "openssl": -6.802950, - "opt": -8.189245, - "or": -5.481194, - "os": -8.189245, - "os.parseCmdLine": -8.189245, - "ospaths": -8.189245, - "osproc": -8.189245, - "osproc.execCmdEx": -8.189245, - "outp": -8.189245, - "outp.len": -8.189245, - "output": -5.992020, - "output.len": -8.189245, - "overflow_checks": -8.189245, - "overwriteFile": -7.090632, - "parallel_build": -8.189245, - "paramCount": -8.189245, - "paramStr": -7.090632, - "parseCmdLine": -8.189245, - "parseopt": -8.189245, - "partial": -8.189245, - "path": -4.723509, - "path.len": -8.189245, - "pattern": -7.496097, - "pcDir": -7.090632, - "pcFile": -8.189245, - "pcre": -8.189245, - "pcreArchiveFile": -6.802950, - "pcreConfigureCmd": -8.189245, - "pcreConfigureCmd.mapconcat": -8.189245, - "pcreDownloadLink": -7.496097, - "pcreIncludeDir": -7.496097, - "pcreInstallDir": -6.802950, - "pcreLibDir": -7.496097, - "pcreLibFile": -6.579807, - "pcreSourceDir": -6.579807, - "pcreVersion": -7.090632, - "pdf": -8.189245, - "pkgName": -6.802950, - "pointer": -7.496097, - "prevPath": -7.090632, - "proc": -4.451575, - "programArgs": -7.496097, - "programArgs.len": -8.189245, - "projectDir": -8.189245, - "pushCsources": -7.496097, - "putEnv": -6.109803, - "quick": -8.189245, - "quit": -6.397485, - "quoteShell": -7.090632, - "r": -6.109803, - "range_checks": -8.189245, - "release": -7.090632, - "removeDir": -7.090632, - "removeFile": -6.579807, - "removePattern": -7.090632, - "requires": -8.189245, - "result": -6.109803, - "result.add": -7.496097, - "return": -6.579807, - "root": -6.243334, - "root.splitPath": -8.189245, - "s": -6.802950, - "s.len": -8.189245, - "safeRemove": -7.090632, - "sameFileContent": -8.189245, - "sedCmd": -7.496097, - "selfExec": -6.397485, - "sep": -7.496097, - "seq": -7.496097, - "sequtils": -8.189245, - "setCommand": -7.090632, - "setCurrentDir": -6.397485, - "setCurrentdir": -8.189245, - "showHelp": -7.090632, - "sizeof": -7.496097, - "skipDirs": -8.189245, - "smartNimcache": -7.496097, - "source": -6.397485, - "speed": -8.189245, - "split": -8.189245, - "splitArgs": -7.496097, - "splitFile": -6.802950, - "splitPath": -7.496097, - "srcFile": -7.496097, - "sslIncludeDir": -7.090632, - "sslLibDir": -7.090632, - "sslLibFile": -7.090632, - "stable": -6.802950, - "stacktrace": -8.189245, - "status": -7.496097, - "streams": -8.189245, - "string": -4.633896, - "strutils": -7.090632, - "success": -7.496097, - "supp": -7.496097, - "switch": -5.550187, - "switch_gcc.cpp.options.always": -8.189245, - "switch_gcc.cpp.options.linker": -8.189245, - "switch_gcc.options.always": -8.189245, - "switch_gcc.options.linker": -8.189245, - "switches": -8.189245, - "switches.add": -8.189245, - "switches.mapconcat": -8.189245, - "symbol": -8.189245, - "system.NimVersion": -8.189245, - "t": -7.496097, - "task": -6.243334, - "tcc": -8.189245, - "tcc.options.always": -8.189245, - "tcc.options.linker": -7.090632, - "temp": -7.090632, - "template": -7.090632, - "termux": -8.189245, - "test": -8.189245, - "testDir": -7.090632, - "testFiles": -7.496097, - "testUnixInstall": -7.496097, - "tester": -7.090632, - "tests": -7.090632, - "thVersion": -7.496097, - "tlsEmulation": -6.802950, - "to": -8.189245, - "toolname": -7.496097, - "toolname.exe": -8.189245, - "tools": -8.189245, - "true": -5.992020, - "try": -6.579807, - "tryExec": -6.802950, - "unix": -8.189245, - "updated": -8.189245, - "useFork": -8.189245, - "useNodeIds": -8.189245, - "useStdoutAsStdmsg": -8.189245, - "valcmd": -7.496097, - "valcmd.add": -6.802950, - "valgrind": -7.496097, - "var": -5.416656, - "vcc": -7.496097, - "vcc.cpp.exe": -8.189245, - "vcc.cpp.linkerexe": -8.189245, - "vcc.cpp.options.always": -6.802950, - "vcc.cpp.options.debug": -8.189245, - "vcc.cpp.options.linker": -6.802950, - "vcc.cpp.options.size": -8.189245, - "vcc.cpp.options.speed": -8.189245, - "vcc.exe": -8.189245, - "vcc.linkerexe": -8.189245, - "vcc.options.always": -6.579807, - "vcc.options.debug": -8.189245, - "vcc.options.linker": -6.802950, - "vcc.options.size": -8.189245, - "vcc.options.speed": -8.189245, - "version": -7.496097, - "vxworks": -8.189245, - "walkDir": -7.090632, - "walkFiles": -8.189245, - "web": -8.189245, - "website": -8.189245, - "when": -5.011191, - "while": -6.802950, - "winRelease*": -8.189245, - "winReleaseArch": -7.090632, - "windows": -5.886659, - "withDir": -5.886659, - "withMingw": -7.496097, - "x": -6.802950, - "xtemp": -7.496097, - "xz": -7.090632, - "zip": -7.496097, - "{": -6.579807, - "|": -7.496097, - "}": -6.579807, + "!": -6.892388, + "#": -5.445469, + "##": -8.278682, + "#buildTool": -8.278682, + "#copyExe": -8.278682, + "#define": -8.278682, + "#exec": -8.278682, + "#execCleanPath": -8.278682, + "#gcc.path": -8.278682, + "#hint": -8.278682, + "#passl": -8.278682, + "$": -6.669244, + "%": -5.445469, + "&": -3.756894, + "'": -8.278682, + "(": -2.260089, + ")": -2.302331, + "*": -7.180070, + "+": -6.669244, + ",": -3.113896, + "-": -6.486923, + ".": -6.892388, + "..": -8.278682, + ".add": -7.585535, + ".contains": -8.278682, + ".dedent": -8.278682, + ".exe": -4.946478, + ".filterIt": -8.278682, + ".link": -6.892388, + ".mapconcat": -8.278682, + ".name.exe": -8.278682, + ".splitLines": -8.278682, + ".tail": -8.278682, + ".thVersion": -8.278682, + "/": -4.119799, + ":": -2.513491, + ";": -6.332772, + "<": -7.180070, + "<docOutBaseName>": -8.278682, + "<pkgName>": -8.278682, + "=": -2.387038, + ">": -6.669244, + "@": -7.585535, + "@elif": -6.892388, + "@else": -6.892388, + "@end": -5.100628, + "@if": -5.100628, + "CompileDate": -8.278682, + "CompileTime": -8.278682, + "ExeExt": -8.278682, + "F": -6.669244, + "HelpText": -7.585535, + "LineTooLong": -8.278682, + "PathSep": -7.585535, + "Posix": -8.278682, + "QuitFailure": -8.278682, + "QuitSuccess": -8.278682, + "RootRef": -8.278682, + "T": -5.506093, + "Version": -8.278682, + "VersionAsString": -7.180070, + "XDeclaredButNotUsed": -7.585535, + "[": -4.782175, + "\\": -7.585535, + "]": -4.723334, + "_": -7.180070, + "`": -5.793776, + "a": -5.100628, + "a.len": -8.278682, + "amd": -7.180070, + "and": -5.793776, + "android": -8.278682, + "arch": -6.892388, + "args": -5.059806, + "args.len": -6.892388, + "args.startsWith": -8.278682, + "arm": -7.585535, + "arm.linux.gcc.exe": -8.278682, + "arm.linux.gcc.linkerexe": -8.278682, + "assert": -7.180070, + "assertions": -8.278682, + "author": -8.278682, + "b": -5.793776, + "baseName": -7.585535, + "big": -8.278682, + "binFile": -6.486923, + "binOptimize": -7.585535, + "block": -6.669244, + "body": -6.892388, + "bool": -6.081458, + "boot": -7.585535, + "bootArgs": -7.585535, + "bootOptions": -8.278682, + "booting": -8.278682, + "bound_checks": -8.278682, + "break": -7.585535, + "bsd": -7.585535, + "buildDocs": -7.180070, + "buildExe": -7.180070, + "buildNimble": -6.892388, + "buildPdfDoc": -8.278682, + "buildScript": -6.486923, + "buildTool": -7.585535, + "buildTools": -7.180070, + "buildVccTool": -7.180070, + "bundleNimbleExe": -7.180070, + "bundleNimbleSrc": -7.180070, + "bundleNimsuggest": -6.669244, + "bundleWinTools": -6.892388, + "c": -6.081458, + "case": -6.669244, + "cast": -8.278682, + "cc": -6.892388, + "changeFileExt": -8.278682, + "char": -8.278682, + "clang": -7.585535, + "clang.cpp.options.linker": -6.892388, + "clang.objc.options.linker": -7.585535, + "clang.options.always": -8.278682, + "clang.options.debug": -8.278682, + "clang.options.linker": -6.892388, + "clang.options.size": -8.278682, + "clang.options.speed": -8.278682, + "clean": -7.585535, + "cleanAux": -7.180070, + "cleanExt": -8.278682, + "cleanExt.contains": -8.278682, + "cmd": -6.332772, + "cmdArgument": -8.278682, + "cmdEnd": -8.278682, + "cmdLineRest": -7.180070, + "cmdLongOption": -8.278682, + "cmdShortOption": -8.278682, + "compileNimInst": -8.278682, + "const": -6.081458, + "copyDir": -8.278682, + "copyExe": -5.713733, + "copyFile": -6.332772, + "cpu": -8.278682, + "cryptoLibFile": -7.180070, + "cs": -8.278682, + "csource": -6.669244, + "csources": -8.278682, + "cwd": -7.585535, + "d": -5.793776, + "dead_code_elim": -8.278682, + "debugger": -8.278682, + "define": -6.669244, + "defined": -5.187640, + "deployDir": -6.486923, + "deployHtmlFile": -8.278682, + "deployIdxFile": -7.585535, + "deployJsFile": -7.585535, + "description": -8.278682, + "dest": -6.081458, + "destDir": -6.332772, + "dir": -6.332772, + "dirExists": -6.081458, + "dirName": -7.585535, + "discard": -5.639625, + "doAssert": -8.278682, + "doOptimize": -7.180070, + "docHackJsSource": -7.585535, + "docOutBaseName": -7.180070, + "docs": -8.278682, + "dollar": -7.585535, + "e": -7.180070, + "echo": -5.020586, + "elif": -8.278682, + "else": -5.059806, + "endsWith": -8.278682, + "ensureCleanGit": -7.585535, + "enum": -8.278682, + "error": -6.892388, + "exec": -4.289698, + "execCleanPath": -6.332772, + "execProcess": -8.278682, + "execShellCmd": -8.278682, + "existsDir": -6.669244, + "existsEnv": -7.585535, + "existsFile": -5.506093, + "ext": -7.180070, + "extraSwitches": -7.180070, + "f": -5.976097, + "false": -6.199241, + "field_checks": -8.278682, + "fileExists": -8.278682, + "filename": -7.180070, + "filterIt": -8.278682, + "finalDest": -6.486923, + "finally": -6.669244, + "findExe": -7.180070, + "findNim": -8.278682, + "findStartNim": -7.585535, + "float": -6.892388, + "fn": -5.713733, + "foo.bar": -8.278682, + "for": -5.880787, + "fpUserExec": -8.278682, + "freebsd": -7.585535, + "from": -6.669244, + "g": -8.278682, + "gaCode": -7.585535, + "gcc": -7.180070, + "gcc.cpp.exe": -7.585535, + "gcc.cpp.options.always": -6.892388, + "gcc.cpp.options.debug": -8.278682, + "gcc.cpp.options.linker": -6.892388, + "gcc.cpp.options.size": -8.278682, + "gcc.cpp.options.speed": -8.278682, + "gcc.exe": -7.585535, + "gcc.objc.options.linker": -7.585535, + "gcc.options.always": -6.892388, + "gcc.options.debug": -7.585535, + "gcc.options.linker": -6.669244, + "gcc.options.size": -8.278682, + "gcc.options.speed": -8.278682, + "gcc.path": -8.278682, + "genDocCmd": -7.585535, + "genTheIndexCmd": -7.585535, + "geninstall": -6.892388, + "genode": -8.278682, + "getAppDir": -7.585535, + "getCurrentDir": -6.486923, + "getEnv": -6.669244, + "getTempDir": -8.278682, + "h": -8.278682, + "haiku": -7.585535, + "hello": -8.278682, + "hint": -7.585535, + "hostCpu": -8.278682, + "hostOs": -8.278682, + "i": -5.059806, + "i.thVersion": -7.585535, + "icl.options.always": -8.278682, + "icl.options.speed": -8.278682, + "id": -6.892388, + "if": -4.289698, + "ignore": -8.278682, + "ignore.contains": -8.278682, + "import": -6.332772, + "in": -5.639625, + "inc": -7.180070, + "inclFilePermissions": -8.278682, + "initOptParser": -8.278682, + "install": -7.585535, + "installDir": -6.199241, + "installLibreSsl": -8.278682, + "installOpenSsl": -8.278682, + "installPcre": -8.278682, + "int": -6.081458, + "isMainModule": -8.278682, + "it.endsWith": -8.278682, + "it.len": -8.278682, + "iterator": -8.278682, + "j": -8.278682, + "k": -8.278682, + "kind": -6.486923, + "kochdocs": -8.278682, + "latest": -5.187640, + "let": -4.450041, + "libreCryptoLibFile": -7.180070, + "libreSslArchiveFile": -6.892388, + "libreSslConfigureCmd": -8.278682, + "libreSslConfigureCmd.mapconcat": -8.278682, + "libreSslDownloadLink": -7.585535, + "libreSslIncludeDir": -7.180070, + "libreSslInstallDir": -6.892388, + "libreSslLibDir": -6.892388, + "libreSslLibFile": -6.892388, + "libreSslSourceDir": -6.669244, + "libreSslVersion": -7.180070, + "libressl": -6.892388, + "license": -8.278682, + "line_dir": -8.278682, + "linetrace": -8.278682, + "listFiles": -8.278682, + "llvm_gcc.cpp.options.linker": -8.278682, + "llvm_gcc.objc.options.linker": -7.585535, + "llvm_gcc.options.always": -8.278682, + "llvm_gcc.options.debug": -8.278682, + "llvm_gcc.options.linker": -8.278682, + "llvm_gcc.options.size": -8.278682, + "llvm_gcc.options.speed": -8.278682, + "macosx": -7.585535, + "macro": -8.278682, + "macros": -8.278682, + "mapconcat": -8.278682, + "mips.linux.gcc.exe": -8.278682, + "mips.linux.gcc.linkerexe": -8.278682, + "mkDir": -8.278682, + "moveFile": -8.278682, + "musl": -7.585535, + "muslGccPath": -6.486923, + "name": -7.585535, + "netbsd": -8.278682, + "nilchecks": -8.278682, + "nim": -6.486923, + "nimArgs": -7.180070, + "nimArgsArray": -8.278682, + "nimArgsArray.mapconcat": -8.278682, + "nimFiles": -7.585535, + "nimFiles.add": -8.278682, + "nimFiles.len": -8.278682, + "nimHasNilChecks": -8.278682, + "nimbabel": -8.278682, + "nimblepath": -7.585535, + "nimcmd": -7.585535, + "nimcmd.add": -6.892388, + "nimexec": -5.100628, + "nimfix": -7.585535, + "nintendoswitch": -8.278682, + "noDocgen": -8.278682, + "normalize": -7.585535, + "not": -4.946478, + "nsis": -7.585535, + "numParams": -7.585535, + "obj_checks": -8.278682, + "object": -8.278682, + "of": -4.812946, + "off": -5.639625, + "old": -7.585535, + "oldCurrentDir": -7.585535, + "on": -6.669244, + "op": -7.180070, + "op.cmdLineRest": -5.506093, + "op.key": -7.585535, + "op.kind": -8.278682, + "op.next": -8.278682, + "openArray": -8.278682, + "openCryptoLibFile": -7.180070, + "openSslArchiveFile": -6.892388, + "openSslConfigureCmd": -8.278682, + "openSslConfigureCmd.mapconcat": -8.278682, + "openSslDownloadLink": -7.585535, + "openSslIncludeDir": -7.180070, + "openSslInstallDir": -6.892388, + "openSslLibDir": -6.892388, + "openSslLibFile": -6.892388, + "openSslSeedConfigOsCompiler": -7.585535, + "openSslSourceDir": -6.669244, + "openSslVersion": -7.180070, + "openbsd": -8.278682, + "openssl": -6.892388, + "opt": -8.278682, + "or": -5.570632, + "os": -8.278682, + "os.parseCmdLine": -8.278682, + "ospaths": -8.278682, + "osproc": -8.278682, + "osproc.execCmdEx": -8.278682, + "outp": -8.278682, + "outp.len": -8.278682, + "output": -6.081458, + "output.len": -8.278682, + "overflow_checks": -8.278682, + "overwriteFile": -7.180070, + "parallel_build": -8.278682, + "paramCount": -8.278682, + "paramStr": -7.180070, + "parseCmdLine": -8.278682, + "parseopt": -8.278682, + "partial": -8.278682, + "path": -4.812946, + "path.len": -8.278682, + "pattern": -7.585535, + "pcDir": -7.180070, + "pcFile": -8.278682, + "pcre": -8.278682, + "pcreArchiveFile": -6.892388, + "pcreConfigureCmd": -8.278682, + "pcreConfigureCmd.mapconcat": -8.278682, + "pcreDownloadLink": -7.585535, + "pcreIncludeDir": -7.585535, + "pcreInstallDir": -6.892388, + "pcreLibDir": -7.585535, + "pcreLibFile": -6.669244, + "pcreSourceDir": -6.669244, + "pcreVersion": -7.180070, + "pdf": -8.278682, + "pkgName": -6.892388, + "pointer": -7.585535, + "prevPath": -7.180070, + "proc": -4.327438, + "programArgs": -7.585535, + "programArgs.len": -8.278682, + "projectDir": -8.278682, + "pushCsources": -7.585535, + "putEnv": -6.199241, + "quick": -8.278682, + "quit": -6.486923, + "quoteShell": -7.180070, + "r": -6.081458, + "range_checks": -8.278682, + "ref": -7.585535, + "release": -7.180070, + "removeDir": -7.180070, + "removeFile": -6.669244, + "removePattern": -7.180070, + "requires": -8.278682, + "result": -6.199241, + "result.add": -7.585535, + "return": -6.669244, + "root": -6.332772, + "root.splitPath": -8.278682, + "runnableExamples": -6.892388, + "s": -6.892388, + "s.len": -8.278682, + "safeRemove": -7.180070, + "sameFileContent": -8.278682, + "sedCmd": -7.585535, + "selfExec": -6.486923, + "sep": -7.585535, + "seq": -7.585535, + "sequtils": -8.278682, + "setCommand": -7.180070, + "setCurrentDir": -6.486923, + "setCurrentdir": -8.278682, + "showHelp": -7.180070, + "sizeof": -7.585535, + "skipDirs": -8.278682, + "smartNimcache": -7.585535, + "source": -6.486923, + "speed": -8.278682, + "split": -8.278682, + "splitArgs": -7.585535, + "splitFile": -6.892388, + "splitPath": -7.585535, + "srcFile": -7.585535, + "sslIncludeDir": -7.180070, + "sslLibDir": -7.180070, + "sslLibFile": -7.180070, + "stable": -6.892388, + "stacktrace": -8.278682, + "status": -7.585535, + "streams": -8.278682, + "string": -4.641096, + "strutils": -7.180070, + "success": -7.585535, + "supp": -7.585535, + "switch": -5.639625, + "switch_gcc.cpp.options.always": -8.278682, + "switch_gcc.cpp.options.linker": -8.278682, + "switch_gcc.options.always": -8.278682, + "switch_gcc.options.linker": -8.278682, + "switches": -8.278682, + "switches.add": -8.278682, + "switches.mapconcat": -8.278682, + "symbol": -8.278682, + "system.NimVersion": -8.278682, + "t": -7.585535, + "task": -6.332772, + "tcc": -8.278682, + "tcc.options.always": -8.278682, + "tcc.options.linker": -7.180070, + "temp": -7.180070, + "template": -6.669244, + "termux": -8.278682, + "test": -8.278682, + "testDir": -7.180070, + "testFiles": -7.585535, + "testUnixInstall": -7.585535, + "tester": -7.180070, + "tests": -7.180070, + "thVersion": -7.585535, + "tlsEmulation": -6.892388, + "to": -8.278682, + "toolname": -7.585535, + "toolname.exe": -8.278682, + "tools": -8.278682, + "true": -6.081458, + "try": -6.669244, + "tryExec": -6.892388, + "tuple": -8.278682, + "type": -7.180070, + "unix": -8.278682, + "updated": -8.278682, + "useFork": -8.278682, + "useNodeIds": -8.278682, + "useStdoutAsStdmsg": -8.278682, + "valcmd": -7.585535, + "valcmd.add": -6.892388, + "valgrind": -7.585535, + "var": -5.445469, + "vcc": -7.585535, + "vcc.cpp.exe": -8.278682, + "vcc.cpp.linkerexe": -8.278682, + "vcc.cpp.options.always": -6.892388, + "vcc.cpp.options.debug": -8.278682, + "vcc.cpp.options.linker": -6.892388, + "vcc.cpp.options.size": -8.278682, + "vcc.cpp.options.speed": -8.278682, + "vcc.exe": -8.278682, + "vcc.linkerexe": -8.278682, + "vcc.options.always": -6.669244, + "vcc.options.debug": -8.278682, + "vcc.options.linker": -6.892388, + "vcc.options.size": -8.278682, + "vcc.options.speed": -8.278682, + "version": -7.585535, + "vxworks": -8.278682, + "walkDir": -7.180070, + "walkFiles": -8.278682, + "web": -8.278682, + "website": -8.278682, + "when": -5.100628, + "while": -6.892388, + "winRelease*": -8.278682, + "winReleaseArch": -7.180070, + "windows": -5.976097, + "withDir": -5.976097, + "withMingw": -7.585535, + "world": -8.278682, + "wrap": -8.278682, + "x": -6.199241, + "xtemp": -7.585535, + "xz": -7.180070, + "yield": -8.278682, + "zip": -7.585535, + "{": -6.669244, + "|": -7.585535, + "}": -6.669244, }, "Nit": map[string]float64{ "!": -5.921812, @@ -140932,2276 +141845,246 @@ var TokensLogProbabilities = map[string]map[string]float64{ "~": -6.775366, }, "Record Jar": map[string]float64{ - "%": -2.563161, - "(": -5.589665, - ")": -5.589665, - ",": -6.688277, - "-": -1.759213, - ":": -1.358279, - "A": -8.767718, - "Aari": -9.460866, - "Abinomn": -9.460866, - "Abipon": -9.460866, - "Abishira": -9.460866, - "Abkhazian": -9.460866, - "Aborigines": -9.460866, - "Abu": -8.767718, - "Acheron": -9.460866, - "Achi": -9.460866, - "Achterhoeks": -9.460866, - "Achuar": -9.460866, - "Achumawi": -9.460866, - "Acro": -9.460866, - "Adamorobe": -9.460866, - "Adang": -9.460866, - "Adangbe": -9.460866, - "Adangme": -9.460866, - "Adap": -9.460866, - "Added": -2.564171, - "Adele": -9.460866, - "Adeni": -9.460866, - "Adhola": -9.460866, - "Adi": -9.460866, - "Adioukrou": -9.460866, - "Adnyamathanha": -9.460866, - "Adonara": -9.460866, - "Aduge": -9.460866, - "Adygei": -9.460866, - "Adyghe": -9.460866, - "Adzera": -9.460866, - "Aeka": -9.460866, - "Aekyom": -9.460866, - "Aer": -9.460866, - "Afar": -9.460866, - "Afghan": -9.460866, - "Afitti": -9.460866, - "African": -9.460866, - "Afrihili": -9.460866, - "Afrikaans": -9.460866, - "Afro": -8.767718, - "Agarabi": -9.460866, - "Agariya": -9.460866, - "Agatu": -9.460866, - "Agavotaguerra": -9.460866, - "Aghem": -9.460866, - "Aghu": -9.460866, - "Aghul": -9.460866, - "Agi": -9.460866, - "Agta": -7.851428, - "Aguacateco": -9.460866, - "Aguano": -9.460866, - "Aguaruna": -9.460866, - "Aguna": -9.460866, - "Agutaynen": -9.460866, - "Ahanta": -9.460866, - "Ahirani": -9.460866, - "Ahom": -9.460866, - "Ahtena": -9.460866, - "Ai": -9.460866, - "Aighon": -9.460866, - "Aimaq": -9.460866, - "Aimele": -9.460866, - "Aimol": -9.460866, - "Ainbai": -9.460866, - "Ainu": -8.767718, - "Aiome": -9.460866, - "Airoran": -9.460866, - "Aiton": -9.460866, - "Aizi": -8.362253, - "Aja": -8.767718, - "Ajawa": -9.460866, - "Aji": -9.460866, - "Ak": -9.460866, - "Aka": -8.074571, - "Akan": -9.460866, - "Akaselem": -9.460866, - "Akawaio": -9.460866, - "Ake": -9.460866, - "Akeu": -9.460866, - "Akha": -9.460866, - "Akhvakh": -9.460866, - "Akkadian": -9.460866, - "Aklanon": -9.460866, - "Akolet": -9.460866, - "Akoose": -9.460866, - "Akpa": -9.460866, - "Akrukay": -9.460866, - "Akuku": -9.460866, - "Akum": -9.460866, - "Akuntsu": -9.460866, - "Akurio": -9.460866, - "Akwa": -9.460866, - "Alaba": -9.460866, - "Alabama": -9.460866, - "Alacalufan": -9.460866, - "Alago": -9.460866, - "Alak": -9.460866, - "Alangan": -9.460866, - "Alapmunte": -9.460866, - "Alas": -9.460866, - "Alawa": -9.460866, - "Albanian": -8.074571, - "Albay": -9.460866, - "Alege": -9.460866, - "Aleut": -9.460866, - "Algerian": -8.767718, - "Algic": -9.460866, - "Algonquian": -9.460866, - "Algonquin": -9.460866, - "Ali": -9.460866, - "Alladian": -9.460866, - "Allar": -9.460866, - "Alngith": -9.460866, - "Alsea": -9.460866, - "Alta": -8.767718, - "Altai": -8.767718, - "Alugu": -9.460866, - "Alumu": -9.460866, - "Alune": -9.460866, - "Alur": -9.460866, - "Alutor": -9.460866, - "Alviri": -9.460866, - "Alyawarr": -9.460866, - "Amahuaca": -9.460866, - "Amaimon": -9.460866, - "Amal": -9.460866, - "Amanay": -9.460866, - "Amara": -9.460866, - "Amazonas": -9.460866, - "Ambakich": -9.460866, - "Ambele": -9.460866, - "Amblong": -9.460866, - "Ambo": -9.460866, - "Ambrak": -9.460866, - "Ambul": -9.460866, - "Amdo": -9.460866, - "Amele": -9.460866, - "American": -9.460866, - "Amharic": -9.460866, - "Amis": -9.460866, - "Amol": -9.460866, - "Ampanang": -9.460866, - "Ampari": -9.460866, - "Amri": -9.460866, - "Amundava": -9.460866, - "Amuzgo": -8.767718, - "Amuzgos": -9.460866, - "Anakalangu": -9.460866, - "Anasi": -9.460866, - "Andai": -9.460866, - "Andajin": -9.460866, - "Andegerebinha": -9.460866, - "Aneityum": -9.460866, - "Angaataha": -9.460866, - "Angait": -9.460866, - "Angal": -8.767718, - "Angkamuthi": -9.460866, - "Angkola": -9.460866, - "Angor": -9.460866, - "Anguthimri": -9.460866, - "Antigua": -9.460866, - "Anuki": -9.460866, - "Anus": -9.460866, - "Anuta": -9.460866, - "Apache": -7.851428, - "Apala": -9.460866, - "Apatani": -9.460866, - "Apiak": -9.460866, - "Apinay": -9.460866, - "Apma": -9.460866, - "Aproumu": -9.460866, - "Apurin": -9.460866, - "Aputai": -9.460866, - "Ar": -9.460866, - "Arab": -8.074571, - "Arabana": -9.460866, - "Arabela": -9.460866, - "Arabic": -6.241990, - "Aragonese": -9.460866, - "Araki": -9.460866, - "Aralle": -9.460866, - "Aramaic": -7.851428, - "Aranadan": -9.460866, - "Aranda": -9.460866, - "Araona": -9.460866, - "Arapaho": -9.460866, - "Arapaso": -9.460866, - "Arauan": -9.460866, - "Araw": -9.460866, - "Arawak": -9.460866, - "Arawakan": -9.460866, - "Arawet": -9.460866, - "Arawum": -9.460866, - "Arb": -9.460866, - "Arbore": -9.460866, - "Archi": -9.460866, - "Areba": -9.460866, - "Arem": -9.460866, - "Argentine": -9.460866, - "Argobba": -9.460866, - "Arguni": -9.460866, - "Arh": -9.460866, - "Arhe": -9.460866, - "Arhuaco": -9.460866, - "Ari": -9.460866, - "Arigidi": -9.460866, - "Arikap": -9.460866, - "Arikara": -9.460866, - "Arikem": -9.460866, - "Armenian": -8.362253, - "Armn": -9.460866, - "Arop": -8.767718, - "Arosi": -9.460866, - "Arrarnta": -9.460866, - "Arrernte": -9.460866, - "Arta": -9.460866, - "Artificial": -9.460866, - "Aru": -8.767718, - "Aruek": -9.460866, - "Arutani": -9.460866, - "As": -9.460866, - "Asas": -9.460866, - "Ashe": -9.460866, - "Ashkun": -9.460866, - "Ashtiani": -9.460866, - "Asiatic": -9.460866, - "Asilulu": -9.460866, - "Asmat": -8.767718, - "Asoa": -9.460866, - "Assamese": -9.460866, - "Assiniboine": -9.460866, - "Association": -9.460866, - "Assyrian": -9.460866, - "Asturian": -9.460866, - "Asturleonese": -9.460866, - "Asu": -8.767718, - "Asumboa": -9.460866, - "Asuri": -9.460866, - "Asurin": -9.460866, - "Asurini": -9.460866, - "Ata": -8.362253, - "Atakapa": -9.460866, - "Atauran": -9.460866, - "Atemble": -9.460866, - "Athapascan": -9.460866, - "Athpariya": -9.460866, - "Ati": -9.460866, - "Atikamekw": -9.460866, - "Atlantic": -9.460866, - "Atohwaim": -9.460866, - "Atong": -9.460866, - "Atroari": -9.460866, - "Atsahuaca": -9.460866, - "Atsugewi": -9.460866, - "Atta": -8.362253, - "Atti": -9.460866, - "Au": -9.460866, - "Aulua": -9.460866, - "Aur": -9.460866, - "Aushi": -9.460866, - "Aushiri": -9.460866, - "Auslan": -9.460866, - "Austral": -9.460866, - "Australian": -8.362253, - "Austrian": -9.460866, - "Auxiliary": -9.460866, - "Auye": -9.460866, - "Auyokawa": -9.460866, - "Av": -9.460866, - "Avaric": -9.460866, - "Avatime": -9.460866, - "Avau": -9.460866, - "Avestan": -9.460866, - "Avikam": -9.460866, - "Avokaya": -9.460866, - "Awa": -9.460866, - "Awabakal": -9.460866, - "Awadhi": -9.460866, - "Awak": -9.460866, - "Awar": -9.460866, - "Awara": -9.460866, - "Awbono": -9.460866, - "Awera": -9.460866, - "Awet": -9.460866, - "Awing": -9.460866, - "Awiyaana": -9.460866, - "Awjilah": -9.460866, - "Awngi": -9.460866, - "Awun": -9.460866, - "Awutu": -9.460866, - "Awyi": -9.460866, - "Awyu": -8.074571, - "Axamb": -9.460866, - "Ayabadhu": -9.460866, - "Ayere": -9.460866, - "Ayerrerenge": -9.460866, - "Ayi": -8.767718, - "Ayizo": -9.460866, - "Aymara": -8.362253, - "Ayoreo": -9.460866, - "Ayta": -8.362253, - "Ayu": -9.460866, - "Azerbaijani": -8.362253, - "Azha": -9.460866, - "Aztecan": -9.460866, - "B": -8.362253, - "BCE": -8.767718, - "Ba": -9.460866, - "Baan": -9.460866, - "Baangi": -9.460866, - "Baatonum": -9.460866, - "Babatana": -9.460866, - "Bable": -9.460866, - "Bacanese": -9.460866, - "Bada": -8.767718, - "Badaga": -9.460866, - "Badimaya": -9.460866, - "Badui": -9.460866, - "Baeggu": -9.460866, - "Baelelea": -9.460866, - "Baetora": -9.460866, - "Bafanji": -9.460866, - "Bafaw": -9.460866, - "Bafut": -9.460866, - "Baga": -7.851428, - "Bagheli": -9.460866, - "Bago": -9.460866, - "Bagri": -9.460866, - "Bagusa": -9.460866, - "Bahamas": -9.460866, - "Bahau": -9.460866, - "Bahinemo": -9.460866, - "Bahing": -9.460866, - "Bahonsuai": -9.460866, - "Bai": -8.362253, - "Baibai": -9.460866, - "Baima": -9.460866, - "Bainouk": -9.460866, - "Baiso": -9.460866, - "Bajan": -9.460866, - "Bajelani": -9.460866, - "Baka": -9.460866, - "Bakaka": -9.460866, - "Bakhtiari": -9.460866, - "Baki": -9.460866, - "Bakoko": -9.460866, - "Bakw": -9.460866, - "Balanta": -9.460866, - "Balinese": -9.460866, - "Balkan": -9.460866, - "Balo": -9.460866, - "Balochi": -8.767718, - "Baloi": -9.460866, - "Balong": -9.460866, - "Balti": -9.460866, - "Baltic": -9.460866, - "Baluchi": -9.460866, - "Bambara": -9.460866, - "Bambili": -9.460866, - "Bambui": -9.460866, - "Bamileke": -9.460866, - "Bamukumbit": -9.460866, - "Bamun": -9.460866, - "Bamunka": -9.460866, - "Ban": -9.460866, - "Banao": -9.460866, - "Banda": -7.851428, - "Bandial": -9.460866, - "Bandjigali": -9.460866, - "Bangala": -9.460866, - "Bangandu": -9.460866, - "Bangba": -9.460866, - "Banggai": -9.460866, - "Banggarla": -9.460866, - "Bangla": -9.460866, - "Bangolan": -9.460866, - "Bangwinji": -9.460866, - "Baniva": -9.460866, - "Baniwa": -9.460866, - "Banjar": -9.460866, - "Bankagooma": -9.460866, - "Bantawa": -9.460866, - "Bantayanon": -9.460866, - "Bar": -9.460866, - "Bara": -9.460866, - "Baraamu": -9.460866, - "Barai": -9.460866, - "Barakai": -9.460866, - "Barama": -9.460866, - "Barambu": -9.460866, - "Barapasi": -9.460866, - "Baras": -9.460866, - "Barasana": -9.460866, - "Barbuda": -9.460866, - "Barein": -9.460866, - "Bareli": -8.362253, - "Bari": -9.460866, - "Bariji": -9.460866, - "Barikanchi": -9.460866, - "Barok": -9.460866, - "Barombi": -9.460866, - "Barrow": -9.460866, - "Baruga": -9.460866, - "Barwe": -9.460866, - "Barzani": -9.460866, - "Basa": -8.362253, - "Bashkardi": -9.460866, - "Bashkir": -9.460866, - "Basketo": -9.460866, - "Basque": -9.460866, - "Bassa": -8.767718, - "Bassari": -9.460866, - "Bassossi": -9.460866, - "Bata": -9.460866, - "Batak": -7.381424, - "Batek": -9.460866, - "Bateri": -9.460866, - "Bathari": -9.460866, - "Bati": -8.767718, - "Batu": -9.460866, - "Batuley": -9.460866, - "Bau": -9.460866, - "Bauchi": -9.460866, - "Baure": -9.460866, - "Bauria": -9.460866, - "Bauwaki": -9.460866, - "Bauzi": -9.460866, - "Bavarian": -9.460866, - "Bawah": -9.460866, - "Bawm": -9.460866, - "Bayali": -9.460866, - "Baybayanon": -9.460866, - "Bayungu": -9.460866, - "Bazigar": -9.460866, - "Beami": -9.460866, - "Beba": -9.460866, - "Bebeli": -9.460866, - "Bebil": -9.460866, - "Bedawi": -9.460866, - "Bedawiyet": -9.460866, - "Bedjond": -9.460866, - "Beeke": -9.460866, - "Beele": -9.460866, - "Beembe": -9.460866, - "Begbere": -9.460866, - "Beja": -9.460866, - "Belanda": -8.767718, - "Belarusian": -9.460866, - "Beli": -9.460866, - "Bellari": -9.460866, - "Bemba": -9.460866, - "Bena": -9.460866, - "Bendi": -9.460866, - "Beng": -8.767718, - "Bengali": -9.460866, - "Benggoi": -9.460866, - "Bengkala": -9.460866, - "Benin": -8.767718, - "Beothuk": -9.460866, - "Bepour": -9.460866, - "Berakou": -9.460866, - "Berau": -9.460866, - "Berber": -9.460866, - "Berbice": -9.460866, - "Berik": -9.460866, - "Berinomo": -9.460866, - "Besi": -9.460866, - "Besme": -9.460866, - "Besoa": -9.460866, - "Betaf": -9.460866, - "Betawi": -9.460866, - "Bete": -9.460866, - "Beti": -9.460866, - "Betsimisaraka": -9.460866, - "Bhadrawahi": -9.460866, - "Bhalay": -9.460866, - "Bharia": -9.460866, - "Bhatola": -9.460866, - "Bhatri": -9.460866, - "Bhattiyali": -9.460866, - "Bhaya": -9.460866, - "Bhele": -9.460866, - "Bhilali": -9.460866, - "Bhili": -9.460866, - "Bhojpuri": -9.460866, - "Bhunjia": -9.460866, - "Biafada": -9.460866, - "Biak": -9.460866, - "Bian": -9.460866, - "Biangai": -9.460866, - "Biao": -9.460866, - "Biatah": -9.460866, - "Bicolano": -9.460866, - "Bidayuh": -9.460866, - "Bidiyo": -9.460866, - "Bidyogo": -9.460866, - "Bieria": -9.460866, - "Biete": -9.460866, - "Biga": -9.460866, - "Bihari": -9.460866, - "Bijim": -9.460866, - "Bijori": -9.460866, - "Bikaru": -9.460866, - "Bikol": -8.767718, - "Bila": -9.460866, - "Bilakura": -9.460866, - "Bilba": -9.460866, - "Bilbil": -9.460866, - "Bile": -9.460866, - "Bilur": -9.460866, - "Bima": -9.460866, - "Bimin": -9.460866, - "Bimoba": -9.460866, - "Binahari": -9.460866, - "Binandere": -9.460866, - "Bini": -9.460866, - "Binukid": -9.460866, - "Binumarien": -9.460866, - "Bipi": -9.460866, - "Bipim": -9.460866, - "Bira": -9.460866, - "Birale": -9.460866, - "Birao": -9.460866, - "Birgit": -9.460866, - "Birhor": -9.460866, - "Birifor": -8.767718, - "Biritai": -9.460866, - "Birked": -9.460866, - "Birri": -9.460866, - "Birwa": -9.460866, - "Bisa": -9.460866, - "Bisaya": -8.767718, - "Bishnupriya": -9.460866, - "Bishuo": -9.460866, - "Bislama": -9.460866, - "Bisorio": -9.460866, - "Bissa": -9.460866, - "Bit": -9.460866, - "Bitare": -9.460866, - "Biwat": -9.460866, - "Biyom": -9.460866, - "Blaan": -8.767718, - "Blafe": -9.460866, - "Blagar": -9.460866, - "Bo": -8.362253, - "Bobo": -9.460866, - "Bobongko": -9.460866, - "Bobot": -9.460866, - "Bodo": -9.460866, - "Bofi": -9.460866, - "Boga": -9.460866, - "Boghom": -9.460866, - "Boguru": -9.460866, - "Bohtan": -9.460866, - "Bokm": -9.460866, - "Boko": -9.460866, - "Bokobaru": -9.460866, - "Bolgo": -9.460866, - "Bolivian": -9.460866, - "Bomboma": -9.460866, - "Bondo": -9.460866, - "Bongili": -9.460866, - "Bongu": -9.460866, - "Bonkeng": -9.460866, - "Boo": -9.460866, - "Boor": -9.460866, - "Bor": -9.460866, - "Borna": -8.767718, - "Boro": -9.460866, - "Boruca": -9.460866, - "Boselewa": -9.460866, - "Bosngun": -9.460866, - "Bosnian": -9.460866, - "Brahui": -9.460866, - "Braj": -9.460866, - "Brat": -9.460866, - "Brazil": -9.460866, - "Brem": -9.460866, - "Breri": -9.460866, - "Breton": -9.460866, - "British": -9.460866, - "Brokkat": -9.460866, - "Brokskat": -9.460866, - "Broome": -9.460866, - "Bru": -8.767718, - "Brunei": -9.460866, - "Bu": -9.460866, - "Bua": -9.460866, - "Bube": -9.460866, - "Bubi": -9.460866, - "Budibud": -9.460866, - "Budu": -9.460866, - "Budza": -9.460866, - "Bugan": -9.460866, - "Bugawac": -9.460866, - "Bughotu": -9.460866, - "Buginese": -9.460866, - "Bugun": -9.460866, - "Buhutu": -9.460866, - "Bukat": -9.460866, - "Bukharic": -9.460866, - "Bukit": -9.460866, - "Bukitan": -9.460866, - "Bukiyip": -9.460866, - "Bukusu": -9.460866, - "Bukwen": -9.460866, - "Bulgarian": -8.362253, - "Buli": -9.460866, - "Bullom": -9.460866, - "Bulu": -8.767718, - "Bumang": -9.460866, - "Bun": -9.460866, - "Buna": -9.460866, - "Bunak": -9.460866, - "Bung": -9.460866, - "Bungain": -9.460866, - "Bunu": -8.362253, - "Bura": -9.460866, - "Buraka": -9.460866, - "Burarra": -9.460866, - "Burate": -9.460866, - "Burduna": -9.460866, - "Bure": -9.460866, - "Buriat": -8.074571, - "Burji": -9.460866, - "Burmese": -9.460866, - "Buru": -9.460866, - "Burui": -9.460866, - "Burumakok": -9.460866, - "Burushaski": -9.460866, - "Burusu": -9.460866, - "Buruwai": -9.460866, - "Busa": -9.460866, - "Busam": -9.460866, - "Busami": -9.460866, - "Busang": -9.460866, - "Bushi": -9.460866, - "Bushoong": -9.460866, - "Buso": -9.460866, - "Busoa": -9.460866, - "Busuu": -9.460866, - "Butuanon": -9.460866, - "Buwal": -9.460866, - "Buxinhua": -9.460866, - "Bwa": -9.460866, - "Bwaidoka": -9.460866, - "Bwamu": -8.767718, - "Bwatoo": -9.460866, - "Bwe": -9.460866, - "Bwela": -9.460866, - "Bwile": -9.460866, - "Bwisi": -9.460866, - "Cagayan": -9.460866, - "Cameroon": -7.381424, - "Canoeiro": -9.460866, - "Castilian": -9.460866, - "Casuarina": -9.460866, - "Catalan": -9.460866, - "Central": -7.851428, - "Cham": -9.460866, - "Chamorro": -9.460866, - "Chechen": -9.460866, - "Chewa": -9.460866, - "Chichewa": -9.460866, - "Chin": -9.460866, - "China": -8.362253, - "Chinese": -9.460866, - "Chini": -9.460866, - "Chiricahua": -9.460866, - "Chuang": -9.460866, - "Church": -8.362253, - "Chuvash": -9.460866, - "Cicipu": -9.460866, - "Cishingini": -9.460866, - "Coast": -9.460866, - "Comments": -6.975959, - "Congo": -8.767718, - "Cornish": -9.460866, - "Corsican": -9.460866, - "Cree": -9.460866, - "Creole": -7.851428, - "Croatian": -8.767718, - "Cwi": -9.460866, - "Cypriot": -9.460866, - "Cyrl": -7.514955, - "Czech": -9.460866, - "Dairi": -9.460866, - "Daloa": -9.460866, - "Danish": -9.460866, - "Dano": -9.460866, - "Date": -9.460866, - "Defaka": -9.460866, - "Democratic": -9.460866, - "Deprecated": -6.416343, - "Description": -2.501467, - "Deva": -8.362253, - "Dhivehi": -9.460866, - "Dhofari": -9.460866, - "Dibole": -9.460866, - "Divehi": -9.460866, - "Dogon": -9.460866, - "Dumagat": -9.460866, - "Durango": -8.767718, - "Dutch": -8.767718, - "Dzao": -9.460866, - "Dzodinka": -9.460866, - "Dzongkha": -9.460866, - "Eastern": -7.851428, - "Edera": -9.460866, - "Edo": -9.460866, - "Eduria": -9.460866, - "Egyptian": -8.767718, - "Ehom": -9.460866, - "Ejar": -9.460866, - "Eloyi": -9.460866, - "English": -8.362253, - "Esimbi": -9.460866, - "Esperanto": -9.460866, - "Estonian": -9.460866, - "Ethi": -8.767718, - "Ethiopia": -8.767718, - "Ewe": -9.460866, - "Faire": -9.460866, - "Fanamaket": -9.460866, - "Faroese": -9.460866, - "Fembe": -9.460866, - "Fijian": -9.460866, - "File": -9.460866, - "Finallig": -9.460866, - "Finnish": -9.460866, - "Flemish": -9.460866, - "French": -9.460866, - "Frisian": -9.460866, - "Fulah": -9.460866, - "Gaelic": -8.767718, - "Gagauz": -9.460866, - "Gagnoa": -9.460866, - "Gahri": -9.460866, - "Galician": -9.460866, - "Galo": -9.460866, - "Gamo": -9.460866, - "Ganda": -9.460866, - "Ganja": -9.460866, - "Gbe": -9.460866, - "Geor": -9.460866, - "Georgian": -9.460866, - "German": -9.460866, - "Ghana": -9.460866, - "Gheg": -9.460866, - "Ghom": -9.460866, - "Ghotuo": -9.460866, - "Giangan": -9.460866, - "Gikuyu": -9.460866, - "Ginyanga": -9.460866, - "Greek": -9.460866, - "Greenlandic": -9.460866, - "Grek": -9.460866, - "Gros": -9.460866, - "Grosso": -9.460866, - "Guarani": -9.460866, - "Guiberoua": -9.460866, - "Guinea": -7.851428, - "Gujarati": -9.460866, - "Gujr": -9.460866, - "Gulf": -9.460866, - "Gumna": -9.460866, - "Gunyu": -9.460866, - "Gurmana": -9.460866, - "Guru": -9.460866, - "Gwamhi": -9.460866, - "Hadrami": -9.460866, - "Haeke": -9.460866, - "Haitian": -8.767718, - "Haryanvi": -9.460866, - "Hausa": -9.460866, - "Hebr": -8.362253, - "Hebrew": -8.767718, - "Heneng": -9.460866, - "Herero": -9.460866, - "Heyo": -9.460866, - "Highland": -9.460866, - "Hijazi": -9.460866, - "Hindi": -9.460866, - "Hiri": -9.460866, - "Hungarian": -9.460866, - "ISO": -9.460866, - "Icelandic": -9.460866, - "Ido": -9.460866, - "Igbo": -9.460866, - "Igo": -9.460866, - "Imperial": -9.460866, - "India": -9.460866, - "Indonesia": -8.767718, - "Indonesian": -8.767718, - "Interlingua": -9.460866, - "Interlingue": -9.460866, - "International": -9.460866, - "Inuktitut": -9.460866, - "Inupiaq": -9.460866, - "Ipalapa": -9.460866, - "Ipulo": -9.460866, - "Iraya": -9.460866, - "Iriga": -9.460866, - "Irish": -9.460866, - "Isarog": -9.460866, - "Islands": -9.460866, - "Italian": -9.460866, - "Itneg": -9.460866, - "Ivbie": -9.460866, - "Jair": -9.460866, - "Jalkunan": -9.460866, - "Japan": -9.460866, - "Japanese": -9.460866, - "Javanese": -8.767718, - "Jeru": -9.460866, - "Jewish": -9.460866, - "Jiao": -9.460866, - "Jicarilla": -9.460866, - "Jpan": -9.460866, - "Judeo": -8.767718, - "Jur": -9.460866, - "K": -9.460866, - "Kahua": -9.460866, - "Kalaallisut": -9.460866, - "Kaloum": -9.460866, - "Kanauji": -9.460866, - "Kannada": -9.460866, - "Kanuri": -9.460866, - "Karbi": -9.460866, - "Karen": -8.767718, - "Karo": -8.767718, - "Kashmiri": -9.460866, - "Katanga": -9.460866, - "Kati": -9.460866, - "Kaure": -9.460866, - "Kayan": -9.460866, - "Kazakh": -9.460866, - "Kede": -9.460866, - "Khmer": -8.767718, - "Khmr": -9.460866, - "Khor": -9.460866, - "Kikuyu": -9.460866, - "Kinyarwanda": -9.460866, - "Kiowa": -9.460866, - "Kirghiz": -9.460866, - "Kluet": -9.460866, - "Knda": -9.460866, - "Koga": -9.460866, - "Kol": -8.767718, - "Kom": -9.460866, - "Komi": -9.460866, - "Kongo": -9.460866, - "Kontagora": -9.460866, - "Kore": -9.460866, - "Korean": -9.460866, - "Koro": -9.460866, - "Koronadal": -9.460866, - "Korur": -9.460866, - "Kotava": -9.460866, - "Kuanyama": -9.460866, - "Kurdish": -9.460866, - "Kusuntu": -9.460866, - "Kwa": -9.460866, - "Kwanyama": -9.460866, - "Kx": -9.460866, - "Kyak": -9.460866, - "Kyrgyz": -9.460866, - "L": -8.767718, - "Language": -6.752815, - "Lao": -9.460866, - "Laoo": -9.460866, - "Laos": -9.460866, - "Larike": -9.460866, - "Latin": -9.460866, - "Latn": -5.130132, - "Latvian": -9.460866, - "Lave": -9.460866, - "Legbo": -9.460866, - "Legeri": -9.460866, - "Leonese": -9.460866, - "Letzeburgesch": -9.460866, - "Levantine": -8.767718, - "Leyigha": -9.460866, - "Libyan": -9.460866, - "Lidzonka": -9.460866, - "Limburgan": -9.460866, - "Limburger": -9.460866, - "Limburgish": -9.460866, - "Lingala": -9.460866, - "Lipan": -9.460866, - "Lishanid": -9.460866, - "Lithuanian": -9.460866, - "Lokep": -9.460866, - "Lower": -9.460866, - "Luba": -9.460866, - "Lubukusu": -9.460866, - "Luganda": -9.460866, - "Lugger": -9.460866, - "Luxembourgish": -9.460866, - "Macedonian": -9.460866, - "Macrolanguage": -5.453532, - "Madar": -9.460866, - "Magbukun": -9.460866, - "Mahasu": -9.460866, - "Mai": -9.460866, - "Makayam": -9.460866, - "Malagasy": -8.362253, - "Malay": -7.851428, - "Malayalam": -9.460866, - "Malba": -9.460866, - "Maldivian": -9.460866, - "Maltese": -9.460866, - "Mandailing": -9.460866, - "Mandobo": -9.460866, - "Manobo": -9.460866, - "Manx": -9.460866, - "Maori": -9.460866, - "Mapuche": -9.460866, - "Mapudungun": -9.460866, - "Marathi": -9.460866, - "Marind": -9.460866, - "Marshallese": -9.460866, - "Mato": -9.460866, - "Mbongno": -9.460866, - "Mboteni": -9.460866, - "Mbr": -9.460866, - "Mescalero": -9.460866, - "Mesopotamian": -9.460866, - "Mid": -9.460866, - "Middle": -9.460866, - "Mien": -9.460866, - "Min": -9.460866, - "Minigir": -9.460866, - "Mlym": -9.460866, - "Mmen": -9.460866, - "Mobumrin": -9.460866, - "Modern": -9.460866, - "Modo": -9.460866, - "Mokpwe": -9.460866, - "Moldavian": -8.767718, - "Moldovan": -8.767718, - "Molengue": -9.460866, - "Molmo": -9.460866, - "Mongolia": -9.460866, - "Mongolian": -9.460866, - "Montenegrin": -9.460866, - "Moroccan": -8.767718, - "Motu": -9.460866, - "Mpur": -9.460866, - "Mt.": -8.767718, - "Muratayak": -9.460866, - "Mymr": -9.460866, - "Nahuatl": -8.362253, - "Nai": -9.460866, - "Naitasiri": -9.460866, - "Najdi": -9.460866, - "Namosi": -9.460866, - "Nanubae": -9.460866, - "Nao": -9.460866, - "Nataoran": -9.460866, - "Nauru": -9.460866, - "Navaho": -9.460866, - "Navajo": -9.460866, - "Nd": -9.460866, - "Ndebele": -8.767718, - "Ndonga": -9.460866, - "Neo": -8.362253, - "Nepali": -9.460866, - "New": -7.851428, - "Ngelima": -9.460866, - "Nigeria": -8.362253, - "Ningi": -9.460866, - "North": -7.851428, - "Northeast": -8.767718, - "Northern": -8.074571, - "Norwegian": -8.362253, - "Noshan": -9.460866, - "Ntcham": -9.460866, - "Nubaca": -9.460866, - "Nuosu": -9.460866, - "Nyanja": -9.460866, - "Nynorsk": -9.460866, - "Obokuitai": -9.460866, - "Occidental": -9.460866, - "Occitan": -9.460866, - "Odia": -9.460866, - "Odiai": -9.460866, - "Official": -9.460866, - "Ojibwa": -9.460866, - "Okpela": -9.460866, - "Old": -8.362253, - "Omani": -9.460866, - "One": -9.460866, - "Oniyan": -9.460866, - "Oriya": -9.460866, - "Oromo": -9.460866, - "Orya": -9.460866, - "Ossetian": -9.460866, - "Ossetic": -9.460866, - "Pa": -9.460866, - "Pabir": -9.460866, - "Pahanan": -9.460866, - "Pahari": -9.460866, - "Pali": -9.460866, - "Palya": -9.460866, - "Pamplona": -9.460866, - "Pande": -9.460866, - "Panjabi": -9.460866, - "Panyi": -9.460866, - "Papua": -7.851428, - "Paranan": -9.460866, - "Pashai": -9.460866, - "Pashayi": -9.460866, - "Pashto": -9.460866, - "Pauri": -9.460866, - "Pearling": -9.460866, - "Pedro": -9.460866, - "Pela": -9.460866, - "Pele": -9.460866, - "Persian": -9.460866, - "Pidgin": -9.460866, - "Pirlatapa": -9.460866, - "Point": -9.460866, - "Polish": -9.460866, - "Portuguese": -9.460866, - "Preferred": -7.062970, - "Pucikwar": -9.460866, - "Pudtol": -9.460866, - "Puebla": -9.460866, - "Punjabi": -9.460866, - "Pushto": -9.460866, - "Putukwam": -9.460866, - "Qawasqar": -9.460866, - "Qimant": -9.460866, - "Quechua": -9.460866, - "Ratagnon": -9.460866, - "Rathwi": -9.460866, - "Reel": -9.460866, - "Remontado": -9.460866, - "Republic": -8.767718, - "Rinconada": -9.460866, - "Rodonia": -9.460866, - "Romanian": -9.460866, - "Romansh": -9.460866, - "Rundi": -9.460866, - "Russia": -9.460866, - "Russian": -9.460866, - "Sabah": -9.460866, - "Safeyoka": -9.460866, - "Saidi": -9.460866, - "Sami": -9.460866, - "Samoan": -9.460866, - "San": -9.460866, - "Sanaani": -9.460866, - "Sango": -9.460866, - "Sanskrit": -9.460866, - "Sarangani": -9.460866, - "Sardinian": -9.460866, - "Sari": -9.460866, - "Scope": -5.471882, - "Scottish": -9.460866, - "Script": -4.707275, - "Seminole": -9.460866, - "Serbian": -9.460866, - "Serbo": -9.460866, - "Serua": -9.460866, - "Sherbro": -9.460866, - "Shiwiar": -9.460866, - "Shona": -9.460866, - "Sichuan": -9.460866, - "Sign": -6.821808, - "Simalungun": -9.460866, - "Sindhi": -9.460866, - "Sinh": -9.460866, - "Sinhala": -9.460866, - "Sinhalese": -9.460866, - "Sissano": -9.460866, - "Sitemu": -9.460866, - "Siwu": -9.460866, - "Slavic": -9.460866, - "Slavonic": -8.362253, - "Slovak": -9.460866, - "Slovenian": -9.460866, - "So": -9.460866, - "Soban": -9.460866, - "Somali": -9.460866, - "Sorsogon": -9.460866, - "Sotho": -9.460866, - "South": -7.669106, - "Southern": -7.158281, - "Spanish": -9.460866, - "Standard": -9.460866, - "State": -8.767718, - "Subtag": -2.563161, - "Sudan": -9.460866, - "Sudanese": -9.460866, - "Sundanese": -9.460866, - "Suppress": -4.707275, - "Swahili": -9.460866, - "Swati": -9.460866, - "Swedish": -9.460866, - "Table": -9.460866, - "Tabulahan": -9.460866, - "Tagabawa": -9.460866, - "Tagalog": -9.460866, - "Tahitian": -9.460866, - "Tainae": -9.460866, - "Tairaha": -9.460866, - "Tajik": -9.460866, - "Talaandig": -9.460866, - "Tamil": -9.460866, - "Taml": -9.460866, - "Tanzania": -8.767718, - "Tapei": -9.460866, - "Tatar": -9.460866, - "Tayabas": -9.460866, - "Tchumbuli": -9.460866, - "Telu": -9.460866, - "Telugu": -9.460866, - "Tena": -9.460866, - "Terei": -9.460866, - "Tesu": -9.460866, - "Thaa": -9.460866, - "Thai": -8.767718, - "Tiagbamrin": -9.460866, - "Tibetan": -8.767718, - "Tibt": -9.460866, - "Tigrinya": -9.460866, - "Toba": -9.460866, - "Tocantins": -9.460866, - "Tonga": -8.767718, - "Tosk": -9.460866, - "Tsonga": -9.460866, - "Tswana": -9.460866, - "Tukang": -9.460866, - "Tuki": -9.460866, - "Tunen": -9.460866, - "Tunisian": -8.767718, - "Turkish": -8.767718, - "Turkmen": -9.460866, - "Twi": -9.460866, - "Uighur": -9.460866, - "Ukpet": -9.460866, - "Ukrainian": -9.460866, - "Urdu": -9.460866, - "Uto": -9.460866, - "Uyghur": -9.460866, - "Uzbek": -9.460866, - "Uzbeki": -9.460866, - "Vaghat": -9.460866, - "Valencian": -9.460866, - "Value": -7.062970, - "Venda": -9.460866, - "Vengo": -9.460866, - "Ventre": -9.460866, - "Vidari": -9.460866, - "Vietnamese": -9.460866, - "Viri": -9.460866, - "Volap": -9.460866, - "Wachi": -9.460866, - "Waimaha": -9.460866, - "Waimiri": -9.460866, - "Wakasihu": -9.460866, - "Walloon": -9.460866, - "Wanbasana": -9.460866, - "Waorani": -9.460866, - "Warkay": -9.460866, - "Welsh": -9.460866, - "Western": -7.669106, - "Wolof": -9.460866, - "Wumboko": -9.460866, - "Wunai": -9.460866, - "Wuri": -9.460866, - "Wushi": -9.460866, - "X": -9.460866, - "Xhosa": -9.460866, - "Xing": -9.460866, - "Ya": -9.460866, - "Yaka": -9.460866, - "Yanesha": -9.460866, - "Yangkam": -9.460866, - "Yaosakor": -9.460866, - "Yi": -9.460866, - "Yiddish": -8.767718, - "Yoruba": -9.460866, - "Younuo": -9.460866, - "Zaiwa": -9.460866, - "Zambia": -9.460866, - "Zhuang": -9.460866, - "Zulu": -9.460866, - "a": -9.460866, - "aa": -9.460866, - "aaa": -9.460866, - "aab": -9.460866, - "aac": -9.460866, - "aad": -9.460866, - "aae": -9.460866, - "aaf": -9.460866, - "aag": -9.460866, - "aah": -9.460866, - "ab": -9.460866, - "abeena": -9.460866, - "acr": -9.460866, - "acs": -9.460866, - "act": -9.460866, - "acu": -9.460866, - "acv": -9.460866, - "acw": -9.460866, - "acx": -9.460866, - "acy": -9.460866, - "acz": -9.460866, - "ada": -9.460866, - "adb": -9.460866, - "add": -9.460866, - "ade": -9.460866, - "adf": -9.460866, - "adg": -9.460866, - "adh": -9.460866, - "adi": -9.460866, - "adj": -9.460866, - "adl": -9.460866, - "adn": -9.460866, - "ado": -9.460866, - "adp": -9.460866, - "adq": -9.460866, - "adr": -9.460866, - "ads": -9.460866, - "adt": -9.460866, - "adu": -9.460866, - "adw": -9.460866, - "adx": -9.460866, - "ady": -9.460866, - "adz": -9.460866, - "ae": -9.460866, - "aea": -9.460866, - "aeb": -9.460866, - "aec": -9.460866, - "aed": -9.460866, - "aee": -9.460866, - "aek": -9.460866, - "ael": -9.460866, - "aem": -9.460866, - "aen": -9.460866, - "aeq": -9.460866, - "aer": -9.460866, - "aes": -9.460866, - "aeu": -9.460866, - "aew": -9.460866, - "aey": -9.460866, - "aez": -9.460866, - "af": -9.460866, - "afa": -9.460866, - "afb": -9.460866, - "afd": -9.460866, - "afe": -9.460866, - "afg": -9.460866, - "afh": -9.460866, - "afi": -9.460866, - "afk": -9.460866, - "afn": -9.460866, - "afo": -9.460866, - "afp": -9.460866, - "afs": -9.460866, - "aft": -9.460866, - "afu": -9.460866, - "afz": -9.460866, - "aga": -9.460866, - "agb": -9.460866, - "agc": -9.460866, - "agd": -9.460866, - "age": -9.460866, - "agf": -9.460866, - "agg": -9.460866, - "agh": -9.460866, - "agi": -9.460866, - "agj": -9.460866, - "agk": -9.460866, - "agl": -9.460866, - "agm": -9.460866, - "agn": -9.460866, - "ago": -9.460866, - "agp": -9.460866, - "agq": -9.460866, - "agr": -9.460866, - "ags": -9.460866, - "agt": -9.460866, - "agu": -9.460866, - "agv": -9.460866, - "agw": -9.460866, - "agx": -9.460866, - "agy": -9.460866, - "agz": -9.460866, - "aha": -9.460866, - "ahb": -9.460866, - "ahg": -9.460866, - "ahh": -9.460866, - "ahi": -9.460866, - "ahk": -9.460866, - "ahl": -9.460866, - "ahm": -9.460866, - "ahn": -9.460866, - "aho": -9.460866, - "ahp": -9.460866, - "ahr": -9.460866, - "ahs": -9.460866, - "aht": -9.460866, - "aia": -9.460866, - "aib": -9.460866, - "aic": -9.460866, - "aid": -9.460866, - "aie": -9.460866, - "aif": -9.460866, - "aig": -9.460866, - "aih": -9.460866, - "aii": -9.460866, - "aij": -9.460866, - "aik": -9.460866, - "ail": -9.460866, - "aim": -9.460866, - "ain": -9.460866, - "aio": -9.460866, - "aip": -9.460866, - "aiq": -9.460866, - "air": -9.460866, - "ais": -9.460866, - "ait": -9.460866, - "aiw": -9.460866, - "aix": -9.460866, - "aiy": -9.460866, - "aja": -9.460866, - "ajg": -9.460866, - "aji": -9.460866, - "ajn": -9.460866, - "ajp": -9.460866, - "ajt": -9.460866, - "aju": -9.460866, - "ajw": -9.460866, - "ajz": -9.460866, - "ak": -8.767718, - "akb": -9.460866, - "akc": -9.460866, - "akd": -9.460866, - "ake": -9.460866, - "akf": -9.460866, - "akg": -9.460866, - "akh": -9.460866, - "aki": -9.460866, - "akj": -9.460866, - "akk": -9.460866, - "akl": -9.460866, - "akm": -9.460866, - "ako": -9.460866, - "akp": -9.460866, - "akq": -9.460866, - "akr": -9.460866, - "aks": -9.460866, - "akt": -9.460866, - "aku": -9.460866, - "akv": -9.460866, - "akw": -9.460866, - "akx": -9.460866, - "aky": -9.460866, - "akz": -9.460866, - "ala": -9.460866, - "alc": -9.460866, - "ald": -9.460866, - "ale": -9.460866, - "alf": -9.460866, - "alg": -9.460866, - "alh": -9.460866, - "ali": -9.460866, - "alj": -9.460866, - "alk": -9.460866, - "all": -9.460866, - "alm": -9.460866, - "aln": -9.460866, - "alo": -9.460866, - "alp": -9.460866, - "alq": -9.460866, - "alr": -9.460866, - "als": -9.460866, - "also": -8.767718, - "alt": -9.460866, - "alu": -9.460866, - "alv": -9.460866, - "alw": -9.460866, - "alx": -9.460866, - "aly": -9.460866, - "alz": -9.460866, - "am": -9.460866, - "ama": -9.460866, - "amb": -9.460866, - "amc": -9.460866, - "ame": -9.460866, - "ami": -9.460866, - "an": -9.460866, - "and": -9.460866, - "aou": -9.460866, - "apc": -9.460866, - "apd": -9.460866, - "ape": -9.460866, - "apf": -8.767718, - "apg": -9.460866, - "aph": -9.460866, - "api": -9.460866, - "apj": -9.460866, - "apk": -9.460866, - "apl": -9.460866, - "apm": -9.460866, - "apn": -9.460866, - "apo": -9.460866, - "app": -9.460866, - "apq": -9.460866, - "apr": -9.460866, - "aps": -9.460866, - "apt": -9.460866, - "apu": -9.460866, - "apv": -9.460866, - "apw": -9.460866, - "apx": -9.460866, - "apy": -9.460866, - "apz": -9.460866, - "aqa": -9.460866, - "aqc": -9.460866, - "aqd": -9.460866, - "aqg": -9.460866, - "aql": -9.460866, - "aqm": -9.460866, - "aqn": -9.460866, - "aqp": -9.460866, - "aqr": -9.460866, - "aqt": -9.460866, - "aqz": -9.460866, - "ar": -6.325371, - "arb": -9.460866, - "arc": -9.460866, - "ard": -9.460866, - "are": -8.362253, - "arh": -9.460866, - "ari": -9.460866, - "arj": -9.460866, - "ark": -9.460866, - "arl": -9.460866, - "arn": -9.460866, - "aro": -9.460866, - "arp": -9.460866, - "arq": -9.460866, - "arr": -9.460866, - "ars": -9.460866, - "art": -9.460866, - "aru": -9.460866, - "arv": -9.460866, - "arw": -9.460866, - "arx": -9.460866, - "ary": -9.460866, - "arz": -9.460866, - "as": -9.460866, - "asa": -9.460866, - "asb": -9.460866, - "asc": -9.460866, - "asd": -9.460866, - "ase": -9.460866, - "asf": -9.460866, - "asg": -9.460866, - "ash": -9.460866, - "asi": -9.460866, - "asj": -9.460866, - "ask": -9.460866, - "asl": -9.460866, - "asn": -9.460866, - "aso": -9.460866, - "asp": -9.460866, - "asq": -9.460866, - "asr": -9.460866, - "ass": -9.460866, - "ast": -9.460866, - "asu": -9.460866, - "asv": -9.460866, - "asw": -9.460866, - "asx": -9.460866, - "asy": -9.460866, - "asz": -9.460866, - "ata": -9.460866, - "atb": -9.460866, - "atc": -9.460866, - "atd": -9.460866, - "ate": -9.460866, - "atg": -9.460866, - "ath": -9.460866, - "ati": -9.460866, - "atj": -9.460866, - "atk": -9.460866, - "atl": -9.460866, - "atm": -9.460866, - "atn": -9.460866, - "ato": -9.460866, - "atp": -9.460866, - "atq": -9.460866, - "atr": -9.460866, - "ats": -9.460866, - "att": -9.460866, - "atu": -9.460866, - "atv": -9.460866, - "atw": -9.460866, - "atx": -9.460866, - "aty": -9.460866, - "atz": -9.460866, - "au": -9.460866, - "aua": -9.460866, - "aub": -9.460866, - "auc": -9.460866, - "aud": -9.460866, - "aue": -9.460866, - "auf": -9.460866, - "aug": -9.460866, - "auh": -9.460866, - "aui": -9.460866, - "auj": -9.460866, - "auk": -9.460866, - "aul": -9.460866, - "aum": -9.460866, - "aun": -9.460866, - "auo": -9.460866, - "aup": -9.460866, - "auq": -9.460866, - "aur": -9.460866, - "aus": -9.460866, - "aut": -9.460866, - "auu": -9.460866, - "auw": -9.460866, - "aux": -9.460866, - "auy": -9.460866, - "auz": -9.460866, - "av": -9.460866, - "avb": -9.460866, - "avd": -9.460866, - "avi": -9.460866, - "avk": -9.460866, - "avl": -9.460866, - "avm": -9.460866, - "avn": -9.460866, - "avo": -9.460866, - "avs": -9.460866, - "avt": -9.460866, - "avu": -9.460866, - "avv": -9.460866, - "awa": -9.460866, - "awb": -9.460866, - "awc": -9.460866, - "awd": -9.460866, - "awe": -9.460866, - "awg": -9.460866, - "awh": -9.460866, - "awi": -9.460866, - "awk": -9.460866, - "awm": -9.460866, - "awn": -9.460866, - "awo": -9.460866, - "awr": -9.460866, - "aws": -9.460866, - "awt": -9.460866, - "awu": -9.460866, - "awv": -9.460866, - "aww": -9.460866, - "awx": -9.460866, - "awy": -9.460866, - "axb": -9.460866, - "axe": -9.460866, - "axg": -9.460866, - "axk": -9.460866, - "axl": -9.460866, - "axm": -9.460866, - "axx": -9.460866, - "ay": -8.362253, - "aya": -9.460866, - "ayb": -9.460866, - "ayc": -9.460866, - "ayd": -9.460866, - "aye": -9.460866, - "ayg": -9.460866, - "ayh": -9.460866, - "ayi": -9.460866, - "ayk": -9.460866, - "ayl": -9.460866, - "ayn": -9.460866, - "ayo": -9.460866, - "ayp": -9.460866, - "ayq": -9.460866, - "ayr": -9.460866, - "ays": -9.460866, - "ayt": -9.460866, - "ayu": -9.460866, - "ayx": -9.460866, - "ayy": -9.460866, - "ayz": -9.460866, - "az": -8.362253, - "aza": -9.460866, - "azb": -9.460866, - "azc": -9.460866, - "azd": -9.460866, - "azg": -9.460866, - "azj": -9.460866, - "azm": -9.460866, - "azn": -9.460866, - "azo": -9.460866, - "azt": -9.460866, - "azz": -9.460866, - "ba": -9.460866, - "baa": -9.460866, - "bab": -9.460866, - "bac": -9.460866, - "bad": -9.460866, - "bae": -9.460866, - "baf": -9.460866, - "bag": -9.460866, - "bah": -9.460866, - "bai": -9.460866, - "baj": -9.460866, - "bal": -8.362253, - "ban": -9.460866, - "bao": -9.460866, - "bap": -9.460866, - "bar": -9.460866, - "bas": -9.460866, - "bat": -9.460866, - "bau": -9.460866, - "bav": -9.460866, - "baw": -9.460866, - "bax": -9.460866, - "bay": -9.460866, - "baz": -9.460866, - "bba": -9.460866, - "bbb": -9.460866, - "bbc": -9.460866, - "bbd": -9.460866, - "bbe": -9.460866, - "bbf": -9.460866, - "bbg": -9.460866, - "bbh": -9.460866, - "bbi": -9.460866, - "bbj": -9.460866, - "bcg": -9.460866, - "be": -9.460866, - "beb": -9.460866, - "bej": -9.460866, - "bek": -9.460866, - "bem": -9.460866, - "beo": -9.460866, - "bep": -9.460866, - "beq": -9.460866, - "ber": -9.460866, - "bes": -9.460866, - "bet": -9.460866, - "beu": -9.460866, - "bev": -9.460866, - "bew": -9.460866, - "bex": -9.460866, - "bey": -9.460866, - "bez": -9.460866, - "bfa": -9.460866, - "bfb": -9.460866, - "bfc": -9.460866, - "bfd": -9.460866, - "bfe": -9.460866, - "bff": -9.460866, - "bfg": -9.460866, - "bfh": -9.460866, - "bfi": -9.460866, - "bfj": -9.460866, - "bfk": -9.460866, - "bfl": -9.460866, - "bfm": -9.460866, - "bfn": -9.460866, - "bfo": -9.460866, - "bfp": -9.460866, - "bfq": -9.460866, - "bfr": -9.460866, - "bfs": -9.460866, - "bft": -9.460866, - "bfu": -9.460866, - "bfw": -9.460866, - "bfx": -9.460866, - "bfy": -9.460866, - "bfz": -9.460866, - "bg": -9.460866, - "bga": -9.460866, - "bgb": -9.460866, - "bgc": -9.460866, - "bgd": -9.460866, - "bge": -9.460866, - "bgf": -9.460866, - "bgg": -9.460866, - "bgi": -9.460866, - "bgj": -9.460866, - "bgk": -9.460866, - "bgl": -9.460866, - "bgm": -9.460866, - "bgn": -9.460866, - "bgo": -9.460866, - "bgp": -9.460866, - "bgq": -9.460866, - "bgr": -9.460866, - "bgs": -9.460866, - "bgt": -9.460866, - "bgu": -9.460866, - "bgv": -9.460866, - "bgw": -9.460866, - "bgx": -9.460866, - "bgy": -9.460866, - "bgz": -9.460866, - "bh": -9.460866, - "bha": -9.460866, - "bhb": -9.460866, - "bhc": -9.460866, - "bhd": -9.460866, - "bhe": -9.460866, - "bhf": -9.460866, - "bhg": -9.460866, - "bhh": -9.460866, - "bhi": -9.460866, - "bhj": -9.460866, - "bhk": -9.460866, - "bhl": -9.460866, - "bhm": -9.460866, - "bhn": -9.460866, - "bho": -9.460866, - "bhp": -9.460866, - "bhq": -9.460866, - "bhr": -9.460866, - "bhs": -9.460866, - "bht": -9.460866, - "bhu": -9.460866, - "bhv": -9.460866, - "bhw": -9.460866, - "bhx": -9.460866, - "bhy": -9.460866, - "bhz": -9.460866, - "bi": -9.460866, - "bia": -9.460866, - "bib": -9.460866, - "bic": -9.460866, - "bid": -9.460866, - "bie": -9.460866, - "bif": -9.460866, - "big": -9.460866, - "bij": -9.460866, - "bik": -8.362253, - "bil": -9.460866, - "bim": -9.460866, - "bin": -9.460866, - "bio": -9.460866, - "bip": -9.460866, - "biq": -9.460866, - "bir": -9.460866, - "bit": -9.460866, - "biu": -9.460866, - "biv": -9.460866, - "biw": -9.460866, - "bix": -9.460866, - "biy": -9.460866, - "biz": -9.460866, - "bja": -9.460866, - "bjb": -9.460866, - "bjc": -9.460866, - "bjd": -9.460866, - "bje": -9.460866, - "bjf": -9.460866, - "bjg": -9.460866, - "bjh": -9.460866, - "bji": -9.460866, - "bjj": -9.460866, - "bjk": -9.460866, - "bjl": -9.460866, - "bjm": -9.460866, - "bjn": -9.460866, - "bjo": -9.460866, - "bjp": -9.460866, - "bjq": -9.460866, - "bjr": -9.460866, - "bjs": -9.460866, - "bjt": -9.460866, - "bju": -9.460866, - "bjv": -9.460866, - "bjw": -9.460866, - "bjx": -9.460866, - "bjy": -9.460866, - "bjz": -9.460866, - "bka": -9.460866, - "bkb": -9.460866, - "bkc": -9.460866, - "bkd": -9.460866, - "bkf": -9.460866, - "bkg": -9.460866, - "bkh": -9.460866, - "bki": -9.460866, - "bkj": -9.460866, - "bkk": -9.460866, - "bkl": -9.460866, - "bkm": -9.460866, - "bkn": -9.460866, - "bko": -9.460866, - "bm": -9.460866, - "bn": -9.460866, - "bo": -9.460866, - "bpl": -9.460866, - "bpm": -9.460866, - "bpn": -9.460866, - "bpo": -9.460866, - "bpp": -9.460866, - "bpq": -9.460866, - "bpr": -9.460866, - "bps": -9.460866, - "bpt": -9.460866, - "bpu": -9.460866, - "bpv": -9.460866, - "bpw": -9.460866, - "bpx": -9.460866, - "bpy": -9.460866, - "bpz": -9.460866, - "bqa": -9.460866, - "bqb": -9.460866, - "bqc": -9.460866, - "bqd": -9.460866, - "bqf": -9.460866, - "bqg": -9.460866, - "bqh": -9.460866, - "bqi": -9.460866, - "bqj": -9.460866, - "bqk": -9.460866, - "bql": -9.460866, - "bqm": -9.460866, - "bqn": -9.460866, - "bqo": -9.460866, - "bqp": -9.460866, - "bqq": -9.460866, - "bqr": -9.460866, - "bqs": -9.460866, - "bqt": -9.460866, - "bqu": -9.460866, - "bqv": -9.460866, - "bqw": -9.460866, - "bqx": -9.460866, - "bqy": -9.460866, - "bqz": -9.460866, - "br": -9.460866, - "bra": -9.460866, - "brb": -9.460866, - "brc": -9.460866, - "brd": -9.460866, - "brf": -9.460866, - "brg": -9.460866, - "brh": -9.460866, - "bri": -9.460866, - "brj": -9.460866, - "brk": -9.460866, - "brl": -9.460866, - "brm": -9.460866, - "brn": -9.460866, - "bro": -9.460866, - "brp": -9.460866, - "brq": -9.460866, - "brr": -9.460866, - "brs": -9.460866, - "brt": -9.460866, - "bru": -9.460866, - "brv": -9.460866, - "brw": -9.460866, - "brx": -9.460866, - "bry": -9.460866, - "brz": -9.460866, - "bs": -8.767718, - "bsa": -9.460866, - "bsb": -9.460866, - "bsc": -9.460866, - "bse": -9.460866, - "bsf": -9.460866, - "bsg": -9.460866, - "bsh": -9.460866, - "bsi": -9.460866, - "bsj": -9.460866, - "bsk": -9.460866, - "bsl": -9.460866, - "bsm": -9.460866, - "bsn": -9.460866, - "bso": -9.460866, - "bsp": -9.460866, - "bsq": -9.460866, - "bsr": -9.460866, - "bss": -9.460866, - "bst": -9.460866, - "bsu": -9.460866, - "bsv": -9.460866, - "bsw": -9.460866, - "bsx": -9.460866, - "bsy": -9.460866, - "bta": -9.460866, - "btb": -9.460866, - "btc": -9.460866, - "btd": -9.460866, - "bte": -9.460866, - "btf": -9.460866, - "btg": -9.460866, - "bth": -9.460866, - "bti": -9.460866, - "btj": -9.460866, - "btk": -9.460866, - "btl": -9.460866, - "btm": -9.460866, - "btn": -9.460866, - "bto": -9.460866, - "btp": -9.460866, - "btq": -9.460866, - "btr": -9.460866, - "bts": -9.460866, - "btt": -9.460866, - "btu": -9.460866, - "btv": -9.460866, - "btw": -9.460866, - "btx": -9.460866, - "bty": -9.460866, - "btz": -9.460866, - "bua": -8.074571, - "bub": -9.460866, - "buc": -9.460866, - "bud": -9.460866, - "bue": -9.460866, - "buf": -9.460866, - "bug": -9.460866, - "buh": -9.460866, - "bui": -9.460866, - "buj": -9.460866, - "buk": -9.460866, - "bum": -8.767718, - "bun": -9.460866, - "buo": -9.460866, - "bup": -9.460866, - "buq": -9.460866, - "bus": -9.460866, - "but": -9.460866, - "buu": -9.460866, - "buv": -9.460866, - "buw": -9.460866, - "bux": -9.460866, - "buy": -9.460866, - "buz": -9.460866, - "bva": -9.460866, - "bvb": -9.460866, - "bvc": -9.460866, - "bvd": -9.460866, - "bve": -9.460866, - "bvf": -9.460866, - "bvg": -9.460866, - "bvh": -9.460866, - "bvi": -9.460866, - "bvj": -9.460866, - "bvk": -9.460866, - "bvl": -9.460866, - "bvm": -9.460866, - "bvn": -9.460866, - "bvo": -9.460866, - "bvp": -9.460866, - "bvq": -9.460866, - "bvr": -9.460866, - "bvt": -9.460866, - "bvu": -9.460866, - "bvv": -9.460866, - "bvw": -9.460866, - "bvx": -9.460866, - "bvy": -9.460866, - "bvz": -9.460866, - "bwa": -9.460866, - "bwb": -9.460866, - "bwc": -9.460866, - "bwd": -9.460866, - "bwe": -9.460866, - "bwf": -9.460866, - "bwg": -9.460866, - "bwh": -9.460866, - "bwi": -9.460866, - "bwj": -9.460866, - "bwk": -9.460866, - "bwl": -9.460866, - "bwm": -9.460866, - "bwn": -9.460866, - "bwo": -9.460866, - "bwp": -9.460866, - "bwq": -9.460866, - "bwr": -9.460866, - "bws": -9.460866, - "bwt": -9.460866, - "bwu": -9.460866, - "bww": -9.460866, - "bwx": -9.460866, - "bwy": -9.460866, - "bwz": -9.460866, - "bxa": -9.460866, - "bxb": -9.460866, - "bxc": -9.460866, - "bxd": -9.460866, - "bxe": -9.460866, - "bxf": -9.460866, - "bxg": -9.460866, - "bxh": -9.460866, - "bxi": -9.460866, - "bxj": -9.460866, - "bxk": -9.460866, - "bxl": -9.460866, - "bxm": -9.460866, - "bxn": -9.460866, - "bxo": -9.460866, - "bxp": -8.767718, - "bxq": -9.460866, - "bxr": -9.460866, - "bxs": -9.460866, - "bxu": -9.460866, - "bxv": -9.460866, - "bxw": -9.460866, - "bxx": -9.460866, - "bxz": -9.460866, - "by": -9.460866, - "bya": -9.460866, - "bzc": -9.460866, - "ca": -9.460866, - "ce": -9.460866, - "ch": -9.460866, - "cnr": -9.460866, - "co": -9.460866, - "collection": -6.627652, - "cr": -9.460866, - "cs": -9.460866, - "cu": -9.460866, - "cv": -9.460866, - "cy": -9.460866, - "da": -9.460866, - "de": -9.460866, - "drl": -9.460866, - "dv": -9.460866, - "dz": -8.767718, - "ebk": -9.460866, - "ee": -9.460866, - "ein": -9.460866, - "el": -9.460866, - "en": -9.460866, - "eo": -9.460866, - "error": -9.460866, - "es": -9.460866, - "et": -9.460866, - "eto": -9.460866, - "eu": -9.460866, - "ewo": -9.460866, - "fa": -9.460866, - "fan": -9.460866, - "fbl": -9.460866, - "ff": -9.460866, - "fi": -9.460866, - "fj": -9.460866, - "fo": -9.460866, - "for": -8.767718, - "fr": -9.460866, - "fy": -9.460866, - "ga": -9.460866, - "gd": -9.460866, - "gl": -9.460866, - "gn": -9.460866, - "gu": -9.460866, - "gur": -9.460866, - "gv": -9.460866, - "h": -9.460866, - "ha": -9.460866, - "he": -8.767718, - "hi": -9.460866, - "ho": -9.460866, - "hr": -8.767718, - "ht": -9.460866, - "hu": -9.460866, - "hy": -9.460866, - "hyw": -9.460866, - "hz": -9.460866, - "ia": -9.460866, - "id": -8.767718, - "ie": -9.460866, - "ig": -9.460866, - "ii": -9.460866, - "ik": -9.460866, - "in": -8.767718, - "io": -9.460866, - "is": -9.460866, - "it": -9.460866, - "iu": -9.460866, - "iw": -9.460866, - "izzi": -9.460866, - "ja": -9.460866, - "ji": -9.460866, - "jrb": -8.767718, - "jv": -8.767718, - "jw": -9.460866, - "k": -9.460866, - "ka": -9.460866, - "kg": -9.460866, - "ki": -9.460866, - "kj": -9.460866, - "kk": -9.460866, - "kl": -9.460866, - "km": -9.460866, - "kn": -9.460866, - "ko": -9.460866, - "kr": -9.460866, - "ks": -9.460866, - "ktz": -9.460866, - "ku": -9.460866, - "kv": -9.460866, - "kw": -9.460866, - "ky": -9.460866, - "l": -8.362253, - "la": -9.460866, - "languages": -6.627652, - "lb": -9.460866, - "lbl": -9.460866, - "lg": -9.460866, - "li": -9.460866, - "ln": -9.460866, - "lo": -9.460866, - "lt": -9.460866, - "lu": -9.460866, - "luy": -9.460866, - "lv": -9.460866, - "macrolanguage": -5.723196, - "mct": -9.460866, - "mg": -8.362253, - "mh": -9.460866, - "mi": -9.460866, - "mk": -9.460866, - "ml": -9.460866, - "mn": -9.460866, - "mo": -9.460866, - "modern": -9.460866, - "most": -9.460866, - "mr": -9.460866, - "ms": -7.514955, - "mt": -9.460866, - "my": -9.460866, - "n": -9.460866, - "na": -9.460866, - "nb": -9.460866, - "nd": -9.460866, - "ne": -9.460866, - "ng": -9.460866, - "nl": -9.460866, - "nn": -9.460866, - "no": -8.362253, - "nr": -9.460866, - "nun": -9.460866, - "nv": -9.460866, - "nvo": -9.460866, - "ny": -9.460866, - "o": -8.767718, - "obk": -9.460866, - "oc": -9.460866, - "of": -8.767718, - "oj": -9.460866, - "om": -9.460866, - "or": -9.460866, - "os": -9.460866, - "pa": -9.460866, - "pi": -9.460866, - "pl": -9.460866, - "post": -9.460866, - "preferred": -9.460866, - "prf": -9.460866, - "ps": -9.460866, - "pt": -9.460866, - "published": -9.460866, - "qu": -9.460866, - "r": -8.767718, - "ra": -9.460866, - "raj": -9.460866, - "rbl": -9.460866, - "resh": -9.460866, - "rm": -9.460866, - "rn": -9.460866, - "ro": -8.767718, - "ru": -9.460866, - "rw": -9.460866, - "s": -9.460866, - "sa": -9.460866, - "sc": -9.460866, - "sd": -9.460866, - "se": -9.460866, - "see": -7.158281, - "sg": -9.460866, - "sh": -8.074571, - "si": -9.460866, - "sk": -9.460866, - "sl": -9.460866, - "sm": -9.460866, - "sn": -9.460866, - "snz": -9.460866, - "so": -9.460866, - "sq": -8.074571, - "sr": -8.767718, - "ss": -9.460866, - "st": -9.460866, - "su": -9.460866, - "sv": -9.460866, - "sw": -9.460866, - "syr": -9.460866, - "szy": -9.460866, - "t": -8.767718, - "ta": -9.460866, - "te": -8.767718, - "tg": -9.460866, - "th": -9.460866, - "ti": -9.460866, - "tk": -9.460866, - "tkg": -9.460866, - "tl": -9.460866, - "tn": -9.460866, - "to": -9.460866, - "tong": -9.460866, - "tr": -9.460866, - "ts": -9.460866, - "tt": -9.460866, - "tvu": -9.460866, - "tw": -9.460866, - "ty": -9.460866, - "ubl": -9.460866, - "ug": -9.460866, - "uk": -9.460866, - "ur": -9.460866, - "uses": -9.460866, - "uz": -9.460866, - "ve": -9.460866, - "vi": -9.460866, - "vmg": -9.460866, - "vo": -9.460866, - "wa": -9.460866, - "wo": -9.460866, - "xh": -9.460866, - "yi": -8.767718, - "yo": -9.460866, - "za": -9.460866, - "zh": -9.460866, - "zu": -9.460866, - "À": -9.460866, - "Ô": -9.460866, - "à": -9.460866, - "á": -6.821808, - "â": -8.362253, - "ã": -9.460866, - "å": -9.460866, - "è": -8.767718, - "é": -6.688277, - "ê": -9.460866, - "ë": -8.362253, - "í": -8.362253, - "ñ": -9.460866, - "ô": -9.460866, - "ú": -8.767718, - "ü": -9.460866, - "ǁ": -9.460866, - "ǂ": -9.460866, - "ʼ": -8.767718, - "’": -9.460866, + "%": -2.825833, + "(": -6.003887, + ")": -6.003887, + "-": -1.722602, + ":": -1.402056, + "Abkhazian": -7.102499, + "Added": -2.825833, + "Afar": -7.102499, + "African": -7.102499, + "Akan": -7.102499, + "Alpine": -7.102499, + "Amharic": -7.102499, + "Arab": -6.409352, + "Arabic": -7.102499, + "Aragonese": -7.102499, + "Armenian": -7.102499, + "Armn": -7.102499, + "Assamese": -7.102499, + "Association": -7.102499, + "Auxiliary": -7.102499, + "Avaric": -7.102499, + "Avestan": -7.102499, + "Aymara": -7.102499, + "Azerbaijani": -7.102499, + "Bangla": -7.102499, + "Bashkir": -7.102499, + "Basque": -7.102499, + "Belarusian": -7.102499, + "Beng": -6.409352, + "Bengali": -7.102499, + "Bihari": -7.102499, + "Bokmal": -7.102499, + "Bosnian": -7.102499, + "Breton": -7.102499, + "Bulgarian": -7.102499, + "Castilian": -7.102499, + "Catalan": -7.102499, + "Chamorro": -7.102499, + "Chechen": -7.102499, + "Comments": -6.003887, + "Corsican": -7.102499, + "Cree": -7.102499, + "Creole": -7.102499, + "Croatian": -7.102499, + "Cyrl": -6.003887, + "Czech": -7.102499, + "Date": -7.102499, + "Deprecated": -5.156589, + "Description": -2.708050, + "Dhivehi": -7.102499, + "Divehi": -7.102499, + "Dzongkha": -7.102499, + "English": -7.102499, + "Esperanto": -6.409352, + "Estonian": -7.102499, + "Ethi": -7.102499, + "Ewe": -7.102499, + "Faroese": -7.102499, + "Fijian": -7.102499, + "File": -7.102499, + "Finnish": -7.102499, + "French": -7.102499, + "Fulah": -7.102499, + "Gaelic": -6.409352, + "Galician": -7.102499, + "Giles": -7.102499, + "Greek": -7.102499, + "Grek": -7.102499, + "Guarani": -7.102499, + "Gujarati": -7.102499, + "Gujr": -7.102499, + "Haitian": -6.409352, + "Hakka": -7.102499, + "Hausa": -7.102499, + "Hebr": -7.102499, + "Hebrew": -7.102499, + "Herero": -7.102499, + "Hungarian": -7.102499, + "Ido": -7.102499, + "Igbo": -7.102499, + "Indonesian": -6.409352, + "Interlingua": -7.102499, + "Interlingue": -7.102499, + "International": -7.102499, + "Inupiaq": -7.102499, + "Irish": -7.102499, + "Klingon": -7.102499, + "Language": -6.409352, + "Latn": -3.924446, + "Latvian": -6.409352, + "Macrolanguage": -5.716205, + "Maldivian": -7.102499, + "Manx": -7.102499, + "Mingo": -7.102499, + "Modern": -7.102499, + "Navajo": -7.102499, + "Norwegian": -6.409352, + "Nuosu": -7.102499, + "Nynorsk": -7.102499, + "Occidental": -7.102499, + "Occitan": -7.102499, + "Occitania": -7.102499, + "Persian": -7.102499, + "Preferred": -5.156589, + "Prefix": -5.716205, + "Scope": -4.704604, + "Scottish": -7.102499, + "Script": -3.491581, + "Sichuan": -7.102499, + "Sign": -7.102499, + "South": -7.102499, + "Spanish": -7.102499, + "Standard": -7.102499, + "Subtag": -2.928112, + "Suppress": -3.491581, + "Tag": -5.156589, + "Thaa": -7.102499, + "The": -7.102499, + "Tibetan": -7.102499, + "Tibt": -7.102499, + "Valencian": -7.102499, + "Value": -5.156589, + "Vivaro": -7.102499, + "Wade": -7.102499, + "X": -7.102499, + "Yi": -7.102499, + "ZA": -7.102499, + "aa": -7.102499, + "ab": -7.102499, + "ae": -7.102499, + "ak": -7.102499, + "also": -7.102499, + "am": -7.102499, + "an": -7.102499, + "ar": -7.102499, + "as": -7.102499, + "av": -7.102499, + "ay": -7.102499, + "az": -7.102499, + "ba": -7.102499, + "be": -7.102499, + "before": -7.102499, + "bg": -7.102499, + "bh": -7.102499, + "bn": -7.102499, + "bo": -7.102499, + "bok": -7.102499, + "br": -7.102499, + "bs": -7.102499, + "c.": -7.102499, + "ca": -7.102499, + "ce": -7.102499, + "ch": -7.102499, + "co": -7.102499, + "collection": -7.102499, + "cr": -7.102499, + "cs": -7.102499, + "during": -7.102499, + "dv": -7.102499, + "dz": -7.102499, + "ee": -7.102499, + "el": -7.102499, + "en": -7.102499, + "eo": -6.409352, + "es": -7.102499, + "et": -7.102499, + "eu": -7.102499, + "fa": -7.102499, + "fallback": -7.102499, + "ff": -7.102499, + "fi": -7.102499, + "fj": -7.102499, + "fo": -7.102499, + "for": -7.102499, + "fr": -7.102499, + "ga": -7.102499, + "gd": -7.102499, + "gl": -7.102499, + "gn": -7.102499, + "gu": -7.102499, + "gv": -7.102499, + "ha": -7.102499, + "hak": -6.409352, + "he": -7.102499, + "hr": -7.102499, + "ht": -7.102499, + "hu": -7.102499, + "hy": -7.102499, + "hyw": -7.102499, + "hz": -7.102499, + "i": -5.716205, + "ia": -7.102499, + "id": -6.409352, + "ie": -7.102499, + "ig": -7.102499, + "ii": -7.102499, + "ik": -7.102499, + "in": -6.409352, + "io": -7.102499, + "klingon": -7.102499, + "language": -7.102499, + "languages": -7.102499, + "lv": -7.102499, + "macrolanguage": -4.799914, + "mingo": -7.102499, + "ms": -6.409352, + "navajo": -7.102499, + "nb": -7.102499, + "nn": -7.102499, + "no": -6.409352, + "northeastern": -7.102499, + "nv": -7.102499, + "nyn": -7.102499, + "oc": -7.102499, + "of": -7.102499, + "old": -7.102499, + "orthographic": -7.102499, + "orthography": -6.409352, + "represents": -7.102499, + "romanization": -7.102499, + "s": -6.409352, + "s.": -7.102499, + "see": -7.102499, + "sfs": -7.102499, + "sgn": -7.102499, + "sh": -6.409352, + "spelling": -7.102499, + "spoken": -7.102499, + "subtag": -7.102499, + "system": -7.102499, + "the": -6.409352, + "tlh": -7.102499, + "used": -6.409352, + "variant": -7.102499, + "vecdruka": -7.102499, + "vivaraup": -7.102499, + "wadegile": -7.102499, + "xsistemo": -7.102499, + "zh": -7.102499, + "–": -7.102499, }, "Red": map[string]float64{ "!": -2.702659, @@ -143434,6 +142317,27 @@ var TokensLogProbabilities = map[string]map[string]float64{ "{": -4.431898, "}": -4.431898, }, + "Redirect Rules": map[string]float64{ + "!": -2.525729, + "-": -2.525729, + "/": -3.218876, + "/*": -3.218876, + "/en": -3.218876, + "/en/*": -3.218876, + "/index": -3.218876, + "/main/*": -3.218876, + "/search": -3.218876, + "/search/": -3.218876, + ":": -2.120264, + "=": -2.525729, + "Language": -3.218876, + "US": -3.218876, + "en": -3.218876, + "q": -3.218876, + "query": -2.525729, + "splat": -3.218876, + "us/": -3.218876, + }, "Regular Expression": map[string]float64{ "!": -4.543295, "#": -5.929589, @@ -149567,1190 +148471,1198 @@ var TokensLogProbabilities = map[string]map[string]float64{ "~": -8.847216, }, "Ruby": map[string]float64{ - "!": -5.395478, - "#": -5.800943, - "####": -7.998167, - "###############################################################################": -7.998167, - "#c": -8.691315, - "#cgi_server.serve": -8.691315, - "#exit": -8.691315, - "#remove": -8.691315, - "$": -5.858101, - "%": -7.081877, - "&": -5.858101, - "&&": -6.611873, - "(": -3.138355, - ")": -3.142238, - "*added_methods": -8.691315, - "*args": -6.388729, - "*extensions": -7.305020, - "*methods": -8.691315, - "+": -5.027753, - ",": -2.163357, - "-": -4.387249, - ".": -8.691315, - "..": -8.691315, - "./": -8.691315, - ".basename": -8.691315, - ".deep_merge": -8.691315, - ".destroy": -8.691315, - ".disable": -8.691315, - ".each": -7.998167, - ".flatten": -8.691315, - ".flatten.each": -8.691315, - ".flatten.uniq": -8.691315, - ".gsub": -7.998167, - ".include": -7.998167, - ".join": -8.691315, - ".map": -7.305020, - ".pop": -8.691315, - ".rb": -8.691315, - ".read": -7.592702, - ".run": -8.691315, - ".should": -7.592702, - ".size": -8.691315, - ".slice": -8.691315, - ".sort": -8.691315, - ".sort_by": -8.691315, - ".split": -8.691315, - ".to_i": -7.998167, - ".to_s": -7.592702, - ".to_s.split": -8.691315, - ".to_sym": -8.691315, - ".unshift": -7.998167, - ".void": -8.691315, - "/": -5.983264, - "/.*": -8.691315, - "//": -8.691315, - "//rubygems.org/": -8.691315, - "/@name": -8.691315, - "/Library/Taps/": -8.691315, - "/h": -8.691315, - "/not": -8.691315, - "/redis": -8.691315, - "/usr/bin/env": -6.745404, - "0": -8.691315, - "404": -8.691315, - "8": -8.691315, - ":": -2.751143, - ";": -4.862673, - "<": -6.745404, - "<#{@instance.class}>": -8.691315, - "<(data)>": -8.691315, - "<-EOF>": -8.691315, - "<-HTML).gsub(/^>": -8.691315, - "</body>": -8.691315, - "</div>": -8.691315, - "</head>": -8.691315, - "</html>": -8.691315, - "</pre>": -8.691315, - "</style>": -8.691315, - "</tt>": -8.691315, - "<<": -6.206408, - "<body>": -8.691315, - "<david.calavera@gmail.com>": -8.691315, - "<div>": -8.691315, - "<head>": -8.691315, - "<html>": -8.691315, - "<img>": -8.691315, - "<internal:/,>": -8.691315, - "<pre>": -8.691315, - "<source>": -8.691315, - "<style>": -8.691315, - "<tt>": -8.691315, - "=": -3.014561, - ">": -4.086144, - "?": -4.373826, - "@after_fork": -7.998167, - "@before_first_fork": -7.998167, - "@before_fork": -7.998167, - "@bottle_sha": -8.691315, - "@bottle_url": -8.691315, - "@cc_failures": -7.998167, - "@coder": -8.691315, - "@courts": -8.691315, - "@dependencies": -8.691315, - "@downloader": -8.691315, - "@env": -7.998167, - "@handler": -8.691315, - "@handler.end_array": -8.691315, - "@handler.end_object": -8.691315, - "@handler.scalar": -7.998167, - "@handler.start_array": -8.691315, - "@handler.start_object": -8.691315, - "@head": -7.998167, - "@instance": -7.998167, - "@instance.settings": -8.691315, - "@keg_only_reason": -8.691315, - "@mirrors.uniq": -8.691315, - "@name": -7.592702, - "@path": -8.691315, - "@queues": -7.998167, - "@queues.delete": -8.691315, - "@redis": -6.899555, - "@skip_clean_all": -7.998167, - "@skip_clean_paths": -7.592702, - "@skip_clean_paths.include": -8.691315, - "@spec_to_use": -7.305020, - "@spec_to_use.detect_version": -8.691315, - "@spec_to_use.specs": -8.691315, - "@spec_to_use.url": -8.691315, - "@specs": -8.691315, - "@stack": -8.691315, - "@stack.call": -8.691315, - "@standard": -7.998167, - "@standard.nil": -8.691315, - "@tokenizer": -8.691315, - "@tokenizer.next_token": -8.691315, - "@unstable": -8.691315, - "@uri": -7.081877, - "@url": -7.592702, - "@url.nil": -8.691315, - "@user": -8.691315, - "@version": -7.081877, - "ARGV": -7.305020, - "ARGV.build_head": -8.691315, - "ARGV.formulae.include": -8.691315, - "ARGV.named.empty": -8.691315, - "AUTO_INDENT": -8.691315, - "ActiveSupport": -8.691315, - "Allows": -8.691315, - "Any": -7.998167, - "Any.serialize": -7.305020, - "Any.unserialize": -7.592702, - "Application": -7.998167, - "Archive": -8.691315, - "ArgumentError": -8.691315, - "Array": -7.998167, - "Base": -8.691315, - "Bundler.require": -8.691315, - "CGIServer.new": -8.691315, - "CHECKSUM_TYPES": -8.691315, - "CHECKSUM_TYPES.detect": -8.691315, - "CHECKSUM_TYPES.each": -8.691315, - "CHECKSUM_TYPES=": -8.691315, - "CLI.new": -8.691315, - "Cache": -8.691315, - "Cannot": -8.691315, - "Cast_mdata_server_t.create_dir_ifneeded": -8.691315, - "Cast_mdata_server_t.del_cast_mdata": -8.691315, - "Cast_mdata_server_t.get_cast_mdata": -8.691315, - "Cast_mdata_server_t.set_cast_mdata_pull": -8.691315, - "Cast_mdata_server_t.set_cast_mdata_push": -8.691315, - "Class": -8.691315, - "Compiler": -8.691315, - "Compiler.new": -8.691315, - "CompilerFailure.new": -7.998167, - "CompilerFailures.new": -8.691315, - "Control": -8.691315, - "CurlDownloadStrategyError": -8.691315, - "DCMAKE_BUILD_TYPE": -8.691315, - "DCMAKE_FIND_FRAMEWORK": -8.691315, - "DCMAKE_INSTALL_PREFIX": -8.691315, - "DEFAULTS": -7.998167, - "DEFAULTS.deep_merge": -8.691315, - "DEPENDENCIES": -8.691315, - "DOCTYPE": -8.691315, - "DSL": -8.691315, - "Delegator": -8.691315, - "Delegator.delegate": -8.691315, - "Delegator.target.helpers": -8.691315, - "Delegator.target.send": -8.691315, - "Delegator.target.use": -8.691315, - "DependencyCollector.new": -8.691315, - "Digest.const_get": -8.691315, - "Dir": -7.592702, - "Dir.pwd": -7.592702, - "Dir.pwd.split": -7.998167, - "Downloading": -8.691315, - "ENV": -6.206408, - "ENV.fetch": -8.691315, - "EOF": -8.691315, - "Environment.run": -8.691315, - "EventMachine": -8.691315, - "Exception": -8.691315, - "Expected": -8.691315, - "Experimental": -8.691315, - "ExtendedCommands": -8.691315, - "FALSE": -8.691315, - "FCGI.each_request": -8.691315, - "FCGI_PURE_RUBY": -8.691315, - "FaultException.new": -8.691315, - "File.basename": -8.691315, - "File.dirname": -6.745404, - "File.exist": -7.998167, - "File.expand_path": -7.305020, - "File.join": -6.611873, - "File.write": -8.691315, - "FileUtils": -8.691315, - "FileUtils.rm": -8.691315, - "Foo": -8.691315, - "For": -8.691315, - "Formula": -7.592702, - "Formula.canonical_name": -8.691315, - "Formula.expand_deps": -8.691315, - "Formula.factory": -7.998167, - "Formula.path": -8.691315, - "FormulaUnavailableError.new": -8.691315, - "GEM": -8.691315, - "GemLoader": -8.691315, - "Got": -8.691315, - "Grit": -8.691315, - "HOMEBREW_CACHE.mkpath": -8.691315, - "HOMEBREW_CACHE_FORMULA": -8.691315, - "HOMEBREW_CACHE_FORMULA.mkpath": -8.691315, - "HOMEBREW_CELLAR": -7.998167, - "HOMEBREW_PREFIX": -8.691315, - "HOMEBREW_REPOSITORY": -7.998167, - "HOMEBREW_REPOSITORY/": -8.691315, - "HTML": -8.691315, - "HTTP": -8.691315, - "Handler.new": -8.691315, - "Hash": -7.592702, - "Hash.new": -8.691315, - "Helpers": -8.691315, - "IRB.conf": -8.691315, - "Ilib": -8.691315, - "Interrupt": -7.998167, - "Invalid": -8.691315, - "JSON.parse": -7.998167, - "Jekyll": -7.592702, - "Jenkins": -8.691315, - "KegOnlyReason.new": -8.691315, - "LAST": -8.691315, - "LOAD_PATH": -8.691315, - "Literal": -7.998167, - "Literal.new": -7.998167, - "LoadError": -7.592702, - "MacOS": -7.998167, - "MultiJsonCoder.new": -8.691315, - "NULL": -8.691315, - "NUMBER": -8.691315, - "NameError": -7.998167, - "Namespace": -8.691315, - "Namespace.new": -7.998167, - "Neoip": -7.081877, - "None": -8.691315, - "NotFound": -8.691315, - "NotImplementedError": -8.691315, - "Object": -8.691315, - "Object.const_get": -8.691315, - "PATH": -8.691315, - "PLATFORMS": -8.691315, - "PROGRAM_NAME": -8.691315, - "Parser": -7.592702, - "Parser.new": -8.691315, - "Patches": -8.691315, - "Patching": -8.691315, - "Pathname": -7.998167, - "Pathname.new": -7.592702, - "Plugin": -8.691315, - "Private": -8.691315, - "Proc.new": -6.293419, - "Pry": -8.691315, - "Pry.config.color": -8.691315, - "Pry.config.commands.alias_command": -8.691315, - "Pry.config.commands.command": -8.691315, - "Pry.config.commands.import": -8.691315, - "Pry.config.history.should_save": -8.691315, - "Pry.config.pager": -8.691315, - "Pry.config.prompt": -8.691315, - "Pry.plugins": -8.691315, - "Q": -8.691315, - "Queue.new": -8.691315, - "RDF": -6.899555, - "RJSON": -8.691315, - "RUBY_ENGINE": -7.998167, - "Racc": -8.691315, - "Racc_arg": -8.691315, - "Racc_debug_parser": -8.691315, - "Racc_token_to_s_table": -8.691315, - "Rack": -8.691315, - "Rainbows": -8.691315, - "Redis": -7.592702, - "Redis.connect": -8.691315, - "Redis.new": -8.691315, - "Redis.respond_to": -8.691315, - "Request": -7.998167, - "Resque": -7.998167, - "Rexpl": -8.691315, - "RuntimeError": -8.691315, - "SHEBANG#!jruby": -8.691315, - "SHEBANG#!macruby": -8.691315, - "SHEBANG#!rake": -8.691315, - "SHEBANG#!rbx": -8.691315, - "SHEBANG#!ruby": -7.998167, - "STRING": -8.691315, - "SecureRandom.hex": -8.691315, - "Set": -8.691315, - "Shoes": -8.691315, - "SimpleCov.add_group": -7.592702, - "SimpleCov.command_name": -8.691315, - "SimpleCov.coverage_dir": -8.691315, - "SimpleCov.merge_timeout": -8.691315, - "Sinatra": -7.998167, - "SoftwareSpecification": -7.998167, - "SoftwareSpecification.new": -8.691315, - "Sorbet": -8.691315, - "Specification.new": -8.691315, - "Specify": -8.691315, - "Spira": -6.611873, - "Stat": -7.998167, - "Stream": -7.592702, - "String": -7.592702, - "SystemCallError": -8.691315, - "TRUE": -8.691315, - "The": -7.592702, - "Thin": -8.691315, - "This": -8.691315, - "ThreadError": -8.691315, - "To": -8.691315, - "Try": -8.691315, - "TypeError": -7.998167, - "Types": -6.611873, - "URI": -7.305020, - "URI.const_defined": -8.691315, - "URI.escape": -8.691315, - "VERSION": -8.691315, - "W": -8.691315, - "Wno": -8.691315, - "Wrapper": -8.691315, - "XMLRPC": -7.998167, - "XSD.integer": -8.691315, - "YAML.load_file": -8.691315, - "You": -8.691315, - "Z": -8.691315, - "Z/": -8.691315, - "[": -4.248663, - "\\": -5.555820, - "]": -4.248663, - "^": -7.592702, - "_.": -8.691315, - "__FILE__": -6.745404, - "__sinatra__": -8.691315, - "_reduce_": -5.695582, - "_reduce_none": -5.858101, - "_values": -6.293419, - "a": -7.081877, - "above": -8.691315, - "absolute_redirects": -8.691315, - "acc": -7.998167, - "accept": -8.691315, - "accept_entry": -8.691315, - "add_charset": -8.691315, - "add_git_tag": -8.691315, - "added_methods": -8.691315, - "after": -7.592702, - "after_all": -8.691315, - "after_fork": -7.998167, - "alias": -7.998167, - "alias_method": -7.998167, - "align": -7.998167, - "all": -7.998167, - "along": -8.691315, - "alpha": -8.691315, - "an": -8.691315, - "analyze": -8.691315, - "ancestor": -7.592702, - "ancestor.const_defined": -8.691315, - "and": -6.899555, - "app": -7.305020, - "app_file": -7.305020, - "app_file=": -8.691315, - "app_icon": -8.691315, - "app_id": -7.998167, - "app_id.to_s": -8.691315, - "app_identifier": -8.691315, - "app_review_information": -8.691315, - "apply_inflections": -8.691315, - "appraise": -7.998167, - "apps": -7.998167, - "are": -8.691315, - "args": -7.998167, - "args.length": -8.691315, - "arial": -8.691315, - "async": -8.691315, - "attr": -7.305020, - "attr_accessor": -7.998167, - "attr_reader": -6.899555, - "attr_rw": -7.081877, - "attr_writer": -7.305020, - "attributes": -7.998167, - "attrs": -7.998167, - "auto": -8.691315, - "automatic_release": -8.691315, - "b": -7.592702, - "be": -7.305020, - "be_a": -7.998167, - "been": -7.998167, - "before": -7.998167, - "before_all": -8.691315, - "before_first_fork": -7.998167, - "before_fork": -7.998167, - "begin": -6.494090, - "below": -8.691315, - "beta": -7.592702, - "bin": -7.305020, - "bind": -8.691315, - "block": -5.257327, - "block_given": -7.305020, - "body": -7.592702, - "bottle": -8.691315, - "bottle_base_url": -8.691315, - "bottle_block": -7.592702, - "bottle_filename": -8.691315, - "bottle_sha": -8.691315, - "bottle_sha1": -7.998167, - "bottle_url": -7.592702, - "bottle_version": -7.592702, - "break": -7.592702, - "brew": -6.494090, - "build_devel": -7.998167, - "build_head": -8.691315, - "buildpath": -7.592702, - "bunzip2": -8.691315, - "bzip2": -8.691315, - "cache_control": -8.691315, - "caches": -8.691315, - "call": -7.998167, - "callback": -7.592702, - "callbacks": -8.691315, - "called": -8.691315, - "camel_cased_word": -7.305020, - "camel_cased_word.split": -8.691315, - "camel_cased_word.to_s": -8.691315, - "camelcase": -8.691315, - "camelize": -8.691315, - "cannot": -8.691315, - "case": -7.305020, - "cask": -8.691315, - "cast_id": -7.998167, - "cast_mdata": -7.998167, - "cast_name": -6.611873, - "cast_privhash": -7.998167, - "cast_privtext": -6.899555, - "cat": -8.691315, - "cc": -7.592702, - "cc.build": -8.691315, - "cc.is_a": -8.691315, - "cc.name": -8.691315, - "cc_failures": -8.691315, - "center": -8.691315, - "cgi_server": -8.691315, - "cgi_server.add_handler": -7.305020, - "cgi_server.serve": -8.691315, - "cgi_server.set_default_handler": -8.691315, - "changelog": -8.691315, - "changes": -8.691315, - "char": -7.305020, - "characters": -8.691315, - "charlock_holmes": -7.998167, - "checksum": -8.691315, - "checksum_type": -7.998167, - "child": -8.691315, - "class": -6.388729, - "class_eval": -8.691315, - "class_name": -7.998167, - "class_value": -7.592702, - "classify": -8.691315, - "clean": -8.691315, - "clear": -8.691315, - "client": -8.691315, - "close": -7.998167, - "closed": -8.691315, - "coder": -7.592702, - "coderay": -7.998167, - "color": -8.691315, - "commit_version_bump": -8.691315, - "compiler": -7.592702, - "compressed_filename": -7.998167, - "compression": -8.691315, - "config": -7.592702, - "config.is_a": -8.691315, - "config_file": -7.998167, - "configuration": -7.592702, - "configure": -7.998167, - "connect": -8.691315, - "const": -7.592702, - "const_regexp": -7.592702, - "constant": -7.305020, - "constant.ancestors.inject": -8.691315, - "constant.const_get": -8.691315, - "constantize": -8.691315, - "content_type": -7.592702, - "context": -8.691315, - "count": -7.081877, - "court": -7.592702, - "court_url": -8.691315, - "created_at": -8.691315, - "curl": -8.691315, - "current": -7.998167, - "dasherize": -8.691315, - "data": -7.081877, - "datatype": -8.691315, - "db": -7.592702, - "declared_trivial": -7.998167, - "decode": -7.998167, - "deconstantize": -8.691315, - "def": -3.839284, - "default": -7.998167, - "default_encoding": -8.691315, - "default_platform": -8.691315, - "define": -8.691315, - "define_method": -8.691315, - "defined": -8.691315, - "delegate": -8.691315, - "delete": -8.691315, - "deliver": -7.592702, - "demo_password": -8.691315, - "demo_user": -8.691315, - "demodulize": -8.691315, - "dep": -7.592702, - "dep.to_s": -8.691315, - "dependencies": -8.691315, - "dependencies.add": -8.691315, - "depends_on": -8.691315, - "deployment_target": -8.691315, - "deps": -8.691315, - "dequeue": -8.691315, - "desc": -7.081877, - "describe": -8.691315, - "description": -8.691315, - "destination": -8.691315, - "dev": -8.691315, - "devel": -8.691315, - "development": -6.899555, - "devices": -8.691315, - "did": -8.691315, - "directives": -7.998167, - "disable": -8.691315, - "ditty.": -8.691315, - "do": -4.683981, - "do_parse": -8.691315, - "doc": -8.691315, - "doesn": -8.691315, - "don": -8.691315, - "download": -7.592702, - "download_strategy.new": -7.998167, - "downloader": -6.899555, - "downloader.fetch": -8.691315, - "dump_errors": -8.691315, - "dup": -8.691315, - "e": -6.611873, - "e.message": -7.998167, - "e.name.to_s": -8.691315, - "each": -7.592702, - "else": -5.646792, - "elsif": -6.745404, - "email": -7.998167, - "empty": -7.998167, - "empty_path_info": -8.691315, - "enable": -8.691315, - "enc": -7.081877, - "encoded": -8.691315, - "end": -3.190056, - "enqueue_to": -8.691315, - "ensure_git_status_clean": -8.691315, - "entries": -8.691315, - "entries.map": -8.691315, - "env": -7.592702, - "environment": -7.998167, - "err": -8.691315, - "err.to_s": -8.691315, - "errback": -8.691315, - "error": -7.081877, - "errors": -8.691315, - "escape_utils": -7.998167, - "etc": -8.691315, - "even": -8.691315, - "evented": -8.691315, - "exception": -8.691315, - "exclusive": -8.691315, - "executed": -8.691315, - "exit": -8.691315, - "expand_deps": -8.691315, - "explanation": -8.691315, - "explanation.to_s.chomp": -8.691315, - "extend": -8.691315, - "extends": -8.691315, - "extensions.map": -8.691315, - "external_deps": -8.691315, - "external_patches": -8.691315, - "f": -6.293419, - "f.deps.map": -8.691315, - "f_dep": -7.592702, - "fail": -8.691315, - "failed": -7.998167, - "fails_with": -7.998167, - "failure": -8.691315, - "failure.build": -8.691315, - "failure.build.zero": -8.691315, - "failure.compiler": -8.691315, - "false": -5.257327, - "family": -8.691315, - "fastlane_version": -8.691315, - "fetch": -8.691315, - "fetched": -7.081877, - "file": -7.998167, - "filename": -7.998167, - "first": -8.691315, - "first_name": -8.691315, - "fn": -7.998167, - "fn.incremental_hash": -8.691315, - "folder": -8.691315, - "font": -7.998167, - "for": -7.998167, - "force": -7.998167, - "format": -8.691315, - "formula": -7.998167, - "formula_with_that_name.file": -8.691315, - "formula_with_that_name.readable": -8.691315, - "framework_version": -7.592702, - "freeze": -8.691315, - "freshness": -8.691315, - "from": -8.691315, - "from_name": -7.998167, - "from_path": -8.691315, - "from_url": -8.691315, - "front": -8.691315, - "ftp": -8.691315, - "gem": -7.305020, - "generated": -8.691315, - "get": -7.998167, - "get_version_short_string": -8.691315, - "git.modified_files.include": -8.691315, - "git_commit_log": -8.691315, - "github": -7.305020, - "github.pr_body": -8.691315, - "github.pr_title": -8.691315, - "glob": -7.998167, - "grammars": -7.998167, - "gunzip": -8.691315, - "gzip": -8.691315, - "h": -7.592702, - "handler": -7.305020, - "has": -8.691315, - "has_app_changes": -8.691315, - "hash": -7.305020, - "hasher": -7.998167, - "have": -8.691315, - "head": -7.081877, - "head_prefix": -7.998167, - "head_prefix.directory": -8.691315, - "header": -8.691315, - "helpers": -7.592702, - "helvetica": -8.691315, - "hockey": -7.592702, - "homepage": -7.998167, - "host": -7.592702, - "html": -8.691315, - "http": -8.691315, - "https": -7.998167, - "i": -7.998167, - "id": -8.691315, - "id=": -8.691315, - "if": -4.548180, - "in": -7.592702, - "include": -7.592702, - "incomplete": -8.691315, - "increment_build_number": -8.691315, - "inflections.uncountables.include": -8.691315, - "info": -7.998167, - "inhibit_all_warnings": -8.691315, - "initialize": -7.592702, - "inline": -7.592702, - "inspect": -8.691315, - "install_type": -7.305020, - "installed_prefix": -8.691315, - "instance": -7.998167, - "instance_eval": -7.592702, - "instance_variable_defined": -7.998167, - "instance_variable_get": -7.998167, - "instance_variable_set": -8.691315, - "integrity": -8.691315, - "internal": -8.691315, - "invalid": -8.691315, - "ios": -7.592702, - "ipa": -7.592702, - "is": -7.998167, - "it": -6.899555, - "item": -7.305020, - "javascript": -8.691315, - "jruby": -8.691315, - "js_file": -8.691315, - "json": -7.998167, - "json.array": -8.691315, - "json.extract": -8.691315, - "json.url": -8.691315, - "junit.headers": -8.691315, - "junit.report": -8.691315, - "just": -8.691315, - "k": -7.998167, - "keep_open": -7.998167, - "keg_only": -7.998167, - "keg_only_reason": -8.691315, - "key": -7.081877, - "keys": -7.081877, - "keywords": -8.691315, - "kind_of": -8.691315, - "klass": -7.592702, - "klass.new": -7.998167, - "klass_name": -7.592702, - "know": -8.691315, - "lambda": -8.691315, - "lane": -6.745404, - "languages": -8.691315, - "last": -7.592702, - "later": -8.691315, - "layout": -8.691315, - "left": -8.691315, - "lib": -8.691315, - "lib_directory": -7.998167, - "libexec": -8.691315, - "like": -8.691315, - "linguist": -7.305020, - "linked_keg": -8.691315, - "lion": -8.691315, - "list_range": -8.691315, - "load": -7.592702, - "location": -8.691315, - "lock": -8.691315, - "logging": -7.998167, - "m": -7.592702, - "m.public_instance_methods": -8.691315, - "macruby": -8.691315, - "make": -8.691315, - "man": -5.858101, - "map": -8.691315, - "margin": -7.998167, - "match": -7.081877, - "max_age": -7.998167, - "may": -8.691315, - "md": -8.691315, - "md5": -7.998167, - "means": -8.691315, - "message": -7.998167, - "metaclass": -7.998167, - "method": -7.998167, - "method_added": -8.691315, - "method_name": -7.081877, - "method_override": -7.305020, - "method_source": -7.998167, - "methodoverride": -7.998167, - "methods": -8.691315, - "methods.each": -8.691315, - "mime": -7.998167, - "mime_type": -8.691315, - "min_stale": -8.691315, - "mirror": -8.691315, - "mirror_list": -8.691315, - "mirror_list.empty": -8.691315, - "mirror_list.shift.values_at": -8.691315, - "mirrors": -6.745404, - "mismatch": -8.691315, - "missing": -8.691315, - "mktemp": -8.691315, - "mocha": -7.998167, - "module": -6.611873, - "must": -7.998167, - "must_revalidate": -7.998167, - "n": -7.081877, - "n.count": -8.691315, - "n.id": -8.691315, - "n.to_f": -8.691315, - "n.to_i": -8.691315, - "name": -4.820114, - "name.basename": -8.691315, - "name.capitalize.gsub": -8.691315, - "name.include": -8.691315, - "name.kind_of": -8.691315, - "name.to_s": -7.998167, - "name_r": -8.691315, - "names": -8.691315, - "names.each": -8.691315, - "namespace": -7.592702, - "nend": -8.691315, - "new": -7.081877, - "next": -8.691315, - "next_token": -8.691315, - "nil": -4.180455, - "no_cache": -8.691315, - "no_store": -8.691315, - "node": -7.998167, - "node_numbers": -8.691315, - "nodes": -8.691315, - "nodoc": -7.592702, - "non": -7.998167, - "not": -7.305020, - "not_found": -8.691315, - "notes": -7.305020, - "notify": -7.592702, - "number": -7.592702, - "number.to_i.abs": -7.998167, - "object": -7.998167, - "of": -7.592702, - "ohai": -7.998167, - "only": -8.691315, - "onoe": -8.691315, - "open": -7.592702, - "opoo": -8.691315, - "options": -8.691315, - "or": -6.745404, - "ordinal": -8.691315, - "ordinalize": -8.691315, - "out": -7.592702, - "output": -7.998167, - "output.puts": -8.691315, - "override": -7.305020, - "p": -6.899555, - "p.to_s": -7.998167, - "package": -8.691315, - "parameter": -8.691315, - "params": -7.998167, - "parse": -8.691315, - "part": -8.691315, - "part.empty": -8.691315, - "partial": -8.691315, - "parts": -7.998167, - "parts.pop": -8.691315, - "parts.reverse.inject": -8.691315, - "passed": -8.691315, - "patch": -7.305020, - "patch_args": -8.691315, - "patch_list": -7.081877, - "patches": -7.998167, - "path": -5.858101, - "path.keys": -8.691315, - "path.names": -8.691315, - "path.nil": -8.691315, - "path.realpath.to_s": -8.691315, - "path.relative_path_from": -8.691315, - "path.respond_to": -7.081877, - "path.rindex": -7.998167, - "path.stem": -8.691315, - "path.to_s": -7.592702, - "paths": -7.592702, - "pattern": -8.691315, - "pcase": -8.691315, - "peek": -8.691315, - "pending": -8.691315, - "person": -8.691315, - "phone_number": -8.691315, - "phone_numbers": -8.691315, - "platform": -7.998167, - "plist": -7.998167, - "plist_version": -8.691315, - "plugin": -7.592702, - "plugin.description": -8.691315, - "plugin.display_name": -8.691315, - "plugin.name": -8.691315, - "plugin.version": -8.691315, - "pluralize": -8.691315, - "png": -7.998167, - "pnumbers": -8.691315, - "pod": -6.745404, - "policy": -8.691315, - "pop": -8.691315, - "port": -7.305020, - "port_lview": -7.998167, - "port_pview": -7.998167, - "possible_alias.file": -8.691315, - "possible_alias.realpath.basename": -8.691315, - "possible_cached_formula.file": -8.691315, - "possible_cached_formula.to_s": -8.691315, - "post": -8.691315, - "preferred_type": -8.691315, - "prefix": -6.126365, - "prefix.parent": -8.691315, - "prefixed_redirects": -8.691315, - "price_tier": -8.691315, - "primary_category": -8.691315, - "private": -7.305020, - "proc": -7.998167, - "processed": -7.998167, - "production": -8.691315, - "prompt": -8.691315, - "protected": -8.691315, - "protection": -8.691315, - "provide": -8.691315, - "proxy_revalidate": -8.691315, - "pry": -7.998167, - "public": -7.592702, - "public_folder": -7.592702, - "push": -8.691315, - "push_to_git_remote": -8.691315, - "put": -8.691315, - "puts": -6.388729, - "pwd": -8.691315, - "px": -7.592702, - "queue": -5.858101, - "queue.to_s": -8.691315, - "queues": -7.592702, - "queues.inject": -8.691315, - "queues.size": -8.691315, - "r": -7.998167, - "racc_action_check": -7.998167, - "racc_action_default": -7.998167, - "racc_action_pointer": -7.998167, - "racc_action_table": -7.998167, - "racc_error": -8.691315, - "racc_goto_check": -7.998167, - "racc_goto_default": -7.998167, - "racc_goto_pointer": -7.998167, - "racc_goto_table": -7.998167, - "racc_nt_base": -7.998167, - "racc_reduce_n": -7.998167, - "racc_reduce_table": -7.998167, - "racc_shift_n": -7.998167, - "racc_token_table": -7.998167, - "racc_use_result_var": -7.998167, - "rack": -8.691315, - "raise": -6.052257, - "raise_error": -8.691315, - "raise_errors": -8.691315, - "rake": -7.592702, - "ratings_config_path": -8.691315, - "rbx": -8.691315, - "reason": -7.998167, - "recursive_deps": -8.691315, - "redis": -6.899555, - "redis.client.id": -8.691315, - "redis.lindex": -8.691315, - "redis.lrange": -8.691315, - "redis.nodes.map": -8.691315, - "redis.respond_to": -7.998167, - "redis.server": -8.691315, - "redis.smembers": -8.691315, - "redis_id": -7.998167, - "reference": -8.691315, - "region": -8.691315, - "region_r": -8.691315, - "registered_at": -8.691315, - "release": -8.691315, - "relevant": -8.691315, - "reload_templates": -8.691315, - "remote": -7.998167, - "remove": -8.691315, - "remove_queue": -8.691315, - "replacement": -7.998167, - "report": -7.998167, - "reports": -8.691315, - "request": -8.691315, - "request.env": -7.998167, - "request.finish": -8.691315, - "request.in": -8.691315, - "request.out": -8.691315, - "request.request_method.downcase": -8.691315, - "require": -4.414648, - "require_all": -7.305020, - "rescue": -6.293419, - "reset": -8.691315, - "respond_to": -8.691315, - "response": -7.998167, - "response.status": -8.691315, - "resque": -7.998167, - "restart_service": -8.691315, - "result": -5.359110, - "result.downcase": -8.691315, - "result.sub": -8.691315, - "retry": -7.998167, - "return": -5.600272, - "role": -8.691315, - "root": -7.081877, - "rsquo": -8.691315, - "ruby": -6.745404, - "ruby_engine": -6.899555, - "ruby_engine.nil": -8.691315, - "rugged": -7.998167, - "rule": -7.998167, - "rules": -8.691315, - "rules.each": -8.691315, - "run": -7.998167, - "running": -8.691315, - "rv": -7.592702, - "s": -7.998167, - "s_max_age": -8.691315, - "safe_system": -7.592702, - "sbin": -8.691315, - "schedule": -8.691315, - "scheduler": -7.592702, - "scheme": -7.305020, - "screenshots_path": -8.691315, - "secondary_category": -8.691315, - "self": -5.918726, - "self.all": -8.691315, - "self.class.cc_failures.find": -8.691315, - "self.class.cc_failures.nil": -8.691315, - "self.class.dependencies.deps": -8.691315, - "self.class.dependencies.external_deps": -8.691315, - "self.class.keg_only_reason": -8.691315, - "self.class.mirrors": -8.691315, - "self.class.path": -8.691315, - "self.class.skip_clean_all": -8.691315, - "self.class.skip_clean_paths.include": -8.691315, - "self.class_s": -7.998167, - "self.configuration": -8.691315, - "self.delegate": -8.691315, - "self.each": -8.691315, - "self.expand_deps": -8.691315, - "self.factory": -8.691315, - "self.helpers": -8.691315, - "self.map": -8.691315, - "self.names": -8.691315, - "self.path": -8.691315, - "self.redis": -7.998167, - "self.register": -8.691315, - "self.require_all_gems": -8.691315, - "self.require_gem": -8.691315, - "self.target": -8.691315, - "self.use": -8.691315, - "send": -8.691315, - "send_file": -8.691315, - "sending": -8.691315, - "serialized": -7.998167, - "serialized.should": -7.998167, - "server": -6.611873, - "server.split": -7.998167, - "server.unshift": -6.899555, - "servers": -7.998167, - "session_secret": -7.592702, - "sessions": -8.691315, - "set": -5.107796, - "set_instance_variable": -6.206408, - "settings": -7.998167, - "settings.add_charset": -8.691315, - "sha1": -6.206408, - "sha256": -8.691315, - "share": -8.691315, - "shift": -8.691315, - "should": -8.691315, - "show_exceptions": -8.691315, - "sig": -7.998167, - "sigh": -7.592702, - "singularize": -8.691315, - "size": -7.592702, - "skip_clean": -7.998167, - "skip_clean_all": -7.998167, - "skip_clean_paths": -8.691315, - "skip_deploy": -7.592702, - "slop": -7.998167, - "source": -7.592702, - "specified": -7.998167, - "specifies": -8.691315, - "specs": -5.983264, - "specs=": -7.592702, - "src=": -8.691315, - "srv_str": -7.305020, - "stable": -7.998167, - "stack": -7.998167, - "stage": -7.592702, - "standard": -7.592702, - "start": -6.745404, - "static": -8.691315, - "static_cache_control": -8.691315, - "status": -7.305020, - "std_cmake_args": -8.691315, - "stderr.puts": -7.998167, - "stdin": -8.691315, - "stdout": -8.691315, - "stdout.puts": -8.691315, - "sticky": -8.691315, - "store": -8.691315, - "stream": -8.691315, - "super": -7.305020, - "supplied": -7.081877, - "supplied.empty": -8.691315, - "t": -7.592702, - "table_name": -8.691315, - "table_name.to_s.sub": -8.691315, - "tableize": -8.691315, - "tag": -8.691315, - "tap": -7.592702, - "target": -7.998167, - "target_file": -6.899555, - "task": -7.998167, - "template": -8.691315, - "test": -6.745404, - "test_disabled": -7.998167, - "text": -7.592702, - "the": -6.388729, - "then": -7.592702, - "there": -8.691315, - "this": -7.998167, - "though": -8.691315, - "thread_safe": -8.691315, - "threaded": -8.691315, - "title": -8.691315, - "to": -7.998167, - "to_check": -7.998167, - "to_s": -7.592702, - "tokenizer": -7.998167, - "true": -5.513261, - "type": -6.126365, - "type.to_s.upcase": -8.691315, - "type=": -8.691315, - "types": -7.998167, - "u": -8.691315, - "u.phone_numbers": -8.691315, - "underscore": -8.691315, - "underscored_word": -8.691315, - "underscored_word.tr": -8.691315, - "uninitialized": -8.691315, - "unless": -6.126365, - "unstable": -7.592702, - "upcase": -7.998167, - "uri_pathquery": -7.998167, - "url": -5.695582, - "url=": -8.691315, - "use": -8.691315, - "use_code": -8.691315, - "user": -7.998167, - "user.is_admin": -8.691315, - "username": -8.691315, - "usr": -7.592702, - "v": -7.592702, - "val": -5.433218, - "val=": -7.998167, - "validate_variable": -6.745404, - "value": -6.899555, - "value.should": -7.998167, - "verify": -8.691315, - "verify_download_integrity": -7.998167, - "version": -5.918726, - "views": -8.691315, - "void": -8.691315, - "w": -6.899555, - "web": -7.305020, - "webrick": -8.691315, - "website": -8.691315, - "when": -6.494090, - "whether": -8.691315, - "width": -8.691315, - "with": -7.998167, - "with_params": -8.691315, - "word": -8.691315, - "word.empty": -8.691315, - "word.to_s.dup": -8.691315, - "workers": -8.691315, - "workers.size.to_i": -8.691315, - "working": -7.998167, - "working.size": -8.691315, - "wrong": -8.691315, - "xcodeproj": -8.691315, - "xctest": -8.691315, - "xhtml": -8.691315, - "xml": -7.998167, - "yajl": -7.998167, - "yet": -8.691315, - "yield": -6.899555, - "your": -8.691315, - "zA": -8.691315, - "zero": -8.691315, - "{": -4.702331, - "|": -4.360581, - "||": -5.746876, - "}": -4.683981, - "~": -6.052257, + "!": -5.490424, + "#": -5.713568, + "####": -8.016153, + "###############################################################################": -8.016153, + "#c": -8.709300, + "#cgi_server.serve": -8.709300, + "#exit": -8.709300, + "#remove": -8.709300, + "$": -5.818928, + "%": -6.917541, + "&": -5.876087, + "&&": -6.629859, + "(": -3.160224, + ")": -3.164123, + "*added_methods": -8.709300, + "*args": -6.406715, + "*extensions": -7.323006, + "*methods": -8.709300, + "+": -4.925110, + ",": -2.141222, + "-": -4.550417, + "..": -8.709300, + "./": -8.709300, + ".basename": -8.709300, + ".border_widths": -7.323006, + ".borders": -7.323006, + ".column": -6.629859, + ".deep_merge": -8.709300, + ".destroy": -8.709300, + ".disable": -8.709300, + ".each": -8.016153, + ".flatten": -8.709300, + ".flatten.each": -8.709300, + ".flatten.uniq": -8.709300, + ".font_style": -8.709300, + ".gsub": -8.016153, + ".include": -8.016153, + ".join": -8.709300, + ".map": -7.323006, + ".pop": -8.709300, + ".rb": -8.709300, + ".read": -7.610688, + ".run": -8.709300, + ".should": -7.610688, + ".size": -8.709300, + ".slice": -8.709300, + ".sort": -8.709300, + ".sort_by": -8.709300, + ".split": -8.709300, + ".to_i": -8.016153, + ".to_s": -7.610688, + ".to_s.split": -8.709300, + ".to_sym": -8.709300, + ".unshift": -8.016153, + ".void": -8.709300, + "/": -5.936711, + "/.*": -8.709300, + "//": -8.709300, + "/@example.net": -8.709300, + "/@name": -8.709300, + "/Library/Taps/": -8.709300, + "/h": -8.709300, + "/not": -8.709300, + "/redis": -8.709300, + "/usr/bin/env": -6.763390, + "0": -8.709300, + "404": -8.709300, + "8": -8.709300, + ":": -2.730414, + ";": -4.880659, + "<": -6.763390, + "<#{@instance.class}>": -8.709300, + "<(data)>": -8.709300, + "<-EOF>": -8.709300, + "<-HTML).gsub(/^>": -8.709300, + "</body>": -8.709300, + "</div>": -8.709300, + "</head>": -8.709300, + "</html>": -8.709300, + "</pre>": -8.709300, + "</style>": -8.709300, + "</tt>": -8.709300, + "<<": -6.224393, + "<body>": -8.709300, + "<david.calavera@gmail.com>": -8.709300, + "<div>": -8.709300, + "<head>": -8.709300, + "<html>": -8.709300, + "<img>": -8.709300, + "<internal:/,>": -8.709300, + "<pre>": -8.709300, + "<source>": -8.709300, + "<style>": -8.709300, + "<tt>": -8.709300, + "=": -2.966297, + ">": -4.187511, + "?": -4.339852, + "@after_fork": -8.016153, + "@before_first_fork": -8.016153, + "@before_fork": -8.016153, + "@bottle_sha": -8.709300, + "@bottle_url": -8.709300, + "@cc_failures": -8.016153, + "@coder": -8.709300, + "@courts": -8.709300, + "@dependencies": -8.709300, + "@downloader": -8.709300, + "@env": -8.016153, + "@handler": -8.709300, + "@handler.end_array": -8.709300, + "@handler.end_object": -8.709300, + "@handler.scalar": -8.016153, + "@handler.start_array": -8.709300, + "@handler.start_object": -8.709300, + "@head": -8.016153, + "@instance": -8.016153, + "@instance.settings": -8.709300, + "@keg_only_reason": -8.709300, + "@mirrors.uniq": -8.709300, + "@name": -7.610688, + "@order.bill_address": -8.709300, + "@order.email": -8.709300, + "@order.ship_address": -8.709300, + "@path": -8.709300, + "@queues": -8.016153, + "@queues.delete": -8.709300, + "@redis": -6.917541, + "@skip_clean_all": -8.016153, + "@skip_clean_paths": -7.610688, + "@skip_clean_paths.include": -8.709300, + "@spec_to_use": -7.323006, + "@spec_to_use.detect_version": -8.709300, + "@spec_to_use.specs": -8.709300, + "@spec_to_use.url": -8.709300, + "@specs": -8.709300, + "@stack": -8.709300, + "@stack.call": -8.709300, + "@standard": -8.016153, + "@standard.nil": -8.709300, + "@tokenizer": -8.709300, + "@tokenizer.next_token": -8.709300, + "@unstable": -8.709300, + "@uri": -7.099862, + "@url": -7.610688, + "@url.nil": -8.709300, + "@user": -8.709300, + "@version": -7.099862, + "ARGV": -7.323006, + "ARGV.build_head": -8.709300, + "ARGV.formulae.include": -8.709300, + "ARGV.named.empty": -8.709300, + "AUTO_INDENT": -8.709300, + "ActiveSupport": -8.709300, + "Allows": -8.709300, + "Any": -8.016153, + "Any.serialize": -7.323006, + "Any.unserialize": -7.610688, + "Application": -8.016153, + "Archive": -8.709300, + "ArgumentError": -8.709300, + "Array": -8.016153, + "Base": -8.709300, + "Bundler.require": -8.709300, + "CGIServer.new": -8.709300, + "CHECKSUM_TYPES": -8.709300, + "CHECKSUM_TYPES.detect": -8.709300, + "CHECKSUM_TYPES.each": -8.709300, + "CHECKSUM_TYPES=": -8.709300, + "CLI.new": -8.709300, + "Cache": -8.709300, + "Cannot": -8.709300, + "Cast_mdata_server_t.create_dir_ifneeded": -8.709300, + "Cast_mdata_server_t.del_cast_mdata": -8.709300, + "Cast_mdata_server_t.get_cast_mdata": -8.709300, + "Cast_mdata_server_t.set_cast_mdata_pull": -8.709300, + "Cast_mdata_server_t.set_cast_mdata_push": -8.709300, + "Class": -8.709300, + "Compiler": -8.709300, + "Compiler.new": -8.709300, + "CompilerFailure.new": -8.016153, + "CompilerFailures.new": -8.709300, + "Control": -8.709300, + "CurlDownloadStrategyError": -8.709300, + "DCMAKE_BUILD_TYPE": -8.709300, + "DCMAKE_FIND_FRAMEWORK": -8.709300, + "DCMAKE_INSTALL_PREFIX": -8.709300, + "DEFAULTS": -8.016153, + "DEFAULTS.deep_merge": -8.709300, + "DOCTYPE": -8.709300, + "DSL": -8.709300, + "Delegator": -8.709300, + "Delegator.delegate": -8.709300, + "Delegator.target.helpers": -8.709300, + "Delegator.target.send": -8.709300, + "Delegator.target.use": -8.709300, + "DependencyCollector.new": -8.709300, + "Digest.const_get": -8.709300, + "Dir": -7.610688, + "Dir.pwd": -7.610688, + "Dir.pwd.split": -8.016153, + "Downloading": -8.709300, + "ENV": -6.224393, + "ENV.fetch": -8.709300, + "EOF": -8.709300, + "Environment.run": -8.709300, + "EventMachine": -8.709300, + "Exception": -8.709300, + "Expected": -8.709300, + "Experimental": -8.709300, + "ExtendedCommands": -8.709300, + "FALSE": -8.709300, + "FCGI.each_request": -8.709300, + "FCGI_PURE_RUBY": -8.709300, + "FaultException.new": -8.709300, + "File.basename": -8.709300, + "File.dirname": -6.763390, + "File.exist": -8.016153, + "File.expand_path": -7.323006, + "File.join": -6.629859, + "File.write": -8.709300, + "FileUtils": -8.709300, + "FileUtils.rm": -8.709300, + "Foo": -8.709300, + "For": -8.709300, + "Formula": -7.610688, + "Formula.canonical_name": -8.709300, + "Formula.expand_deps": -8.709300, + "Formula.factory": -8.016153, + "Formula.path": -8.709300, + "FormulaUnavailableError.new": -8.709300, + "GemLoader": -8.709300, + "Got": -8.709300, + "Grit": -8.709300, + "HOMEBREW_CACHE.mkpath": -8.709300, + "HOMEBREW_CACHE_FORMULA": -8.709300, + "HOMEBREW_CACHE_FORMULA.mkpath": -8.709300, + "HOMEBREW_CELLAR": -8.016153, + "HOMEBREW_PREFIX": -8.709300, + "HOMEBREW_REPOSITORY": -8.016153, + "HOMEBREW_REPOSITORY/": -8.709300, + "HTML": -8.709300, + "HTTP": -8.709300, + "Handler.new": -8.709300, + "Hash": -7.610688, + "Hash.new": -8.709300, + "Helpers": -8.709300, + "I": -8.016153, + "IRB.conf": -8.709300, + "Ilib": -8.709300, + "Interrupt": -8.016153, + "Invalid": -8.709300, + "JSON.parse": -8.016153, + "Jekyll": -7.610688, + "Jenkins": -8.709300, + "KegOnlyReason.new": -8.709300, + "LAST": -8.709300, + "LOAD_PATH": -8.709300, + "Literal": -8.016153, + "Literal.new": -8.016153, + "LoadError": -7.610688, + "MacOS": -8.016153, + "MultiJsonCoder.new": -8.709300, + "NULL": -8.709300, + "NUMBER": -8.709300, + "NameError": -8.016153, + "Namespace": -8.709300, + "Namespace.new": -8.016153, + "Neoip": -7.099862, + "None": -8.709300, + "NotFound": -8.709300, + "NotImplementedError": -8.709300, + "Object": -8.709300, + "Object.const_get": -8.709300, + "PROGRAM_NAME": -8.709300, + "Parser": -7.610688, + "Parser.new": -8.709300, + "Patches": -8.709300, + "Patching": -8.709300, + "Pathname": -8.016153, + "Pathname.new": -7.610688, + "Plugin": -8.709300, + "Private": -8.709300, + "Proc.new": -6.311405, + "Pry": -8.709300, + "Pry.config.color": -8.709300, + "Pry.config.commands.alias_command": -8.709300, + "Pry.config.commands.command": -8.709300, + "Pry.config.commands.import": -8.709300, + "Pry.config.history.should_save": -8.709300, + "Pry.config.pager": -8.709300, + "Pry.config.prompt": -8.709300, + "Pry.plugins": -8.709300, + "Q": -8.016153, + "Queue.new": -8.709300, + "RDF": -6.917541, + "RJSON": -8.709300, + "RUBY_ENGINE": -8.016153, + "Racc": -8.709300, + "Racc_arg": -8.709300, + "Racc_debug_parser": -8.709300, + "Racc_token_to_s_table": -8.709300, + "Rack": -8.709300, + "Rainbows": -8.709300, + "Redis": -7.610688, + "Redis.connect": -8.709300, + "Redis.new": -8.709300, + "Redis.respond_to": -8.709300, + "Request": -8.016153, + "Resque": -8.016153, + "Rexpl": -8.709300, + "RuntimeError": -8.709300, + "SHEBANG#!jruby": -8.709300, + "SHEBANG#!macruby": -8.709300, + "SHEBANG#!rake": -8.709300, + "SHEBANG#!rbx": -8.709300, + "SHEBANG#!ruby": -8.016153, + "STRING": -8.709300, + "SecureRandom.hex": -8.709300, + "Set": -8.709300, + "Shoes": -8.709300, + "SimpleCov.add_group": -7.610688, + "SimpleCov.command_name": -8.709300, + "SimpleCov.coverage_dir": -8.709300, + "SimpleCov.merge_timeout": -8.709300, + "Sinatra": -8.016153, + "SoftwareSpecification": -8.016153, + "SoftwareSpecification.new": -8.709300, + "SolidusSupport.combined_first_and_last_name_in_address": -8.709300, + "Sorbet": -8.709300, + "Specification.new": -8.709300, + "Specify": -8.709300, + "Spira": -6.629859, + "Stat": -8.016153, + "Stream": -7.610688, + "String": -7.610688, + "SystemCallError": -8.709300, + "TRUE": -8.709300, + "The": -7.610688, + "Thin": -8.709300, + "This": -8.709300, + "ThreadError": -8.709300, + "To": -8.709300, + "Try": -8.709300, + "TypeError": -8.016153, + "Types": -6.629859, + "URI": -7.323006, + "URI.const_defined": -8.709300, + "URI.escape": -8.709300, + "VERSION": -8.709300, + "W": -8.709300, + "Wno": -8.709300, + "Wrapper": -8.709300, + "XMLRPC": -8.016153, + "XSD.integer": -8.709300, + "YAML.load_file": -8.709300, + "You": -8.709300, + "Z": -8.709300, + "Z/": -8.709300, + "[": -4.144952, + "\\": -5.573806, + "]": -4.144952, + "^": -7.610688, + "_.": -8.709300, + "__FILE__": -6.763390, + "__sinatra__": -8.709300, + "_reduce_": -5.713568, + "_reduce_none": -5.876087, + "_values": -6.311405, + "a": -7.099862, + "above": -8.709300, + "absolute_redirects": -8.709300, + "acc": -8.016153, + "accept": -8.709300, + "accept_entry": -8.709300, + "add_charset": -8.709300, + "add_git_tag": -8.709300, + "added_methods": -8.709300, + "address": -8.709300, + "address.address": -8.016153, + "address.full_name": -8.709300, + "address.name": -8.709300, + "address.state": -8.709300, + "address.state.abbr": -8.709300, + "address_info": -7.610688, + "after": -7.610688, + "after_all": -8.709300, + "after_fork": -8.016153, + "alias": -8.016153, + "alias_method": -8.016153, + "align": -8.016153, + "all": -8.016153, + "along": -8.709300, + "alpha": -8.709300, + "an": -8.709300, + "analyze": -8.709300, + "ancestor": -7.610688, + "ancestor.const_defined": -8.709300, + "and": -6.917541, + "anonymous": -8.709300, + "app": -7.323006, + "app_file": -7.323006, + "app_file=": -8.709300, + "app_icon": -8.709300, + "app_id": -8.016153, + "app_id.to_s": -8.709300, + "app_identifier": -8.709300, + "app_review_information": -8.709300, + "apply_inflections": -8.709300, + "appraise": -8.016153, + "apps": -8.016153, + "are": -8.709300, + "args": -8.016153, + "args.length": -8.709300, + "arial": -8.709300, + "async": -8.709300, + "attr": -7.323006, + "attr_accessor": -8.016153, + "attr_reader": -6.917541, + "attr_rw": -7.099862, + "attr_writer": -7.323006, + "attributes": -8.016153, + "attrs": -8.016153, + "auto": -8.709300, + "automatic_release": -8.709300, + "b": -8.709300, + "be": -7.323006, + "be_a": -8.016153, + "been": -8.016153, + "before": -8.016153, + "before_all": -8.709300, + "before_first_fork": -8.016153, + "before_fork": -8.016153, + "begin": -6.512075, + "below": -8.709300, + "beta": -7.610688, + "bill_address": -8.016153, + "bin": -7.323006, + "bind": -8.709300, + "block": -5.275313, + "block_given": -7.323006, + "body": -7.610688, + "bold": -8.709300, + "bottle": -8.709300, + "bottle_base_url": -8.709300, + "bottle_block": -7.610688, + "bottle_filename": -8.709300, + "bottle_sha": -8.709300, + "bottle_sha1": -8.016153, + "bottle_url": -7.610688, + "bottle_version": -7.610688, + "bottom": -7.323006, + "break": -7.610688, + "brew": -6.512075, + "build_devel": -8.016153, + "build_head": -8.709300, + "buildpath": -7.610688, + "bunzip2": -8.709300, + "bzip2": -8.709300, + "cache_control": -8.709300, + "caches": -8.709300, + "call": -8.016153, + "callback": -7.610688, + "callbacks": -8.709300, + "called": -8.709300, + "camel_cased_word": -7.323006, + "camel_cased_word.split": -8.709300, + "camel_cased_word.to_s": -8.709300, + "camelcase": -8.709300, + "camelize": -8.709300, + "cannot": -8.709300, + "case": -7.323006, + "cask": -8.709300, + "cast_id": -8.016153, + "cast_mdata": -8.016153, + "cast_name": -6.629859, + "cast_privhash": -8.016153, + "cast_privtext": -6.917541, + "cat": -8.709300, + "cc": -7.610688, + "cc.build": -8.709300, + "cc.is_a": -8.709300, + "cc.name": -8.709300, + "cc_failures": -8.709300, + "center": -8.709300, + "cgi_server": -8.709300, + "cgi_server.add_handler": -7.323006, + "cgi_server.serve": -8.709300, + "cgi_server.set_default_handler": -8.709300, + "changelog": -8.709300, + "changes": -8.709300, + "char": -7.323006, + "characters": -8.709300, + "checksum": -8.709300, + "checksum_type": -8.016153, + "child": -8.709300, + "class": -6.406715, + "class_eval": -8.709300, + "class_name": -8.016153, + "class_value": -7.610688, + "classify": -8.709300, + "clean": -8.709300, + "clear": -8.709300, + "client": -8.709300, + "close": -8.016153, + "closed": -8.709300, + "coder": -7.610688, + "color": -8.709300, + "commit_version_bump": -8.709300, + "compiler": -7.610688, + "compressed_filename": -8.016153, + "compression": -8.709300, + "config": -7.610688, + "config.is_a": -8.709300, + "config_file": -8.016153, + "configuration": -7.610688, + "configure": -8.016153, + "connect": -8.709300, + "const": -7.610688, + "const_regexp": -7.610688, + "constant": -7.323006, + "constant.ancestors.inject": -8.709300, + "constant.const_get": -8.709300, + "constantize": -8.709300, + "content_type": -7.610688, + "context": -8.709300, + "count": -7.099862, + "court": -7.610688, + "court_url": -8.709300, + "created_at": -8.709300, + "curl": -8.709300, + "current": -8.016153, + "dasherize": -8.709300, + "data": -6.763390, + "datatype": -8.709300, + "db": -7.610688, + "declared_trivial": -8.016153, + "decode": -8.016153, + "deconstantize": -8.709300, + "def": -3.849488, + "default": -8.016153, + "default_encoding": -8.709300, + "default_platform": -8.709300, + "define": -8.709300, + "define_method": -8.709300, + "defined": -8.709300, + "delegate": -8.709300, + "delete": -8.709300, + "deliver": -7.610688, + "demo_password": -8.709300, + "demo_user": -8.709300, + "demodulize": -8.709300, + "dep": -7.610688, + "dep.to_s": -8.709300, + "dependencies": -8.709300, + "dependencies.add": -8.709300, + "depends_on": -8.709300, + "deployment_target": -8.709300, + "deps": -8.709300, + "dequeue": -8.709300, + "desc": -7.099862, + "describe": -8.709300, + "description": -8.709300, + "destination": -8.709300, + "dev": -8.709300, + "devel": -8.709300, + "development": -6.917541, + "devices": -8.709300, + "did": -8.709300, + "directives": -8.016153, + "disable": -8.709300, + "ditty.": -8.709300, + "do": -4.683948, + "do_parse": -8.709300, + "doc": -8.709300, + "doesn": -8.709300, + "don": -8.709300, + "download": -7.610688, + "download_strategy.new": -8.016153, + "downloader": -6.917541, + "downloader.fetch": -8.709300, + "dump_errors": -8.709300, + "dup": -8.709300, + "e": -6.629859, + "e.message": -8.016153, + "e.name.to_s": -8.709300, + "each": -7.610688, + "else": -5.664778, + "elsif": -6.763390, + "email": -8.016153, + "empty": -8.016153, + "empty_path_info": -8.709300, + "enable": -8.709300, + "enc": -7.099862, + "encoded": -8.709300, + "end": -3.199912, + "enqueue_to": -8.709300, + "ensure_git_status_clean": -8.709300, + "entries": -8.709300, + "entries.map": -8.709300, + "env": -7.610688, + "environment": -8.016153, + "err": -8.709300, + "err.to_s": -8.709300, + "errback": -8.709300, + "error": -7.099862, + "errors": -8.709300, + "etc": -8.709300, + "even": -8.709300, + "evented": -8.709300, + "exception": -8.709300, + "exclusive": -8.709300, + "executed": -8.709300, + "exit": -8.709300, + "expand_deps": -8.709300, + "explanation": -8.709300, + "explanation.to_s.chomp": -8.709300, + "extend": -8.709300, + "extends": -8.709300, + "extensions.map": -8.709300, + "external_deps": -8.709300, + "external_patches": -8.709300, + "f": -6.311405, + "f.deps.map": -8.709300, + "f_dep": -7.610688, + "fail": -8.709300, + "failed": -8.016153, + "fails_with": -8.016153, + "failure": -8.709300, + "failure.build": -8.709300, + "failure.build.zero": -8.709300, + "failure.compiler": -8.709300, + "false": -5.275313, + "family": -8.709300, + "fastlane_version": -8.709300, + "fetch": -8.709300, + "fetched": -7.099862, + "file": -8.016153, + "filename": -8.016153, + "first": -8.709300, + "first_name": -8.709300, + "fn": -8.016153, + "fn.incremental_hash": -8.709300, + "folder": -8.709300, + "font": -8.016153, + "for": -8.016153, + "force": -8.016153, + "format": -8.709300, + "formula": -8.016153, + "formula_with_that_name.file": -8.709300, + "formula_with_that_name.readable": -8.709300, + "framework_version": -7.610688, + "freeze": -8.709300, + "freshness": -8.709300, + "from": -8.709300, + "from_name": -8.016153, + "from_path": -8.709300, + "from_url": -8.709300, + "front": -8.709300, + "ftp": -8.709300, + "gem": -7.323006, + "generated": -8.709300, + "get": -8.016153, + "get_version_short_string": -8.709300, + "git.modified_files.include": -8.709300, + "git_commit_log": -8.709300, + "github.pr_body": -8.709300, + "github.pr_title": -8.709300, + "glob": -8.016153, + "gunzip": -8.709300, + "gzip": -8.709300, + "h": -7.610688, + "handler": -7.323006, + "has": -8.709300, + "has_app_changes": -8.709300, + "hash": -7.323006, + "hasher": -8.016153, + "have": -8.709300, + "head": -7.099862, + "head_prefix": -8.016153, + "head_prefix.directory": -8.709300, + "header": -8.709300, + "helpers": -7.610688, + "helvetica": -8.709300, + "hockey": -7.610688, + "homepage": -8.016153, + "host": -7.610688, + "html": -8.709300, + "http": -8.709300, + "https": -8.709300, + "i": -8.016153, + "id": -8.709300, + "id=": -8.709300, + "if": -4.550417, + "in": -7.610688, + "include": -7.610688, + "incomplete": -8.709300, + "increment_build_number": -8.709300, + "inflections.uncountables.include": -8.709300, + "info": -6.763390, + "info.strip": -8.709300, + "inhibit_all_warnings": -8.709300, + "initialize": -7.610688, + "inline": -7.610688, + "inspect": -8.709300, + "install_type": -7.323006, + "installed_prefix": -8.709300, + "instance": -8.016153, + "instance_eval": -7.610688, + "instance_variable_defined": -8.016153, + "instance_variable_get": -8.016153, + "instance_variable_set": -8.709300, + "integrity": -8.709300, + "internal": -8.709300, + "invalid": -8.709300, + "ios": -7.610688, + "ipa": -7.610688, + "is": -8.016153, + "it": -6.917541, + "item": -7.323006, + "javascript": -8.709300, + "jruby": -8.709300, + "js_file": -8.709300, + "json": -8.016153, + "json.array": -8.709300, + "json.extract": -8.709300, + "json.url": -8.709300, + "junit.headers": -8.709300, + "junit.report": -8.709300, + "just": -8.709300, + "k": -8.016153, + "keep_open": -8.016153, + "keg_only": -8.016153, + "keg_only_reason": -8.709300, + "key": -7.099862, + "keys": -7.099862, + "keywords": -8.709300, + "kind_of": -8.709300, + "klass": -7.610688, + "klass.new": -8.016153, + "klass_name": -7.610688, + "know": -8.709300, + "lambda": -8.709300, + "lane": -6.763390, + "languages": -8.709300, + "last": -7.610688, + "later": -8.709300, + "layout": -8.709300, + "left": -7.099862, + "lib": -8.709300, + "lib_directory": -8.016153, + "libexec": -8.709300, + "like": -8.709300, + "linked_keg": -8.709300, + "lion": -8.709300, + "list_range": -8.709300, + "load": -7.610688, + "location": -8.709300, + "lock": -8.709300, + "logging": -8.016153, + "m": -7.610688, + "m.public_instance_methods": -8.709300, + "macruby": -8.709300, + "make": -8.709300, + "man": -5.876087, + "map": -8.709300, + "margin": -8.016153, + "match": -7.099862, + "max_age": -8.016153, + "may": -8.709300, + "md": -8.709300, + "md5": -8.016153, + "means": -8.709300, + "message": -8.016153, + "method": -8.016153, + "method_added": -8.709300, + "method_name": -7.099862, + "method_override": -7.323006, + "methodoverride": -8.016153, + "methods": -8.709300, + "methods.each": -8.709300, + "mime_type": -8.709300, + "min_stale": -8.709300, + "mirror": -8.709300, + "mirror_list": -8.709300, + "mirror_list.empty": -8.709300, + "mirror_list.shift.values_at": -8.709300, + "mirrors": -6.763390, + "mismatch": -8.709300, + "missing": -8.709300, + "mktemp": -8.709300, + "module": -6.629859, + "move_down": -8.709300, + "must": -8.016153, + "must_revalidate": -8.016153, + "n": -7.099862, + "n.count": -8.709300, + "n.id": -8.709300, + "n.t": -8.016153, + "n.to_f": -8.709300, + "n.to_i": -8.709300, + "name": -4.838099, + "name.basename": -8.709300, + "name.capitalize.gsub": -8.709300, + "name.include": -8.709300, + "name.kind_of": -8.709300, + "name.to_s": -8.016153, + "name_r": -8.709300, + "names": -8.709300, + "names.each": -8.709300, + "namespace": -7.610688, + "nend": -8.709300, + "new": -7.099862, + "next": -8.709300, + "next_token": -8.709300, + "nil": -4.198441, + "no_cache": -8.709300, + "no_store": -8.709300, + "node": -8.016153, + "node_numbers": -8.709300, + "nodes": -8.709300, + "nodoc": -7.610688, + "non": -8.016153, + "not": -7.323006, + "not_found": -8.709300, + "notes": -7.323006, + "notify": -7.610688, + "number": -7.610688, + "number.to_i.abs": -8.016153, + "object": -8.016153, + "of": -7.610688, + "ohai": -8.016153, + "only": -8.709300, + "onoe": -8.709300, + "open": -7.610688, + "opoo": -8.709300, + "options": -8.709300, + "or": -6.763390, + "ordinal": -8.709300, + "ordinalize": -8.709300, + "out": -7.610688, + "output": -8.016153, + "output.puts": -8.709300, + "override": -7.323006, + "p": -6.917541, + "p.to_s": -8.016153, + "package": -8.709300, + "parameter": -8.709300, + "params": -8.016153, + "parse": -8.709300, + "part": -8.709300, + "part.empty": -8.709300, + "partial": -8.709300, + "parts": -8.016153, + "parts.pop": -8.709300, + "parts.reverse.inject": -8.709300, + "passed": -8.709300, + "patch": -7.323006, + "patch_args": -8.709300, + "patch_list": -7.099862, + "patches": -8.016153, + "path": -5.876087, + "path.keys": -8.709300, + "path.names": -8.709300, + "path.nil": -8.709300, + "path.realpath.to_s": -8.709300, + "path.relative_path_from": -8.709300, + "path.respond_to": -7.099862, + "path.rindex": -8.016153, + "path.stem": -8.709300, + "path.to_s": -7.610688, + "paths": -7.610688, + "pattern": -8.709300, + "pcase": -8.709300, + "peek": -8.709300, + "pending": -8.709300, + "person": -8.709300, + "phone_number": -8.709300, + "phone_numbers": -8.709300, + "platform": -8.016153, + "plist_version": -8.709300, + "plugin": -7.610688, + "plugin.description": -8.709300, + "plugin.display_name": -8.709300, + "plugin.name": -8.709300, + "plugin.version": -8.709300, + "pluralize": -8.709300, + "png": -8.016153, + "pnumbers": -8.709300, + "pod": -6.763390, + "policy": -8.709300, + "pop": -8.709300, + "port": -7.323006, + "port_lview": -8.016153, + "port_pview": -8.016153, + "possible_alias.file": -8.709300, + "possible_alias.realpath.basename": -8.709300, + "possible_cached_formula.file": -8.709300, + "possible_cached_formula.to_s": -8.709300, + "post": -8.709300, + "preferred_type": -8.709300, + "prefix": -6.144351, + "prefix.parent": -8.709300, + "prefixed_redirects": -8.709300, + "present": -8.709300, + "price_tier": -8.709300, + "primary_category": -8.709300, + "private": -7.323006, + "proc": -8.016153, + "processed": -8.016153, + "production": -8.709300, + "prompt": -8.709300, + "protected": -8.709300, + "protection": -8.709300, + "provide": -8.709300, + "proxy_revalidate": -8.709300, + "public": -7.610688, + "public_folder": -7.610688, + "push": -8.709300, + "push_to_git_remote": -8.709300, + "put": -8.709300, + "puts": -6.406715, + "pwd": -8.709300, + "px": -7.610688, + "queue": -5.876087, + "queue.to_s": -8.709300, + "queues": -7.610688, + "queues.inject": -8.709300, + "queues.size": -8.709300, + "r": -8.016153, + "racc_action_check": -8.016153, + "racc_action_default": -8.016153, + "racc_action_pointer": -8.016153, + "racc_action_table": -8.016153, + "racc_error": -8.709300, + "racc_goto_check": -8.016153, + "racc_goto_default": -8.016153, + "racc_goto_pointer": -8.016153, + "racc_goto_table": -8.016153, + "racc_nt_base": -8.016153, + "racc_reduce_n": -8.016153, + "racc_reduce_table": -8.016153, + "racc_shift_n": -8.016153, + "racc_token_table": -8.016153, + "racc_use_result_var": -8.016153, + "rack": -8.709300, + "raise": -6.070243, + "raise_error": -8.709300, + "raise_errors": -8.709300, + "rake": -8.709300, + "ratings_config_path": -8.709300, + "rbx": -8.709300, + "reason": -8.016153, + "recursive_deps": -8.709300, + "redis": -6.917541, + "redis.client.id": -8.709300, + "redis.lindex": -8.709300, + "redis.lrange": -8.709300, + "redis.nodes.map": -8.709300, + "redis.respond_to": -8.016153, + "redis.server": -8.709300, + "redis.smembers": -8.709300, + "redis_id": -8.016153, + "reference": -8.709300, + "region": -8.709300, + "region_r": -8.709300, + "registered_at": -8.709300, + "release": -8.709300, + "relevant": -8.709300, + "reload_templates": -8.709300, + "remove": -8.709300, + "remove_queue": -8.709300, + "replacement": -8.016153, + "report": -8.016153, + "reports": -8.709300, + "request": -8.709300, + "request.env": -8.016153, + "request.finish": -8.709300, + "request.in": -8.709300, + "request.out": -8.709300, + "request.request_method.downcase": -8.709300, + "require": -4.432634, + "require_all": -7.323006, + "rescue": -6.311405, + "reset": -8.709300, + "respond_to": -8.709300, + "response": -8.016153, + "response.status": -8.709300, + "resque": -8.016153, + "restart_service": -8.709300, + "result": -5.377096, + "result.downcase": -8.709300, + "result.sub": -8.709300, + "retry": -8.016153, + "return": -5.618258, + "right": -7.323006, + "role": -8.709300, + "root": -7.099862, + "row": -6.512075, + "rsquo": -8.709300, + "ruby": -7.323006, + "ruby_engine": -6.917541, + "ruby_engine.nil": -8.709300, + "rule": -8.016153, + "rules": -8.709300, + "rules.each": -8.709300, + "run": -8.016153, + "running": -8.709300, + "rv": -7.610688, + "s": -8.016153, + "s_max_age": -8.709300, + "safe_system": -7.610688, + "sbin": -8.709300, + "schedule": -8.709300, + "scheduler": -7.610688, + "scheme": -7.323006, + "screenshots_path": -8.709300, + "secondary_category": -8.709300, + "self": -5.936711, + "self.all": -8.709300, + "self.class.cc_failures.find": -8.709300, + "self.class.cc_failures.nil": -8.709300, + "self.class.dependencies.deps": -8.709300, + "self.class.dependencies.external_deps": -8.709300, + "self.class.keg_only_reason": -8.709300, + "self.class.mirrors": -8.709300, + "self.class.path": -8.709300, + "self.class.skip_clean_all": -8.709300, + "self.class.skip_clean_paths.include": -8.709300, + "self.class_s": -8.016153, + "self.configuration": -8.709300, + "self.delegate": -8.709300, + "self.each": -8.709300, + "self.expand_deps": -8.709300, + "self.factory": -8.709300, + "self.helpers": -8.709300, + "self.map": -8.709300, + "self.names": -8.709300, + "self.path": -8.709300, + "self.redis": -8.016153, + "self.register": -8.709300, + "self.require_all_gems": -8.709300, + "self.require_gem": -8.709300, + "self.target": -8.709300, + "self.use": -8.709300, + "send": -8.709300, + "send_file": -8.709300, + "sending": -8.709300, + "serialized": -8.016153, + "serialized.should": -8.016153, + "server": -6.629859, + "server.split": -8.016153, + "server.unshift": -6.917541, + "servers": -8.016153, + "session_secret": -7.610688, + "sessions": -8.709300, + "set": -5.125781, + "set_instance_variable": -6.224393, + "settings": -8.016153, + "settings.add_charset": -8.709300, + "sha1": -6.224393, + "sha256": -8.709300, + "share": -8.709300, + "shift": -8.709300, + "ship_address": -8.016153, + "should": -8.709300, + "show_exceptions": -8.709300, + "sig": -8.016153, + "sigh": -7.610688, + "singularize": -8.709300, + "size": -7.610688, + "skip_clean": -8.016153, + "skip_clean_all": -8.016153, + "skip_clean_paths": -8.709300, + "skip_deploy": -7.610688, + "source": -7.610688, + "specified": -8.016153, + "specifies": -8.709300, + "specs": -6.144351, + "specs=": -7.610688, + "src=": -8.709300, + "srv_str": -7.323006, + "stable": -8.016153, + "stack": -8.016153, + "stage": -7.610688, + "standard": -7.610688, + "start": -6.763390, + "state": -8.709300, + "static": -8.709300, + "static_cache_control": -8.709300, + "status": -7.323006, + "std_cmake_args": -8.709300, + "stderr.puts": -8.016153, + "stdin": -8.709300, + "stdout": -8.709300, + "stdout.puts": -8.709300, + "sticky": -8.709300, + "store": -8.709300, + "stream": -8.709300, + "super": -7.323006, + "supplied": -7.099862, + "supplied.empty": -8.709300, + "t": -7.610688, + "table": -8.709300, + "table_name": -8.709300, + "table_name.to_s.sub": -8.709300, + "tableize": -8.709300, + "tag": -8.709300, + "tap": -7.610688, + "target": -8.016153, + "target_file": -6.917541, + "task": -8.016153, + "template": -8.709300, + "test": -6.763390, + "test_disabled": -8.016153, + "text": -7.610688, + "the": -6.406715, + "then": -7.610688, + "there": -8.709300, + "this": -8.016153, + "though": -8.709300, + "thread_safe": -8.709300, + "threaded": -8.709300, + "title": -8.709300, + "to": -8.016153, + "to_check": -8.016153, + "to_s": -7.610688, + "tokenizer": -8.016153, + "top": -7.323006, + "true": -5.531246, + "type": -6.144351, + "type.to_s.upcase": -8.709300, + "type=": -8.709300, + "u": -8.709300, + "u.phone_numbers": -8.709300, + "underscore": -8.709300, + "underscored_word": -8.709300, + "underscored_word.tr": -8.709300, + "uninitialized": -8.709300, + "unless": -6.144351, + "unstable": -7.610688, + "upcase": -8.016153, + "uri_pathquery": -8.016153, + "url": -5.713568, + "url=": -8.709300, + "use": -8.709300, + "use_code": -8.709300, + "user": -8.016153, + "user.is_admin": -8.709300, + "username": -8.709300, + "usr": -7.610688, + "v": -7.610688, + "val": -5.451204, + "val=": -8.016153, + "validate_variable": -6.763390, + "value": -6.917541, + "value.should": -8.016153, + "verify": -8.709300, + "verify_download_integrity": -8.016153, + "version": -5.936711, + "views": -8.709300, + "void": -8.709300, + "w": -6.917541, + "web": -7.323006, + "webrick": -8.709300, + "website": -8.709300, + "when": -6.512075, + "whether": -8.709300, + "width": -8.016153, + "with": -8.016153, + "with_params": -8.709300, + "word": -8.709300, + "word.empty": -8.709300, + "word.to_s.dup": -8.709300, + "workers": -8.709300, + "workers.size.to_i": -8.709300, + "working": -8.016153, + "working.size": -8.709300, + "wrong": -8.709300, + "xcodeproj": -8.709300, + "xctest": -8.709300, + "xhtml": -8.709300, + "xml": -8.016153, + "yet": -8.709300, + "yield": -6.917541, + "your": -8.709300, + "zA": -8.709300, + "zero": -8.709300, + "{": -4.666249, + "|": -4.378567, + "||": -5.764861, + "}": -4.648857, + "~": -6.763390, }, "Rust": map[string]float64{ "!": -5.266569, @@ -158656,6 +157568,75 @@ var TokensLogProbabilities = map[string]map[string]float64{ "{": -2.490841, "}": -2.389059, }, + "Singularity": map[string]float64{ + "$": -3.976562, + "%": -3.129264, + "-": -1.578666, + "/usr/lib/rstudio": -3.976562, + "/var/lib/apt/lists/*": -5.075174, + ":": -3.976562, + "=": -4.382027, + "BootStrap": -5.075174, + "Dv": -4.382027, + "From": -5.075174, + "Jeremy": -5.075174, + "Maintainer": -5.075174, + "Nicklas": -5.075174, + "O": -4.382027, + "PATH": -4.382027, + "RSTUDIO_VERSION": -5.075174, + "RStudio": -5.075174, + "RStudio_Version": -5.075174, + "SINGULARITY_ROOTFS": -4.382027, + "Server": -5.075174, + "This": -5.075174, + "\\": -2.510224, + "apprun": -5.075174, + "apt": -4.382027, + "ca": -5.075174, + "certificates": -5.075174, + "core": -5.075174, + "environment": -5.075174, + "exec": -4.382027, + "export": -4.382027, + "f": -4.382027, + "gdebi": -4.382027, + "get": -3.465736, + "help": -5.075174, + "install": -3.465736, + "labels": -5.075174, + "ldap": -5.075174, + "ldap_auth.py": -5.075174, + "n": -5.075174, + "nickjer/singularity": -5.075174, + "no": -3.976562, + "pip": -5.075174, + "pip.py": -3.976562, + "post": -5.075174, + "python": -5.075174, + "r": -5.075174, + "recommends": -5.075174, + "rf": -5.075174, + "rm": -3.976562, + "rserver": -3.976562, + "rstudio": -3.976562, + "rstudio_auth.sh": -5.075174, + "run": -5.075174, + "runscript": -5.075174, + "server.deb": -3.976562, + "server/bin": -5.075174, + "server/bin/ldap_auth": -5.075174, + "server/bin/rstudio_auth": -5.075174, + "setup": -5.075174, + "shub": -5.075174, + "update": -5.075174, + "verbose": -4.382027, + "wget": -3.976562, + "will": -5.075174, + "y": -5.075174, + "{": -3.976562, + "}": -3.976562, + }, "Slash": map[string]float64{ "\"": -5.278115, "(": -3.486355, @@ -162416,6 +161397,158 @@ var TokensLogProbabilities = map[string]map[string]float64{ "{": -2.068039, "}": -2.070309, }, + "StringTemplate": map[string]float64{ + "!": -5.771441, + "$": -2.305705, + "(": -3.132384, + ")": -3.132384, + ",": -3.206492, + "-": -5.771441, + ".": -5.771441, + "/h": -5.078294, + "0": -5.771441, + "4": -5.771441, + ":": -3.692000, + "<": -4.385147, + "<!DOCTYPE>": -5.771441, + "</a>": -5.771441, + "</body>": -5.771441, + "</div>": -5.078294, + "</html>": -5.771441, + "</p>": -4.672829, + "</title>": -5.771441, + "<a>": -5.771441, + "<body>": -5.771441, + "<br/>": -4.672829, + "<div>": -5.078294, + "<head>": -5.771441, + "<html>": -5.771441, + "<p>": -4.672829, + "<title>": -5.771441, + "=": -3.979682, + ">": -4.385147, + "API": -3.825531, + "API.": -4.672829, + "APIs": -5.771441, + "APIs.": -5.771441, + "Android": -4.162003, + "Common_meta": -5.771441, + "Congratulation": -5.771441, + "DTD": -5.771441, + "Differences": -5.078294, + "EN": -5.771441, + "Each": -5.771441, + "For": -5.771441, + "Frameset": -5.771441, + "HTML": -5.078294, + "Header": -5.771441, + "It": -5.078294, + "ModelElementRow": -5.771441, + "No": -5.771441, + "PUBLIC": -5.771441, + "PackageAddedLink": -5.771441, + "PackageChangedLink": -5.771441, + "REC": -5.771441, + "Report": -5.078294, + "SDK": -5.771441, + "SimpleTableRow": -5.078294, + "So": -5.771441, + "TR": -5.771441, + "Table": -4.672829, + "The": -5.771441, + "This": -5.771441, + "W3C": -5.771441, + "a": -4.672829, + "about": -5.771441, + "added_packages": -5.078294, + "additions": -5.771441, + "an": -4.672829, + "and": -4.162003, + "any": -5.771441, + "are": -4.672829, + "available.": -5.771441, + "based": -5.771441, + "between": -5.771441, + "brief": -5.771441, + "change": -5.078294, + "changed_packages": -5.078294, + "changes": -5.078294, + "class=": -5.078294, + "classes": -5.771441, + "compares": -5.771441, + "comparison": -5.771441, + "corner": -5.771441, + "described": -5.771441, + "description": -5.771441, + "details": -5.771441, + "detected": -5.771441, + "differences": -5.078294, + "document": -5.771441, + "dtd": -5.771441, + "endif": -4.385147, + "example": -5.771441, + "explanation": -5.771441, + "fields.": -5.771441, + "for": -5.078294, + "frameset": -5.771441, + "framework": -5.078294, + "h": -5.078294, + "href=": -5.771441, + "html40": -5.771441, + "http": -5.771441, + "if": -4.385147, + "in": -4.385147, + "includes": -5.771441, + "indicated": -5.771441, + "information": -5.771441, + "it.from": -5.771441, + "it.to": -5.078294, + "longer": -5.771441, + "methods": -5.771441, + "modifications": -5.771441, + "more": -5.771441, + "name": -4.672829, + "newer": -5.771441, + "no": -5.771441, + "no_delta": -5.771441, + "noting": -5.771441, + "of": -4.385147, + "older": -5.078294, + "org": -5.771441, + "packages": -5.771441, + "page.": -5.771441, + "present": -5.771441, + "product": -5.771441, + "provided": -5.771441, + "reference": -5.771441, + "relative": -5.771441, + "removals": -5.078294, + "removed_packages": -5.078294, + "report": -5.771441, + "right": -5.771441, + "rows": -4.672829, + "see": -5.771441, + "shows": -5.771441, + "site": -5.771441, + "specified": -5.771441, + "suggested": -5.771441, + "target=": -5.771441, + "the": -3.373546, + "this": -5.078294, + "to": -4.672829, + "two": -5.771441, + "upper": -5.771441, + "version": -5.771441, + "versions": -5.771441, + "w3": -5.771441, + "were": -5.771441, + "where": -5.771441, + "whose": -5.771441, + "workaround": -5.771441, + "www": -5.771441, + "{": -4.672829, + "}": -4.672829, + }, "Stylus": map[string]float64{ "#": -4.510860, "#FFF": -4.510860, @@ -178525,6242 +177658,6331 @@ var TokensLogProbabilities = map[string]map[string]float64{ "⨚": -8.642592, }, "XML": map[string]float64{ - "!": -10.345895, - "#c": -10.345895, - "#x": -7.948000, - "$": -6.762376, - "%": -9.247283, - "&": -6.734977, - "&&": -9.652748, - "'": -9.652748, - "(": -5.125539, - ")": -5.158509, - "*": -8.736457, - "*after*": -9.652748, - "*always*": -10.345895, - "*before*": -9.652748, - "*must*": -10.345895, - "*ptr_": -10.345895, - "+": -4.638785, - ",": -4.609323, - "-": -4.655536, - ".": -7.087799, - "..": -8.554136, - "...": -9.247283, - ".AllowNoMatch": -9.247283, - ".NET": -8.266454, - ".NETPlatform": -10.345895, - ".SourceFile.FilePath": -10.345895, - ".ToHashSet": -10.345895, - ".ToLower": -10.345895, - ".example": -10.345895, - ".x": -10.345895, - ".xml": -10.345895, - "/": -6.911908, - "//Start": -10.345895, - "//github.com/github/hubot/LICENSEmd": -10.345895, - "//hubot.github.com": -10.345895, - "//www.freemedforms.com/": -10.345895, - "//www.zotero.org/styles/modern": -10.345895, - "/AALjR": -10.345895, - "/AaEwRe": -10.345895, - "/BViIrschKZGVtJbKyFsmKS": -10.345895, - "/C": -10.345895, - "/CQBTmT": -10.345895, - "/CQBTmb": -10.345895, - "/DwVX": -10.345895, - "/Eul": -10.345895, - "/Gn": -10.345895, - "/NJH": -10.345895, - "/NUVOyZSDbl": -10.345895, - "/OLgnzj": -10.345895, - "/P": -10.345895, - "/PEstbNVJVKbAhvPOVTx": -10.345895, - "/Prefer": -9.652748, - "/TwnkalWdpzgYTPUrsX": -10.345895, - "/VxEnzMR": -10.345895, - "/W": -10.345895, - "/WsAOrFo": -10.345895, - "/YBQkRflz": -10.345895, - "/ZJBpCGcs": -10.345895, - "/_PlatformToolsetFriendlyNameFor_v": -10.345895, - "/_PlatformToolsetShortNameFor_v": -10.345895, - "/aNwbxb": -10.345895, - "/ah": -10.345895, - "/akgN": -10.345895, - "/axcZ/": -10.345895, - "/bQBzF": -10.345895, - "/cmKYzGmiZHz/Vlx": -10.345895, - "/ewjxLtQfcl": -10.345895, - "/ggxQw": -10.345895, - "/hHJDvCAZ": -10.345895, - "/iUBDHV": -10.345895, - "/icBDF": -10.345895, - "/kQKPFV": -10.345895, - "/kUsr": -10.345895, - "/l": -10.345895, - "/p/W": -10.345895, - "/qUBTHJ": -10.345895, - "/ri": -10.345895, - "/tUSO": -10.345895, - "/zHZ": -10.345895, - "/zZjX": -10.345895, - "/zwRFOQoSzEP": -10.345895, - "0": -5.541874, - "000000": -9.652748, - "02": -10.345895, - "1": -5.963869, - "10": -6.978599, - "100": -10.345895, - "10px": -9.247283, - "11": -6.734977, - "113883": -6.819535, - "11px": -10.345895, - "12": -9.652748, - "12b3c8bb": -9.652748, - "13": -7.512682, - "135": -8.148671, - "13px": -10.345895, - "14": -8.736457, - "14px": -10.345895, - "15": -8.043310, - "15px": -8.148671, - "16": -6.762376, - "16px": -10.345895, - "17": -9.652748, - "17px": -10.345895, - "18": -10.345895, - "1999": -9.247283, - "19px": -9.652748, - "1a5f3280b8ba": -9.652748, - "2": -6.584695, - "20": -7.455523, - "2001": -8.554136, - "2004": -10.345895, - "2010": -10.345895, - "2011": -10.345895, - "2014": -10.345895, - "20px": -6.978599, - "21px": -10.345895, - "22": -9.652748, - "25": -6.474694, - "250": -8.148671, - "26": -8.554136, - "27px": -10.345895, - "2f323b": -9.247283, - "2px": -9.652748, - "3": -6.632323, - "30": -9.247283, - "30px": -7.013691, - "32": -6.819535, - "36": -10.345895, - "36px": -9.652748, - "3px": -7.948000, - "4": -7.350163, - "40": -10.345895, - "400": -10.345895, - "40px": -8.554136, - "42px": -9.652748, - "48px": -9.652748, - "4f83": -9.652748, - "5": -9.652748, - "57": -8.148671, - "5px": -10.345895, - "6": -9.652748, - "7": -9.652748, - "8": -9.247283, - "840": -6.819535, - "88": -6.819535, - "9": -9.652748, - "9085": -9.652748, - "9B9B9B": -9.247283, - ":": -5.493865, - ";": -5.246029, - "<": -8.266454, - "<!-->": -8.266454, - "<!ATTLIST>": -9.652748, - "<!DOCTYPE>": -8.736457, - "<!ELEMENT>": -8.959601, - "<!ENTITY>": -6.944698, - "<![%body.attlist;[>": -10.345895, - "<![%body.element;[>": -10.345895, - "<![%head.element;[>": -10.345895, - "<![%html.element;[>": -10.345895, - "<![%title.attlist;[>": -10.345895, - "<![%title.element;[>": -10.345895, - "<![CDATA[//>": -9.652748, - "</App>": -9.652748, - "</AppDesignerFolder>": -9.247283, - "</AppliesTo>": -10.345895, - "</AppxManifest>": -10.345895, - "</ArtifactsDir>": -10.345895, - "</Assembly>": -8.043310, - "</AssemblyName>": -8.736457, - "</AssemblyVersion>": -10.345895, - "</Assets>": -10.345895, - "</AutoGen>": -9.247283, - "</AutoGenerateBindingRedirects>": -9.247283, - "</AutoVisualizer>": -10.345895, - "</BorderPane>": -10.345895, - "</Button>": -9.652748, - "</CLRSupport>": -9.652748, - "</CharacterSet>": -9.652748, - "</Choose>": -10.345895, - "</ClCompile>": -8.554136, - "</ClInclude>": -9.652748, - "</Compile>": -9.247283, - "</CompilerInfo>": -10.345895, - "</Config>": -6.911908, - "</ConfigFiles>": -10.345895, - "</ConfigOptions>": -6.944698, - "</Configs>": -10.345895, - "</Configuration>": -7.573306, - "</ConfigurationSettings>": -9.247283, - "</ConfigurationType>": -9.652748, - "</CopyToMask>": -6.944698, - "</CurrentBuildDateStamp>": -10.345895, - "</CurrentBuildDir>": -10.345895, - "</CurrentBuildTimeStamp>": -10.345895, - "</CustomParameters>": -10.345895, - "</CustomToolNamespace>": -9.652748, - "</DataConnections>": -10.345895, - "</DebugSymbols>": -8.554136, - "</DebugType>": -8.399985, - "</DefaultLanguage>": -10.345895, - "</DefaultName>": -10.345895, - "</DefineConstants>": -8.266454, - "</DefineDebug>": -9.652748, - "</DefineTrace>": -9.652748, - "</Dependencies>": -10.345895, - "</DependentUpon>": -9.247283, - "</Description>": -9.652748, - "</DesignTime>": -10.345895, - "</DesignTimeSharedInput>": -10.345895, - "</Dir>": -9.652748, - "</DirectoryNamespaceAssociation>": -10.345895, - "</Dirs>": -10.345895, - "</DisableFastUpToDateCheck>": -10.345895, - "</DisplayName>": -10.345895, - "</DisplayString>": -6.584695, - "</DockPanel>": -10.345895, - "</DocumentationFile>": -8.736457, - "</DotNetNamingPolicy>": -10.345895, - "</EdgeNavigator>": -10.345895, - "</EmbeddedResource>": -10.345895, - "</EnableDotNetNativeCompatibleProfile>": -10.345895, - "</ErrorReport>": -8.736457, - "</EventConnections>": -10.345895, - "</Expand>": -8.148671, - "</ExpandedItem>": -8.554136, - "</Extensions>": -9.247283, - "</FB>": -9.247283, - "</FBNetwork>": -10.345895, - "</FSharpTargetsPath>": -9.652748, - "</FileAlignment>": -9.247283, - "</FileWidth>": -10.345895, - "</Filter>": -8.043310, - "</FullClassName>": -9.652748, - "</GenerateDebugInformation>": -9.652748, - "</Generator>": -9.247283, - "</Grid>": -10.345895, - "</Group>": -10.345895, - "</HBox.margin>": -10.345895, - "</HBox>": -10.345895, - "</HintPath>": -9.652748, - "</Icon>": -10.345895, - "</Image>": -10.345895, - "</ImportGroup>": -8.959601, - "</InputEndpoints>": -10.345895, - "</Installation>": -10.345895, - "</IntermediateOutputPath>": -9.652748, - "</IsTutorial>": -10.345895, - "</Item>": -7.780946, - "</ItemDefinitionGroup>": -9.652748, - "</ItemGroup>": -6.657016, - "</Keyword>": -10.345895, - "</LastGenOutput>": -9.247283, - "</LayoutAnimation>": -10.345895, - "</Link>": -9.652748, - "</LinkIncremental>": -9.652748, - "</MacroReference>": -10.345895, - "</Metadata>": -10.345895, - "</MinimumVisualStudioVersion>": -9.652748, - "</MyType>": -10.345895, - "</NDepend>": -10.345895, - "</Name>": -8.266454, - "</Nemerle>": -10.345895, - "</NemerleBinPathRoot>": -10.345895, - "</NemerleVersion>": -10.345895, - "</NoStdLib>": -10.345895, - "</NoTabsAfterNonTabs>": -10.345895, - "</NoWarn>": -9.652748, - "</None>": -9.652748, - "</NuGetTargetMoniker>": -10.345895, - "</NumberOfParentCategoriesToRollUp>": -10.345895, - "</Optimization>": -10.345895, - "</Optimize>": -8.266454, - "</OptionCompare>": -10.345895, - "</OptionExplicit>": -10.345895, - "</OptionInfer>": -10.345895, - "</OptionStrict>": -10.345895, - "</Otherwise>": -10.345895, - "</OutputDir>": -10.345895, - "</OutputName>": -10.345895, - "</OutputPath>": -7.948000, - "</OutputType>": -8.399985, - "</PackageFiles>": -10.345895, - "</PackageManifest>": -10.345895, - "</PackageTargetFramework>": -10.345895, - "</Panel>": -9.247283, - "</PhysicsObject>": -10.345895, - "</PhysicsObjectAngularDamping>": -10.345895, - "</PhysicsObjectAwake>": -10.345895, - "</PhysicsObjectDensity>": -10.345895, - "</PhysicsObjectFriction>": -10.345895, - "</PhysicsObjectGroup>": -10.345895, - "</PhysicsObjectKinematic>": -10.345895, - "</PhysicsObjectLinearDamping>": -10.345895, - "</PhysicsObjectRestitution>": -10.345895, - "</PhysicsObjectSensor>": -10.345895, - "</PhysicsObjectShape>": -10.345895, - "</Platform>": -7.573306, - "</PlatformTarget>": -8.554136, - "</PlatformToolset>": -9.247283, - "</PolicySet>": -10.345895, - "</PrecompiledHeader>": -8.959601, - "</PreprocessorDefinitions>": -9.652748, - "</Private>": -9.247283, - "</ProductVersion>": -9.247283, - "</Project>": -7.455523, - "</ProjectConfiguration>": -8.043310, - "</ProjectGuid>": -8.043310, - "</ProjectItem>": -8.959601, - "</ProjectReference>": -9.652748, - "</ProjectRoot>": -10.345895, - "</ProjectType>": -10.345895, - "</ProjectVersion>": -10.345895, - "</PropertyGroup>": -6.632323, - "</Queries>": -10.345895, - "</Query>": -9.652748, - "</RealOSVersion>": -10.345895, - "</Rectangle>": -9.652748, - "</Reference>": -7.780946, - "</References>": -10.345895, - "</Report>": -10.345895, - "</RequiredFrameworkVersion>": -10.345895, - "</RequiredTargetFramework>": -9.247283, - "</ResourceCompile>": -10.345895, - "</ResourceNamePolicy>": -10.345895, - "</ResourceType>": -10.345895, - "</Role>": -9.652748, - "</RoleName>": -10.345895, - "</RoleType>": -10.345895, - "</RootNamespace>": -8.554136, - "</SchemaVersion>": -9.247283, - "</Section>": -7.948000, - "</ServiceConfiguration>": -9.652748, - "</ServiceDefinition>": -10.345895, - "</ShowByDefault>": -10.345895, - "</SolutionRoot>": -10.345895, - "</SpecificVersion>": -10.345895, - "</StackPanel>": -10.345895, - "</StartDevelopmentStorage>": -10.345895, - "</StartupObject>": -10.345895, - "</SubSystem>": -9.652748, - "</SubType>": -9.652748, - "</SupportedFramework>": -10.345895, - "</Switch>": -10.345895, - "</Synthetic>": -7.350163, - "</TEI>": -10.345895, - "</TS>": -9.247283, - "</TableView>": -10.345895, - "</TabsToSpaces>": -10.345895, - "</Tailcalls>": -9.652748, - "</Target>": -7.350163, - "</TargetFSharpCoreVersion>": -10.345895, - "</TargetFrameworkVersion>": -8.736457, - "</TargetOsAndVersion>": -10.345895, - "</TargetPlatformIdentifier>": -10.345895, - "</TargetPlatformMinVersion>": -10.345895, - "</TargetPlatformVersion>": -10.345895, - "</TemplateContent>": -10.345895, - "</TemplateData>": -10.345895, - "</TemplateID>": -10.345895, - "</Text>": -9.652748, - "</TextInput>": -10.345895, - "</TextStylePolicy>": -10.345895, - "</TutorialName>": -10.345895, - "</TutorialPage>": -10.345895, - "</TutorialState>": -10.345895, - "</Type>": -7.706838, - "</UniqueIdentifier>": -9.247283, - "</UseDebugLibraries>": -9.652748, - "</UseDotNetNativeToolchain>": -9.247283, - "</VSTemplate>": -10.345895, - "</VersionMajor>": -10.345895, - "</VersionMinor>": -10.345895, - "</VersionPatch>": -10.345895, - "</VersionPreRelease>": -10.345895, - "</VerticalText>": -8.554136, - "</VisualStudioVersion>": -10.345895, - "</WarningLevel>": -8.148671, - "</WebConfig>": -10.345895, - "</WebElementEntity>": -10.345895, - "</WebRole>": -10.345895, - "</When>": -10.345895, - "</WhileKeyboardVisible>": -10.345895, - "</WhilePressed>": -10.345895, - "</WhileTrue>": -10.345895, - "</WixTargetsPath>": -10.345895, - "</WizardData>": -10.345895, - "</WizardExtension>": -9.652748, - "</Workflow>": -10.345895, - "</a>": -8.959601, - "</action>": -8.736457, - "</actions>": -10.345895, - "</active>": -10.345895, - "</alerts>": -10.345895, - "</argument>": -8.959601, - "</arguments>": -8.959601, - "</assembly>": -10.345895, - "</assert>": -7.050058, - "</assets>": -10.345895, - "</attDef>": -8.266454, - "</attList>": -8.148671, - "</author>": -10.345895, - "</authors>": -10.345895, - "</availability>": -10.345895, - "</background>": -8.736457, - "</backgrounds>": -10.345895, - "</bibliography>": -10.345895, - "</body>": -8.959601, - "</bottom>": -10.345895, - "</buildOutputProvider>": -6.657016, - "</c>": -10.345895, - "</categories>": -9.652748, - "</category>": -9.247283, - "</ccEmails>": -10.345895, - "</cconfiguration>": -9.652748, - "</center>": -10.345895, - "</characteristics>": -10.345895, - "</children>": -10.345895, - "</choose>": -6.268358, - "</citation>": -10.345895, - "</classSpec>": -8.736457, - "</codestring>": -8.736457, - "</columns>": -10.345895, - "</component>": -10.345895, - "</configuration>": -9.247283, - "</configurations>": -10.345895, - "</connections>": -10.345895, - "</constant>": -6.474694, - "</constants>": -10.345895, - "</constraint>": -8.399985, - "</constraintSpec>": -8.399985, - "</content>": -10.345895, - "</context>": -9.247283, - "</copyright>": -10.345895, - "</cproject>": -10.345895, - "</data>": -6.790547, - "</datafile>": -6.944698, - "</datafiles>": -8.554136, - "</date>": -6.790547, - "</dependencies>": -9.247283, - "</dependencyList>": -10.345895, - "</depth>": -10.345895, - "</desc>": -5.857259, - "</description>": -8.399985, - "</descriptorBase>": -9.247283, - "</directory>": -9.652748, - "</disabledValue>": -10.345895, - "</displayName>": -10.345895, - "</div>": -8.148671, - "</dllmap>": -10.345895, - "</doc>": -10.345895, - "</docAuthor>": -9.247283, - "</docDate>": -10.345895, - "</docTitle>": -10.345895, - "</document>": -9.652748, - "</ea:build>": -10.345895, - "</echo>": -9.652748, - "</elementSpec>": -5.609697, - "</else-if>": -7.013691, - "</else>": -6.734977, - "</email>": -10.345895, - "</enabledValue>": -10.345895, - "</entry>": -9.247283, - "</event>": -8.736457, - "</events>": -10.345895, - "</exception>": -10.345895, - "</exetype>": -8.736457, - "</exists>": -6.944698, - "</exportAction>": -6.944698, - "</exportDir>": -6.944698, - "</extensions>": -9.652748, - "</fileDesc>": -10.345895, - "</filename>": -6.944698, - "</files>": -10.345895, - "</filter>": -10.345895, - "</folderInfo>": -9.652748, - "</forceType>": -10.345895, - "</forceTypes>": -10.345895, - "</formula>": -10.345895, - "</freeData>": -6.944698, - "</front>": -10.345895, - "</fullName>": -9.652748, - "</functionname>": -8.736457, - "</gameSystem>": -10.345895, - "</gi>": -9.247283, - "</gml:Point>": -9.652748, - "</gml:pos>": -9.652748, - "</group>": -9.652748, - "</head>": -7.860988, - "</help>": -10.345895, - "</hi>": -8.266454, - "</id>": -8.399985, - "</if>": -6.268358, - "</image>": -6.944698, - "</info>": -9.652748, - "</inputType>": -9.652748, - "</isnot>": -8.736457, - "</isquestion>": -8.736457, - "</item>": -9.652748, - "</ivy-module>": -10.345895, - "</key>": -9.247283, - "</kind>": -8.148671, - "</layout>": -9.652748, - "</libid>": -8.736457, - "</licence>": -9.652748, - "</license>": -10.345895, - "</licenseUrl>": -10.345895, - "</list>": -10.345895, - "</locale>": -10.345895, - "</macro>": -7.167841, - "</map>": -10.345895, - "</maskName>": -10.345895, - "</media>": -10.345895, - "</member>": -5.533711, - "</members>": -10.345895, - "</message>": -7.254853, - "</metadata>": -10.345895, - "</mj-attributes>": -10.345895, - "</mj-body>": -9.652748, - "</mj-button>": -7.706838, - "</mj-column>": -6.517254, - "</mj-container>": -9.652748, - "</mj-head>": -10.345895, - "</mj-image>": -7.013691, - "</mj-inline-links>": -10.345895, - "</mj-link>": -9.247283, - "</mj-navbar>": -10.345895, - "</mj-section>": -7.087799, - "</mj-social>": -10.345895, - "</mj-text>": -6.682333, - "</mj-title>": -10.345895, - "</mjml>": -9.652748, - "</model>": -6.126387, - "</modelSequence>": -8.736457, - "</module>": -10.345895, - "</multiple>": -10.345895, - "</name>": -6.734977, - "</names>": -7.401456, - "</ncl>": -9.247283, - "</node>": -7.210401, - "</object>": -7.301373, - "</objects>": -8.399985, - "</option>": -8.959601, - "</overwrite>": -6.944698, - "</owners>": -10.345895, - "</p>": -6.302844, - "</package>": -10.345895, - "</packages>": -10.345895, - "</param>": -5.857259, - "</parentName>": -10.345895, - "</pattern>": -9.652748, - "</persistent>": -10.345895, - "</phase>": -8.959601, - "</phpunit>": -10.345895, - "</placeholder>": -10.345895, - "</plugin>": -10.345895, - "</policies>": -10.345895, - "</policy>": -10.345895, - "</policyDefinitionResources>": -10.345895, - "</policyDefinitions>": -10.345895, - "</policyNamespaces>": -10.345895, - "</profile>": -6.657016, - "</profileType>": -10.345895, - "</profileTypes>": -10.345895, - "</project>": -9.652748, - "</projectUrl>": -10.345895, - "</protected>": -10.345895, - "</publicationStmt>": -10.345895, - "</publisher>": -10.345895, - "</ref>": -10.345895, - "</regionBase>": -9.247283, - "</relative>": -8.736457, - "</removeEnd>": -6.944698, - "</rendition>": -5.720922, - "</report>": -7.573306, - "</requireLicenseAcceptance>": -10.345895, - "</resheader>": -8.266454, - "</resources>": -10.345895, - "</returns>": -6.762376, - "</rights>": -10.345895, - "</room>": -9.652748, - "</rooms>": -10.345895, - "</root>": -10.345895, - "</rtf>": -10.345895, - "</rule>": -8.148671, - "</rules>": -10.345895, - "</scannerConfigBuildInfo>": -8.959601, - "</scannerInfoProvider>": -6.657016, - "</schema>": -9.247283, - "</schemaSpec>": -10.345895, - "</script>": -5.976447, - "</scripts>": -7.350163, - "</selectorCollection>": -10.345895, - "</senderType>": -10.345895, - "</shader>": -9.652748, - "</shaders>": -9.652748, - "</single>": -10.345895, - "</size>": -6.944698, - "</solid>": -10.345895, - "</sort>": -10.345895, - "</sound>": -8.959601, - "</sounds>": -10.345895, - "</source>": -7.254853, - "</sourceDesc>": -10.345895, - "</sourceEntries>": -9.652748, - "</span>": -9.652748, - "</specGrp>": -8.266454, - "</sprite>": -7.780946, - "</spriteName>": -10.345895, - "</sprites>": -9.652748, - "</storageModule>": -8.399985, - "</store>": -6.944698, - "</string>": -8.399985, - "</stringTable>": -10.345895, - "</strong>": -8.736457, - "</style>": -10.345895, - "</substitute>": -8.736457, - "</summary>": -5.517581, - "</target>": -9.652748, - "</teiHeader>": -10.345895, - "</template>": -10.345895, - "</term>": -7.401456, - "</terms>": -10.345895, - "</testsuite>": -10.345895, - "</testsuites>": -10.345895, - "</text>": -10.345895, - "</tile>": -6.944698, - "</tileset>": -10.345895, - "</title-short>": -10.345895, - "</title>": -8.736457, - "</titlePage>": -10.345895, - "</titlePart>": -10.345895, - "</titleStmt>": -10.345895, - "</tool>": -8.266454, - "</toolChain>": -9.652748, - "</translation>": -7.254853, - "</triggerType>": -10.345895, - "</type>": -10.345895, - "</typeparam>": -7.860988, - "</updated>": -10.345895, - "</url>": -10.345895, - "</useapplyto>": -8.736457, - "</userelative>": -8.736457, - "</valItem>": -6.069229, - "</valList>": -8.399985, - "</value>": -8.266454, - "</vendor>": -10.345895, - "</version>": -10.345895, - "</visible>": -10.345895, - "</whitelist>": -10.345895, - "</whoName>": -8.736457, - "</window>": -10.345895, - "</x:call>": -10.345895, - "</x:description>": -10.345895, - "</x:scenario>": -10.345895, - "</xsd:choice>": -10.345895, - "</xsd:complexType>": -9.247283, - "</xsd:element>": -9.247283, - "</xsd:schema>": -10.345895, - "</xsd:sequence>": -9.652748, - "</xsl:function>": -10.345895, - "</xsl:variable>": -10.345895, - "<?exactMatch>": -6.375603, - "<?fileVersion>": -10.345895, - "<?import>": -8.959601, - "<?xml-model>": -10.345895, - "<?xml>": -6.375603, - "<AdditionalDependencies>": -9.652748, - "<AlternativeType>": -8.959601, - "<App>": -9.652748, - "<AppDesignerFolder>": -9.247283, - "<AppliesTo>": -10.345895, - "<AppxManifest>": -10.345895, - "<ArtifactsDir>": -10.345895, - "<Assemblies>": -10.345895, - "<Assembly>": -8.043310, - "<AssemblyName>": -8.736457, - "<AssemblyVersion>": -10.345895, - "<Asset>": -10.345895, - "<Assets>": -10.345895, - "<AutoGen>": -9.247283, - "<AutoGenerateBindingRedirects>": -9.247283, - "<AutoVisualizer>": -10.345895, - "<BaselineInUISetting>": -10.345895, - "<BorderPane>": -10.345895, - "<BuildComparisonSetting>": -10.345895, - "<Button>": -9.652748, - "<CLRSupport>": -9.652748, - "<CallTarget>": -8.554136, - "<Change>": -10.345895, - "<CharacterSet>": -9.652748, - "<Choose>": -10.345895, - "<ClCompile>": -8.266454, - "<ClInclude>": -8.959601, - "<Compile>": -7.948000, - "<CompilerInfo>": -10.345895, - "<Config>": -6.911908, - "<ConfigFiles>": -10.345895, - "<ConfigOptions>": -6.944698, - "<Configs>": -10.345895, - "<Configuration>": -7.573306, - "<ConfigurationSettings>": -9.247283, - "<ConfigurationType>": -9.652748, - "<Connection>": -8.554136, - "<Content>": -7.167841, - "<Copy>": -9.247283, - "<CopyToMask>": -6.944698, - "<CoverageFiles>": -10.345895, - "<CurrentBuildDateStamp>": -10.345895, - "<CurrentBuildDir>": -10.345895, - "<CurrentBuildTimeStamp>": -10.345895, - "<CustomParameter>": -8.554136, - "<CustomParameters>": -10.345895, - "<CustomToolNamespace>": -9.652748, - "<DataConnections>": -10.345895, - "<DebugSymbols>": -8.554136, - "<DebugType>": -8.399985, - "<DefaultLanguage>": -10.345895, - "<DefaultName>": -10.345895, - "<DefineConstants>": -8.266454, - "<DefineDebug>": -9.652748, - "<DefineTrace>": -9.652748, - "<Delete>": -9.652748, - "<Dependencies>": -10.345895, - "<Dependency>": -9.652748, - "<DependentUpon>": -9.247283, - "<Description>": -9.652748, - "<DesignTime>": -10.345895, - "<DesignTimeSharedInput>": -10.345895, - "<Dir>": -9.652748, - "<DirectoryNamespaceAssociation>": -10.345895, - "<Dirs>": -10.345895, - "<DisableFastUpToDateCheck>": -10.345895, - "<DisplayName>": -10.345895, - "<DisplayString>": -6.584695, - "<DockPanel>": -10.345895, - "<DocumentationFile>": -8.736457, - "<DotNetNamingPolicy>": -10.345895, - "<EdgeNavigator>": -10.345895, - "<EmbeddedResource>": -10.345895, - "<EnableDotNetNativeCompatibleProfile>": -10.345895, - "<ErrorReport>": -8.736457, - "<EventConnections>": -10.345895, - "<Expand>": -8.148671, - "<ExpandedItem>": -8.554136, - "<Extensions>": -9.247283, - "<FB>": -8.959601, - "<FBNetwork>": -10.345895, - "<FSharpTargetsPath>": -9.652748, - "<FileAlignment>": -9.247283, - "<FileWidth>": -10.345895, - "<Filter>": -8.043310, - "<Folder>": -10.345895, - "<FrameworkAssemblies>": -10.345895, - "<FullClassName>": -9.652748, - "<GenerateDebugInformation>": -9.652748, - "<Generator>": -9.247283, - "<Grid>": -10.345895, - "<Group>": -10.345895, - "<HBox.margin>": -10.345895, - "<HBox>": -10.345895, - "<HintPath>": -9.652748, - "<Icon>": -10.345895, - "<Identification>": -10.345895, - "<Identity>": -10.345895, - "<Image>": -9.652748, - "<Import>": -6.608226, - "<ImportGroup>": -8.959601, - "<InputEndpoint>": -10.345895, - "<InputEndpoints>": -10.345895, - "<Insets>": -10.345895, - "<Installation>": -10.345895, - "<InstallationTarget>": -10.345895, - "<Instances>": -9.652748, - "<IntermediateOutputPath>": -9.652748, - "<IsTutorial>": -10.345895, - "<Item>": -7.780946, - "<ItemDefinitionGroup>": -9.652748, - "<ItemGroup>": -6.657016, - "<Keyword>": -10.345895, - "<LastGenOutput>": -9.247283, - "<LayoutAnimation>": -10.345895, - "<Link>": -9.652748, - "<LinkIncremental>": -9.652748, - "<MSBuild>": -10.345895, - "<MacroReference>": -10.345895, - "<MakeDir>": -9.652748, - "<Message>": -8.554136, - "<Metadata>": -10.345895, - "<MinimumVisualStudioVersion>": -9.652748, - "<Move>": -8.736457, - "<MyType>": -10.345895, - "<NDepend>": -10.345895, - "<Name>": -8.554136, - "<Nemerle>": -10.345895, - "<NemerleBinPathRoot>": -10.345895, - "<NemerleVersion>": -10.345895, - "<NewExtensions/>": -10.345895, - "<NoStdLib>": -10.345895, - "<NoTabsAfterNonTabs>": -10.345895, - "<NoWarn>": -9.652748, - "<None>": -8.399985, - "<NuGetTargetMoniker>": -10.345895, - "<NumberOfParentCategoriesToRollUp>": -10.345895, - "<Optimization>": -10.345895, - "<Optimize>": -8.266454, - "<OptionCompare>": -10.345895, - "<OptionExplicit>": -10.345895, - "<OptionInfer>": -10.345895, - "<OptionStrict>": -10.345895, - "<Otherwise>": -10.345895, - "<OutputDir>": -10.345895, - "<OutputName>": -10.345895, - "<OutputPath>": -7.948000, - "<OutputType>": -8.399985, - "<PackageFiles>": -10.345895, - "<PackageManifest>": -10.345895, - "<PackageTargetFramework>": -10.345895, - "<Panel>": -8.959601, - "<Parameter>": -9.247283, - "<PhysicsObject>": -10.345895, - "<PhysicsObjectAngularDamping>": -10.345895, - "<PhysicsObjectAwake>": -10.345895, - "<PhysicsObjectDensity>": -10.345895, - "<PhysicsObjectFriction>": -10.345895, - "<PhysicsObjectGroup>": -10.345895, - "<PhysicsObjectKinematic>": -10.345895, - "<PhysicsObjectLinearDamping>": -10.345895, - "<PhysicsObjectRestitution>": -10.345895, - "<PhysicsObjectSensor>": -10.345895, - "<PhysicsObjectShape>": -10.345895, - "<PhysicsShapePoints/>": -10.345895, - "<Platform>": -7.573306, - "<PlatformTarget>": -8.554136, - "<PlatformToolset>": -9.247283, - "<PolicySet>": -10.345895, - "<PrecompiledHeader>": -8.959601, - "<PreprocessorDefinitions>": -9.652748, - "<Private>": -9.247283, - "<ProductVersion>": -9.247283, - "<Project>": -7.401456, - "<ProjectConfiguration>": -8.043310, - "<ProjectGuid>": -8.043310, - "<ProjectItem>": -8.959601, - "<ProjectReference>": -8.736457, - "<ProjectRoot>": -10.345895, - "<ProjectType>": -10.345895, - "<ProjectVersion>": -10.345895, - "<PropertyGroup>": -6.608226, - "<Queries>": -10.345895, - "<Query>": -9.652748, - "<RealOSVersion>": -10.345895, - "<Rectangle>": -8.266454, - "<Reference>": -6.708309, - "<References>": -10.345895, - "<RemoveDir>": -10.345895, - "<Report>": -10.345895, - "<RequiredFrameworkVersion>": -10.345895, - "<RequiredTargetFramework>": -9.247283, - "<ResourceCompile>": -9.652748, - "<ResourceNamePolicy>": -10.345895, - "<ResourceType>": -10.345895, - "<Role>": -9.652748, - "<RoleName>": -10.345895, - "<RoleType>": -10.345895, - "<RootNamespace>": -8.554136, - "<Rotation>": -10.345895, - "<SchemaVersion>": -9.247283, - "<Section>": -7.948000, - "<ServiceConfiguration>": -9.247283, - "<ServiceDefinition>": -9.652748, - "<Setting>": -9.247283, - "<ShowByDefault>": -10.345895, - "<SolutionRoot>": -10.345895, - "<SourceFileRebasing>": -10.345895, - "<SpecificVersion>": -10.345895, - "<StackPanel>": -10.345895, - "<StartDevelopmentStorage>": -10.345895, - "<StartupObject>": -10.345895, - "<SubSystem>": -9.652748, - "<SubType>": -9.652748, - "<SupportedFramework>": -10.345895, - "<Switch>": -10.345895, - "<Synthetic>": -7.350163, - "<TEI>": -10.345895, - "<TS>": -9.247283, - "<TableColumn>": -9.247283, - "<TableView>": -10.345895, - "<TabsToSpaces>": -10.345895, - "<Tailcalls>": -9.652748, - "<Target>": -7.637845, - "<TargetFSharpCoreVersion>": -10.345895, - "<TargetFrameworkVersion>": -8.736457, - "<TargetOsAndVersion>": -10.345895, - "<TargetPlatformIdentifier>": -10.345895, - "<TargetPlatformMinVersion>": -10.345895, - "<TargetPlatformVersion>": -10.345895, - "<TemplateContent>": -10.345895, - "<TemplateData>": -10.345895, - "<TemplateID>": -10.345895, - "<Text>": -8.959601, - "<TextInput>": -10.345895, - "<TextStylePolicy>": -10.345895, - "<TopFrameBackground>": -10.345895, - "<TutorialName>": -10.345895, - "<TutorialPage>": -10.345895, - "<TutorialState>": -10.345895, - "<Type>": -7.706838, - "<UniqueIdentifier>": -9.247283, - "<UseDebugLibraries>": -9.652748, - "<UseDotNetNativeToolchain>": -9.247283, - "<UsingTask>": -9.652748, - "<VSTemplate>": -10.345895, - "<VersionInfo>": -10.345895, - "<VersionMajor>": -10.345895, - "<VersionMinor>": -10.345895, - "<VersionPatch>": -10.345895, - "<VersionPreRelease>": -10.345895, - "<VerticalText>": -8.554136, - "<VisualStudioVersion>": -10.345895, - "<WarnFilter>": -10.345895, - "<WarningLevel>": -8.148671, - "<WebConfig>": -10.345895, - "<WebElementEntity>": -10.345895, - "<WebRole>": -10.345895, - "<When>": -10.345895, - "<WhileKeyboardVisible>": -10.345895, - "<WhilePressed>": -10.345895, - "<WhileTrue>": -10.345895, - "<WixTargetsPath>": -10.345895, - "<WizardData>": -10.345895, - "<WizardExtension>": -9.652748, - "<Workflow>": -10.345895, - "<XmlPoke>": -10.345895, - "<Zip>": -10.345895, - "<ZipFiles>": -10.345895, - "<a>": -8.959601, - "<action>": -8.736457, - "<actions>": -10.345895, - "<active>": -6.156240, - "<additionalInput>": -8.959601, - "<alerts>": -10.345895, - "<anchor>": -10.345895, - "<argument>": -8.959601, - "<arguments>": -8.959601, - "<assembly>": -10.345895, - "<assert>": -7.050058, - "<assets>": -10.345895, - "<attDef>": -7.706838, - "<attList>": -8.148671, - "<author>": -10.345895, - "<authors>": -10.345895, - "<autodiscovery>": -8.736457, - "<autoresizingMask>": -10.345895, - "<availability>": -10.345895, - "<background>": -8.736457, - "<backgrounds>": -10.345895, - "<bibliography>": -10.345895, - "<body>": -8.959601, - "<bottom>": -10.345895, - "<br>": -8.736457, - "<buildOutputProvider>": -6.657016, - "<builder>": -9.652748, - "<c>": -10.345895, - "<categories>": -9.652748, - "<category>": -8.736457, - "<ccEmails>": -10.345895, - "<cconfiguration>": -9.652748, - "<center>": -10.345895, - "<characteristic>": -10.345895, - "<characteristics>": -10.345895, - "<children>": -10.345895, - "<choose>": -6.268358, - "<citation>": -10.345895, - "<classRef>": -8.554136, - "<classSpec>": -7.301373, - "<codestring>": -8.736457, - "<color>": -10.345895, - "<columns>": -10.345895, - "<component>": -10.345895, - "<conf>": -9.652748, - "<configuration>": -9.247283, - "<configurations>": -10.345895, - "<connections>": -10.345895, - "<constant>": -6.474694, - "<constants>": -10.345895, - "<constraint>": -8.399985, - "<constraintSpec>": -8.399985, - "<content>": -10.345895, - "<context>": -9.247283, - "<copyright/>": -10.345895, - "<copyright>": -10.345895, - "<cproject>": -10.345895, - "<customObject>": -10.345895, - "<data>": -6.790547, - "<datafile>": -6.944698, - "<datafiles>": -8.554136, - "<date-part>": -5.835036, - "<date>": -6.790547, - "<decimal>": -9.652748, - "<dependencies>": -9.247283, - "<dependency>": -8.736457, - "<dependencyList>": -10.345895, - "<depth>": -10.345895, - "<desc>": -5.857259, - "<description>": -8.399985, - "<descriptor>": -9.247283, - "<descriptorBase>": -9.247283, - "<directory>": -9.652748, - "<disabledValue>": -10.345895, - "<displayName>": -10.345895, - "<div>": -8.148671, - "<dllentry>": -9.652748, - "<dllmap>": -10.345895, - "<doc>": -10.345895, - "<docAuthor>": -9.247283, - "<docDate>": -10.345895, - "<docTitle>": -10.345895, - "<document>": -9.652748, - "<ea:build>": -9.652748, - "<ea:plugin>": -9.652748, - "<ea:property>": -10.345895, - "<echo>": -9.652748, - "<edge>": -7.573306, - "<elementRef>": -6.584695, - "<elementSpec>": -5.609697, - "<else-if>": -7.013691, - "<else>": -6.734977, - "<email>": -10.345895, - "<enabledValue>": -10.345895, - "<entry>": -8.736457, - "<event>": -8.736457, - "<events>": -10.345895, - "<exception>": -10.345895, - "<exclude-output>": -10.345895, - "<exetype>": -8.736457, - "<exists>": -6.944698, - "<exportAction>": -6.944698, - "<exportDir>": -6.944698, - "<extension>": -7.860988, - "<extensions>": -9.652748, - "<externalSettings/>": -9.652748, - "<file>": -10.345895, - "<fileDesc>": -10.345895, - "<filename>": -6.944698, - "<files>": -10.345895, - "<filter>": -10.345895, - "<folderInfo>": -9.652748, - "<font>": -7.210401, - "<forceType>": -10.345895, - "<forceTypes/>": -10.345895, - "<forceTypes>": -10.345895, - "<formula>": -10.345895, - "<freeData>": -6.944698, - "<front>": -10.345895, - "<fullName>": -9.652748, - "<functionname>": -8.736457, - "<gameSystem>": -10.345895, - "<gi>": -9.247283, - "<gml:Point>": -9.652748, - "<gml:pos>": -9.652748, - "<group>": -9.652748, - "<head>": -7.860988, - "<help>": -10.345895, - "<hi>": -8.266454, - "<hook>": -10.345895, - "<id>": -8.399985, - "<if>": -6.268358, - "<image>": -6.944698, - "<include>": -9.247283, - "<info>": -9.652748, - "<inputType>": -8.266454, - "<isnot>": -8.736457, - "<isquestion>": -8.736457, - "<item>": -9.652748, - "<ivy-module>": -10.345895, - "<key>": -8.736457, - "<kind>": -8.148671, - "<label>": -8.399985, - "<layout>": -9.652748, - "<let>": -7.780946, - "<libid>": -8.736457, - "<licence>": -9.652748, - "<license>": -10.345895, - "<licenseUrl>": -10.345895, - "<link>": -9.652748, - "<list>": -10.345895, - "<listOptionValue>": -8.959601, - "<locale>": -10.345895, - "<location>": -7.573306, - "<m:ns>": -8.736457, - "<macro>": -7.167841, - "<map>": -10.345895, - "<maskName>": -10.345895, - "<media>": -8.959601, - "<member>": -5.533711, - "<members>": -10.345895, - "<message>": -7.254853, - "<metadata>": -10.345895, - "<mj-all>": -10.345895, - "<mj-attributes>": -10.345895, - "<mj-body>": -9.652748, - "<mj-button>": -7.706838, - "<mj-column>": -6.517254, - "<mj-container>": -9.652748, - "<mj-divider>": -9.652748, - "<mj-font>": -9.652748, - "<mj-head>": -10.345895, - "<mj-image>": -7.013691, - "<mj-inline-links>": -10.345895, - "<mj-link>": -9.247283, - "<mj-navbar>": -10.345895, - "<mj-section>": -7.087799, - "<mj-social>": -10.345895, - "<mj-text>": -6.657016, - "<mj-title>": -10.345895, - "<mjml>": -9.652748, - "<model>": -5.210097, - "<modelSequence>": -8.736457, - "<modifiers/>": -10.345895, - "<module>": -10.345895, - "<moduleRef>": -9.652748, - "<multiple>": -10.345895, - "<name/>": -9.247283, - "<name>": -6.320543, - "<names>": -7.050058, - "<ncl>": -9.247283, - "<node>": -7.210401, - "<ns>": -8.399985, - "<number>": -7.948000, - "<object>": -7.301373, - "<objects>": -8.399985, - "<openAction>": -6.657016, - "<option>": -7.573306, - "<orderEntry>": -9.247283, - "<outlet>": -10.345895, - "<overwrite>": -6.944698, - "<owners>": -10.345895, - "<p>": -6.302844, - "<package>": -7.350163, - "<packages>": -10.345895, - "<param>": -5.857259, - "<parentCategory>": -9.652748, - "<parentName>": -10.345895, - "<parser>": -5.963869, - "<paths>": -10.345895, - "<pattern>": -9.652748, - "<persistent>": -10.345895, - "<phase>": -8.959601, - "<phpunit>": -10.345895, - "<placeholder>": -9.652748, - "<plugIn>": -9.652748, - "<plugin>": -10.345895, - "<policies>": -10.345895, - "<policy>": -10.345895, - "<policyDefinitionResources>": -10.345895, - "<policyDefinitions>": -10.345895, - "<policyNamespaces>": -10.345895, - "<port>": -9.247283, - "<profile>": -6.657016, - "<profileType>": -10.345895, - "<profileTypes>": -10.345895, - "<project>": -9.652748, - "<projectUrl>": -10.345895, - "<property>": -9.652748, - "<protected>": -10.345895, - "<publicationStmt>": -10.345895, - "<publisher>": -10.345895, - "<rect>": -10.345895, - "<ref>": -10.345895, - "<region>": -9.247283, - "<regionBase>": -9.247283, - "<relative>": -8.736457, - "<removeEnd>": -6.944698, - "<rendition>": -5.711166, - "<report>": -7.573306, - "<requireLicenseAcceptance>": -10.345895, - "<resheader>": -8.399985, - "<resources>": -9.652748, - "<returns>": -6.762376, - "<rights>": -10.345895, - "<room>": -9.652748, - "<rooms>": -10.345895, - "<root>": -10.345895, - "<rtf>": -10.345895, - "<rule>": -8.148671, - "<rules>": -10.345895, - "<runAction>": -6.657016, - "<scannerConfigBuildInfo>": -8.959601, - "<scannerInfoProvider>": -6.657016, - "<scenes/>": -10.345895, - "<schema>": -9.247283, - "<schemaSpec>": -10.345895, - "<script>": -5.976447, - "<scripts>": -7.350163, - "<selectorCollection>": -10.345895, - "<senderType>": -10.345895, - "<shader>": -9.652748, - "<shaders>": -9.652748, - "<single>": -10.345895, - "<size>": -6.944698, - "<solid>": -10.345895, - "<sort>": -10.345895, - "<sound>": -8.959601, - "<sounds>": -10.345895, - "<source>": -7.254853, - "<sourceDesc>": -10.345895, - "<sourceEntries>": -9.652748, - "<sourceFolder>": -9.652748, - "<span>": -9.652748, - "<specGrp>": -8.266454, - "<specGrpRef>": -8.148671, - "<sprite>": -7.780946, - "<spriteName>": -10.345895, - "<sprites>": -9.652748, - "<storageModule>": -7.706838, - "<store>": -6.944698, - "<string>": -8.399985, - "<stringTable>": -10.345895, - "<strong>": -8.736457, - "<style-options>": -10.345895, - "<style>": -10.345895, - "<substitute>": -8.736457, - "<summary>": -5.517581, - "<supportedOn>": -10.345895, - "<target>": -9.247283, - "<targetPlatform>": -9.652748, - "<teiHeader>": -10.345895, - "<template>": -10.345895, - "<term>": -7.401456, - "<terms>": -10.345895, - "<testsuite>": -10.345895, - "<testsuites>": -10.345895, - "<text>": -4.565152, - "<tile>": -6.944698, - "<tileset>": -10.345895, - "<title-short>": -10.345895, - "<title>": -8.736457, - "<titlePage>": -10.345895, - "<titlePart>": -10.345895, - "<titleStmt>": -10.345895, - "<tool>": -7.860988, - "<toolChain>": -9.652748, - "<translation>": -7.254853, - "<triggerType>": -10.345895, - "<type>": -10.345895, - "<typeparam>": -7.860988, - "<updated>": -10.345895, - "<url>": -10.345895, - "<useapplyto>": -8.736457, - "<userelative>": -8.736457, - "<using>": -10.345895, - "<valItem>": -5.927055, - "<valList>": -8.399985, - "<value-of>": -6.762376, - "<value>": -8.266454, - "<vendor>": -10.345895, - "<version>": -10.345895, - "<visible>": -10.345895, - "<whitelist>": -10.345895, - "<whoName>": -8.736457, - "<window>": -10.345895, - "<x:call>": -10.345895, - "<x:description>": -10.345895, - "<x:expect>": -10.345895, - "<x:param>": -10.345895, - "<x:scenario>": -10.345895, - "<xsd:attribute>": -8.959601, - "<xsd:choice>": -10.345895, - "<xsd:complexType>": -9.247283, - "<xsd:element>": -8.554136, - "<xsd:schema>": -10.345895, - "<xsd:sequence>": -9.652748, - "<xsl:function>": -10.345895, - "<xsl:include>": -10.345895, - "<xsl:param>": -10.345895, - "<xsl:sequence>": -10.345895, - "<xsl:value-of>": -9.247283, - "<xsl:variable>": -10.345895, - "=": -6.394651, - ">": -6.880159, - "?": -10.345895, - "@align": -10.345895, - "A": -6.708309, - "A/": -10.345895, - "AAAAAASUVORK": -10.345895, - "AAAAABJRU": -10.345895, - "AAAAAElFTkSuQmCC": -9.652748, - "AAAAASUVORK": -9.247283, - "AAD": -10.345895, - "AB": -10.345895, - "ABAD": -10.345895, - "ABNZRANiOw": -10.345895, - "ABY": -10.345895, - "AC": -7.948000, - "ACvKyUk": -10.345895, - "AE": -10.345895, - "AFhTiBlAzABCvEUt": -10.345895, - "AH": -6.880159, - "AHOfoP": -10.345895, - "AHTQnuq/EpedjfCjOU": -10.345895, - "AHxIzDcNxSb": -10.345895, - "AINp": -10.345895, - "AJYyUM": -10.345895, - "AKwwNk": -10.345895, - "ALDER": -10.345895, - "ALHjBgFCECH": -10.345895, - "ANDERSON": -10.345895, - "ANOTHER_KEY": -10.345895, - "APFOMI": -10.345895, - "APfnVRznOjVXwmmZl/upfrfNUtVwAOBqFKxVC/c": -10.345895, - "AQ": -9.652748, - "AQMKGDI": -10.345895, - "AQfg/ug": -10.345895, - "ARFaQyrqz": -10.345895, - "ARM": -9.652748, - "AS": -10.345895, - "ASZt": -10.345895, - "ATTLIST": -9.652748, - "ATgvlQ/F": -10.345895, - "AUT": -10.345895, - "AUcp": -10.345895, - "AVlWoqYpVKPv": -10.345895, - "AWem": -10.345895, - "AXRtF": -10.345895, - "AXc": -10.345895, - "AZCSXu": -10.345895, - "AZPLMmQ": -10.345895, - "Aa": -10.345895, - "AbapkqBjVPJSc": -10.345895, - "Abstractness": -10.345895, - "Active=": -9.247283, - "Ad": -10.345895, - "AddRange": -9.652748, - "AdwmhUhAp": -10.345895, - "Aenean": -8.554136, - "AfUc": -10.345895, - "Afr/": -10.345895, - "Agp": -10.345895, - "AhfFda": -10.345895, - "AiEBMTFTUVFRUVT": -10.345895, - "AiqfqIHZUoznbTfURwYA": -10.345895, - "AjQb": -10.345895, - "AkBgKtYYWHYAEgyENAHiY": -10.345895, - "AkT": -10.345895, - "AkmIky": -10.345895, - "AkqTsdFiKTLAfUvYI": -10.345895, - "Al": -10.345895, - "AlHZSrgwEkFAWFjxSyNe": -10.345895, - "Alert": -9.652748, - "Alice": -8.148671, - "Alignment=": -7.706838, - "Aliquam": -8.736457, - "All": -10.345895, - "AmAaEzqhq": -10.345895, - "An": -7.087799, - "AnYNENO": -10.345895, - "Analysis": -10.345895, - "Anderson": -10.345895, - "Another": -9.247283, - "AnyCPU": -7.254853, - "AoJqPdNrZA": -10.345895, - "ApO": -10.345895, - "AppName=": -10.345895, - "Application": -8.736457, - "Application.Designer.vb": -10.345895, - "Application.Fields": -10.345895, - "Application.myapp": -10.345895, - "ApplicationProject": -9.652748, - "Apr.": -10.345895, - "AqdW": -10.345895, - "Archiver": -9.652748, - "Arial": -8.043310, - "ArtifactsDir": -10.345895, - "Assembler": -9.652748, - "Assemblies": -8.736457, - "AssemblyInfo": -10.345895, - "AssemblyName": -10.345895, - "AssemblyName=": -9.652748, - "Association": -10.345895, - "AsyncGet": -10.345895, - "AtHddI": -10.345895, - "Attempts": -10.345895, - "Attribute": -10.345895, - "Attribution": -9.652748, - "Aug.": -10.345895, - "Author=": -10.345895, - "AwGd": -10.345895, - "AwziG": -10.345895, - "Ay": -10.345895, - "AyDux": -10.345895, - "Ayj": -10.345895, - "AykpfCcbzv": -10.345895, - "Azd": -10.345895, - "Azure": -9.652748, - "B": -8.043310, - "BACKPACK": -9.652748, - "BAQzkc/Yiwa": -10.345895, - "BB": -10.345895, - "BBF": -10.345895, - "BD": -10.345895, - "BE": -10.345895, - "BEERgmhJvAntKLwLtJ": -10.345895, - "BETp": -10.345895, - "BEXKairlYSrFbiL": -10.345895, - "BEYOND": -10.345895, - "BF": -8.959601, - "BFkfl": -10.345895, - "BHQfJdA": -10.345895, - "BHg/": -10.345895, - "BINARY": -9.247283, - "BJB": -10.345895, - "BKeWMTHEAAAAASUVORK": -10.345895, - "BLAKE": -10.345895, - "BNaj": -10.345895, - "BOD": -10.345895, - "BOOLEAN": -9.247283, - "BP": -10.345895, - "BRMHZxrN": -10.345895, - "BSD": -9.652748, - "BT": -9.652748, - "BU": -10.345895, - "BUY": -8.043310, - "BWhS": -10.345895, - "BY": -9.652748, - "BZKTz": -10.345895, - "BZTHTUEApqXA": -10.345895, - "BZbsTlEFENAOUGToAAKuVkF": -10.345895, - "BZwrcT": -10.345895, - "BaV": -10.345895, - "Background": -10.345895, - "Background=": -10.345895, - "Bb": -10.345895, - "BcB": -10.345895, - "BcLIHxOwJwKsGn": -10.345895, - "BeWrUMuH": -10.345895, - "BeZ": -10.345895, - "Beach": -10.345895, - "BfZOgtUvT": -10.345895, - "Bh/MYCpnCu/etFOCtqntXs": -10.345895, - "Binary": -10.345895, - "BindTo": -10.345895, - "Bit": -8.959601, - "BiznjmAJ": -10.345895, - "Bkyx": -10.345895, - "BlD": -10.345895, - "Block": -10.345895, - "Blue": -10.345895, - "BngynDNjR/": -10.345895, - "BorderPane": -9.652748, - "Bot": -9.652748, - "Bowerbird.Website": -10.345895, - "BpMhFh": -10.345895, - "BpjkTw": -10.345895, - "Brian": -10.345895, - "Build": -10.345895, - "BuildFileToCompareWith=": -9.652748, - "BuildMode=": -9.652748, - "BuildNumber": -10.345895, - "Builder": -9.652748, - "But": -10.345895, - "Bv": -10.345895, - "BwZFjJ/": -10.345895, - "ByFBSUsgwTH": -10.345895, - "ByIhoqOjj": -10.345895, - "C": -7.013691, - "C/": -10.345895, - "C/a": -10.345895, - "C3": -10.345895, - "CAMDEN": -10.345895, - "CAP": -10.345895, - "CAiTht": -10.345895, - "CAnQcpC": -10.345895, - "CC": -9.247283, - "CCBV": -10.345895, - "CENTER": -9.652748, - "CFIdOZl/f": -10.345895, - "CGJxYdmTeSQK": -10.345895, - "CHESTERK": -10.345895, - "CHOICE": -10.345895, - "CHhUN": -10.345895, - "CIAGxpAiSIkiKmKhAIBD": -10.345895, - "CIARt": -10.345895, - "CITbW": -10.345895, - "CIaRRWE": -10.345895, - "CIqj": -10.345895, - "CJSyCb": -10.345895, - "CKoMja": -10.345895, - "CKwoXU": -10.345895, - "CMSf": -10.345895, - "CMbdI": -10.345895, - "CMpxMkRTfq": -10.345895, - "COLLECTION": -10.345895, - "COLOR=": -7.210401, - "COWNDkOiwzABEH": -10.345895, - "CPJP": -10.345895, - "CPU": -10.345895, - "CQL": -10.345895, - "CQLBhEhI": -10.345895, - "CQMWKNfN": -10.345895, - "CREATED=": -7.210401, - "CRHgschwPGQwZq": -10.345895, - "CRykv/BD": -10.345895, - "CSharp": -9.652748, - "CTAESWG": -10.345895, - "CTEsEAZI": -10.345895, - "CTwKKPh": -10.345895, - "CURRENCIES": -10.345895, - "CUV/UfX": -10.345895, - "CUi": -10.345895, - "CVI": -10.345895, - "CXSejzLweCFdrHpxwd": -10.345895, - "CXdfLj": -10.345895, - "CYII": -7.780946, - "CZcI": -10.345895, - "Call": -10.345895, - "Case": -9.652748, - "CbXcT": -10.345895, - "CcYDOp": -10.345895, - "Cci": -10.345895, - "CdMl": -10.345895, - "Cdsn": -10.345895, - "Cdsrihynd": -10.345895, - "Cgxy": -10.345895, - "ChDMV": -10.345895, - "Change": -9.652748, - "ChangeTrackingEnabled": -9.652748, - "Changed": -8.959601, - "Changed.": -10.345895, - "Changing": -8.736457, - "Changing/Changed": -10.345895, - "Chv": -10.345895, - "CiZYdOx": -10.345895, - "CkEwP": -10.345895, - "CkrO": -10.345895, - "Class": -10.345895, - "Classes": -10.345895, - "Clc": -10.345895, - "CmtNKszQTkv": -10.345895, - "Collection.Select": -10.345895, - "Color=": -8.266454, - "Colour": -10.345895, - "ColumnCount=": -10.345895, - "Comment=": -10.345895, - "Common": -8.554136, - "Commons": -9.652748, - "Compiler": -8.959601, - "Conceptually": -10.345895, - "Concurrency": -10.345895, - "Condition=": -5.915078, - "Configs": -10.345895, - "Configuration": -7.210401, - "Consider": -9.652748, - "Console": -9.247283, - "Consortium": -9.652748, - "Consortium.": -10.345895, - "Constructor": -9.652748, - "Constructs": -8.959601, - "Converts": -9.652748, - "Cooking": -9.652748, - "Copyright": -10.345895, - "Count.": -8.959601, - "Covariant": -10.345895, - "CpBDtlBGMCrepTdSfjCFnZgpIA/": -10.345895, - "CqlmZiaeaKICmChBlCEM": -10.345895, - "Cr": -10.345895, - "Create": -9.652748, - "Created": -9.652748, - "Creates": -9.247283, - "Creative": -9.652748, - "CrkMNJ": -10.345895, - "CsQJANgoSKJosgAdGkFYgKxFcgKlZUnHn": -10.345895, - "CslOmoqiV": -10.345895, - "Culture": -8.959601, - "Culture=": -9.247283, - "Current": -10.345895, - "CurrentBuildDateStamp": -9.652748, - "CurrentBuildDir": -9.247283, - "CurrentProject": -10.345895, - "CurrentUser": -10.345895, - "CxC": -10.345895, - "CyXMw": -10.345895, - "D": -7.401456, - "D.gml": -10.345895, - "DA": -9.652748, - "DBzumGHJAQ": -10.345895, - "DCiF": -10.345895, - "DDY": -10.345895, - "DEBUG": -8.959601, - "DF": -10.345895, - "DGcYROKR": -10.345895, - "DHgTsDrjqEfzWhZz": -10.345895, - "DICTIONARY": -9.247283, - "DISCOVER": -10.345895, - "DInstances.gml": -10.345895, - "DK": -10.345895, - "DLYhwPU": -10.345895, - "DLwIOYb": -10.345895, - "DMBDsp/hHDxQcOFBwwMAgwMDEIKAgoCAgUqBhqH": -10.345895, - "DMTyFYXHyPW/XVDiQt": -10.345895, - "DO": -10.345895, - "DOUBLE": -9.247283, - "DPLsfvqmLbdDuCYTACnMrPzlUKPABgfPBXfeBXvb": -10.345895, - "DPVhouJ": -10.345895, - "DQAw": -10.345895, - "DQQ": -10.345895, - "DS": -10.345895, - "DSound.gml": -9.652748, - "DTes": -10.345895, - "DU": -9.652748, - "DUEMgWEkIGATT": -10.345895, - "DVXz": -10.345895, - "Date=": -10.345895, - "DcefYT": -10.345895, - "DclzSa": -10.345895, - "Debug": -7.167841, - "Dec.": -10.345895, - "Default": -10.345895, - "DefaultTargets=": -7.860988, - "DeferredScheduler": -10.345895, - "Degrees=": -10.345895, - "Delegate": -10.345895, - "Delivered": -10.345895, - "Dependencies": -9.652748, - "Dependency": -10.345895, - "DependsOnTargets=": -9.652748, - "Designer": -8.736457, - "Destination=": -8.554136, - "DestinationFiles=": -9.247283, - "Determins": -9.652748, - "Deus": -9.652748, - "Device": -10.345895, - "DgTM": -10.345895, - "DhckMiKMQW/": -10.345895, - "DhsF": -10.345895, - "DiIOZYTzzEVxFMAk": -10.345895, - "DiNd": -10.345895, - "Directories=": -9.247283, - "Directory": -10.345895, - "Disable": -10.345895, - "DisableFastUpToDateCheck": -10.345895, - "Disabled": -10.345895, - "Discard": -9.652748, - "Dispatcher": -9.247283, - "DispatcherScheduler": -10.345895, - "DisplayList=": -9.652748, - "DisplayName=": -9.652748, - "DisplaySelectionView=": -9.652748, - "DisplayStat=": -9.652748, - "Distance": -10.345895, - "Distributed": -10.345895, - "DjJJwtwLYNMEg": -10.345895, - "DkRaBTPW": -10.345895, - "Dkr": -10.345895, - "Dkw": -10.345895, - "DmOOBORacaakZwjQt": -10.345895, - "DmgAAAABJRU": -10.345895, - "DoJCqsxFsr": -10.345895, - "Dock=": -10.345895, - "Donec": -9.652748, - "DqhhkHITU": -10.345895, - "Drawing": -9.652748, - "DtEqRriJh": -10.345895, - "DuBGdhSCY": -10.345895, - "Duration=": -8.736457, - "During": -10.345895, - "Dvs/yGQU": -10.345895, - "DwN": -10.345895, - "DwohPN": -10.345895, - "DxvyeEhGkL": -10.345895, - "Dyczrd": -10.345895, - "E": -7.210401, - "EAE8E5": -10.345895, - "EAOW": -10.345895, - "EAt": -10.345895, - "EB": -10.345895, - "EBAsrP": -10.345895, - "EBFB": -10.345895, - "EBJxplu": -10.345895, - "EBPJRG": -10.345895, - "ECEq": -10.345895, - "ECNTy": -10.345895, - "EDSCgB": -10.345895, - "EDTVProfile": -10.345895, - "EEBO": -8.736457, - "EED": -10.345895, - "EEDC": -10.345895, - "EF": -10.345895, - "EGa": -10.345895, - "EHI": -10.345895, - "EI": -10.345895, - "EJEtETL": -10.345895, - "EKMZ": -10.345895, - "ELARmTvRa": -10.345895, - "ELacEEAFzuQCqmDMD": -10.345895, - "ELvd": -10.345895, - "ENRICH": -10.345895, - "ENTITY": -8.736457, - "ENVRG": -10.345895, - "EQAMVMZQzANAlQcUfvUpePBlrRgUD": -10.345895, - "EQEC": -10.345895, - "EQPKPgPU": -10.345895, - "EQVR": -8.043310, - "ESfRdb": -10.345895, - "EU": -10.345895, - "EXAMPLE": -10.345895, - "EXPRESS": -10.345895, - "EYRiPlPfdooQhMJ": -10.345895, - "Each": -10.345895, - "Ead": -10.345895, - "EbBnLm": -10.345895, - "Edge": -10.345895, - "EdgeNavigation": -10.345895, - "EdgeNavigator": -10.345895, - "EgDRNmk": -10.345895, - "EgSjaQs": -10.345895, - "EhtMdsFIHujZ": -10.345895, - "EhuEMI": -10.345895, - "Ehul": -10.345895, - "Ei": -10.345895, - "Elements": -10.345895, - "Eli": -10.345895, - "Email": -10.345895, - "EnNR": -10.345895, - "Enabled=": -7.948000, - "Enables": -9.652748, - "Encoding": -9.652748, - "England": -9.247283, - "English": -9.652748, - "EnrjHnjB": -10.345895, - "Enrollment": -8.736457, - "Ensure": -10.345895, - "Entry": -9.652748, - "Eo": -10.345895, - "Epidoc": -10.345895, - "EqhJHfMGbAsYdIgORkLjFUaNXENpCcE": -10.345895, - "ErZYNvvLeEplAU": -10.345895, - "Eric": -10.345895, - "ErkJggg": -8.736457, - "EsFChVpZ": -10.345895, - "EsLye": -10.345895, - "Esc": -9.652748, - "Estate": -10.345895, - "Et": -10.345895, - "Ets": -10.345895, - "EuluS": -10.345895, - "European": -10.345895, - "Evaluates": -10.345895, - "Evi": -10.345895, - "EvzuinJYiBfBty": -10.345895, - "Ex": -10.345895, - "Example": -10.345895, - "Exception": -10.345895, - "Exclude=": -9.652748, - "Exe": -8.959601, - "Expression": -8.399985, - "Ez": -10.345895, - "F": -8.959601, - "F#": -10.345895, - "F44E3C": -9.247283, - "FFFFFF": -7.706838, - "FIXED": -10.345895, - "FLORAL": -10.345895, - "FPI": -10.345895, - "FPSController_alarm": -9.652748, - "FPSController_create": -10.345895, - "FPSController_create.gml": -10.345895, - "FPSController_step": -10.345895, - "FPSController_step.gml": -10.345895, - "FREE": -10.345895, - "FSharp": -9.652748, - "F_Speed.gml": -10.345895, - "Fabric": -8.959601, - "False": -9.652748, - "Feb.": -10.345895, - "Fields": -10.345895, - "FileFormatDefault": -10.345895, - "Files": -8.043310, - "Files=": -9.247283, - "Fires": -7.706838, - "FlEjmDpA": -10.345895, - "Flags=": -10.345895, - "Foakes": -10.345895, - "For": -9.247283, - "FrakturType": -10.345895, - "Framework": -8.399985, - "FreeMedForms": -10.345895, - "FreeMedForms.": -10.345895, - "Freepik": -10.345895, - "FromPath=": -10.345895, - "Functions": -9.247283, - "FxD": -10.345895, - "G": -8.266454, - "G/": -10.345895, - "GBlnZkG": -10.345895, - "GCC": -9.652748, - "GGDLmu/htRhtEBBruGRgqi": -10.345895, - "GMO_colorFilter_shader.shader": -10.345895, - "GMO_disableZBuffer.gml": -10.345895, - "GMO_draw": -10.345895, - "GMO_drawCameraSurface.gml": -10.345895, - "GMO_enableZBuffer.gml": -10.345895, - "GMO_followObject.gml": -10.345895, - "GMO_getCameraAngle.gml": -10.345895, - "GMO_getCameraMode.gml": -10.345895, - "GMO_getCameraSurface.gml": -10.345895, - "GMO_getCameraZFar.gml": -10.345895, - "GMO_getCameraZNear.gml": -10.345895, - "GMO_getIPD": -9.247283, - "GMO_getIPD.gml": -10.345895, - "GMO_getResolutionHeight": -10.345895, - "GMO_getResolutionHeight.gml": -10.345895, - "GMO_getResolutionWidth": -10.345895, - "GMO_getResolutionWidth.gml": -10.345895, - "GMO_getSurface.gml": -10.345895, - "GMO_getUse": -10.345895, - "GMO_getVersion.gml": -10.345895, - "GMO_getVersionString": -10.345895, - "GMO_getVersionString.gml": -10.345895, - "GMO_hmdwarp_shader.shader": -10.345895, - "GMO_init.gml": -10.345895, - "GMO_initCamera.gml": -10.345895, - "GMO_initDefaults.gml": -10.345895, - "GMO_initShaders.gml": -10.345895, - "GMO_initSurfaces.gml": -10.345895, - "GMO_renderAnaglyph.gml": -10.345895, - "GMO_renderCamera.gml": -10.345895, - "GMO_renderOculus.gml": -10.345895, - "GMO_renderRegular.gml": -10.345895, - "GMO_resetSurfaces.gml": -10.345895, - "GMO_setCameraAngle.gml": -10.345895, - "GMO_setCameraMode.gml": -10.345895, - "GMO_setCameraRange.gml": -10.345895, - "GMO_setIPD": -9.652748, - "GMO_setIPD.gml": -10.345895, - "GMO_setResolution.gml": -10.345895, - "GMO_setUse": -10.345895, - "GMO_updateListener.gml": -10.345895, - "GMOculus.dll": -9.652748, - "GPLv": -10.345895, - "GR_cmToPixel.gml": -10.345895, - "GR_init.gml": -10.345895, - "GR_meterToPixel.gml": -10.345895, - "GRlgqeqrk": -10.345895, - "GS": -10.345895, - "GScsqdxXrWUpBWzn": -10.345895, - "GSct": -10.345895, - "GUm": -10.345895, - "GV/W": -10.345895, - "GXD": -10.345895, - "GXSvZQnCKJOu": -10.345895, - "GXj/K": -10.345895, - "GZ": -10.345895, - "GZSWBMscVAJhjDDCTBYjAmOUTQfUysQ": -10.345895, - "Gales": -9.652748, - "GameSystem": -10.345895, - "GbA": -10.345895, - "Gd": -10.345895, - "GetFieldNameForProperty": -10.345895, - "GetFieldNameForPropertyNameFunc.": -10.345895, - "GgI": -10.345895, - "GgyQnqOl": -10.345895, - "GhB/pxvXNxBYq/": -10.345895, - "GhwkVwyFRABvKbEkKvfI": -10.345895, - "GiJXDaNvAXzsD": -10.345895, - "Given": -9.247283, - "GjFhB": -10.345895, - "GktTQOGSHcvMA": -10.345895, - "Gl": -10.345895, - "GlTjly": -10.345895, - "GlbfnRMDgTj": -10.345895, - "GmvtY": -10.345895, - "GoROT": -10.345895, - "God": -9.652748, - "GosOJ": -10.345895, - "Graph": -10.345895, - "Guidelines": -9.247283, - "GwlqLObCpk": -10.345895, - "Gx": -10.345895, - "GxIBDfvxeOE": -10.345895, - "Gy": -10.345895, - "Gyn": -10.345895, - "GzVqDFvljl": -10.345895, - "GzlyWGJcdEnEiIYHS": -10.345895, - "H": -7.637845, - "H/JQyloC/bHK": -10.345895, - "HAS_SENT_TIME_BIT": -9.652748, - "HB": -10.345895, - "HBgohM": -10.345895, - "HBocGoBIpyyoqQnSas": -10.345895, - "HBpLAxpiOZDGy": -10.345895, - "HCEKRIVMDKXuLDaGuOZwCp": -10.345895, - "HCsvaVn": -10.345895, - "HEMIkfvkoy": -10.345895, - "HEoFIoE": -10.345895, - "HFCI": -10.345895, - "HFGT": -10.345895, - "HISmQtElmJrCUnLlWbZsWlwbHiEhAkrCEXREMQJEVsAoKkiE": -10.345895, - "HITSP_C": -10.345895, - "HKWVdDDpKstJB": -10.345895, - "HPe": -10.345895, - "HPeZZtknXG": -10.345895, - "HQiyBoNdi": -10.345895, - "HSSvSkC": -10.345895, - "HTQKkuZByK": -10.345895, - "HVBRKyPmhPKkCCT": -10.345895, - "HWwc": -10.345895, - "HXDYIn": -10.345895, - "HYSkZYnnFjQ": -10.345895, - "HYSl": -10.345895, - "Haq": -10.345895, - "HcY": -10.345895, - "HctIlWNtqQfZM": -10.345895, - "HdWjfNUiYgtxtyiYDb": -10.345895, - "HeadOpts": -9.652748, - "Header": -9.652748, - "Header*": -10.345895, - "Height=": -8.043310, - "Hej": -10.345895, - "Helvetica": -8.043310, - "Hence": -10.345895, - "HgmWU": -10.345895, - "Hh": -9.652748, - "HiJH": -10.345895, - "High": -10.345895, - "HitTestMode=": -10.345895, - "HjH": -10.345895, - "HkSedItDym/ET": -10.345895, - "HlFFVCq": -10.345895, - "HlzMjxaXq": -10.345895, - "Hm": -10.345895, - "Hn": -10.345895, - "HnM": -10.345895, - "HnVVe": -10.345895, - "HoKyU": -10.345895, - "HonlgLg": -10.345895, - "House": -10.345895, - "However": -10.345895, - "HqlUFGq": -10.345895, - "HqqnFP": -10.345895, - "Hss/n": -10.345895, - "HtXHSclggU": -10.345895, - "Hugh": -9.652748, - "HvQfiMy": -10.345895, - "HwRvXDd": -10.345895, - "HwekVMxhzErtHWK": -10.345895, - "HxEp": -10.345895, - "HxtPZUAlk": -10.345895, - "I": -7.780946, - "I/Gk": -10.345895, - "I/KnVZfvMF": -10.345895, - "I/u": -10.345895, - "I18n": -9.247283, - "IACg": -10.345895, - "IAF": -10.345895, - "IAnGoU": -10.345895, - "IBRQ/": -10.345895, - "ICxeva/qqN": -10.345895, - "ID=": -7.210401, - "IDzBS": -10.345895, - "IECgwKDAwYlc": -10.345895, - "IEEwWeBdK": -10.345895, - "IEJxJ": -10.345895, - "IEnableLogger": -10.345895, - "IFAYamrzNvN": -10.345895, - "IFICItUkqgKiKiBSDCo": -10.345895, - "IFe": -10.345895, - "IGbE": -10.345895, - "IHd": -10.345895, - "IHofe": -10.345895, - "IJIDLNkg": -10.345895, - "IMPORTANT": -10.345895, - "IMTtCN": -10.345895, - "IMessageBus": -10.345895, - "IN": -10.345895, - "INCLUDE": -8.266454, - "INTEGER": -9.247283, - "INotifyPropertyChanged": -10.345895, - "INotifyPropertyChanged.": -10.345895, - "IObservedChange": -8.736457, - "IPC": -7.401456, - "IReactiveCollection": -9.247283, - "IReactiveNotifyPropertyChanged": -8.554136, - "IReactiveNotifyPropertyChanged.": -8.959601, - "ITALIC": -10.345895, - "ITCJA": -10.345895, - "ITXSUxwr": -10.345895, - "IVDaj": -10.345895, - "IVoIOZ": -10.345895, - "IXlhQKsuae": -10.345895, - "IYkXcRKiuBBgGvNUGfYF": -10.345895, - "IZC": -10.345895, - "Ib": -9.652748, - "IcLAu": -10.345895, - "Icon": -10.345895, - "Id": -10.345895, - "Id=": -8.959601, - "IdRePf": -10.345895, - "If": -8.148671, - "IfDqAfK": -10.345895, - "IfW": -10.345895, - "IhgrYnu": -10.345895, - "IiD": -10.345895, - "IkakcGplXcRE": -10.345895, - "IlF": -10.345895, - "IlFqxQzwX": -10.345895, - "IlJEoKoiiAksNiJSASimIlIACgwKDAoOB": -10.345895, - "Illegal": -10.345895, - "Illus.": -10.345895, - "Immediate": -10.345895, - "In": -8.043310, - "InUnitTestRunner": -10.345895, - "InapeW": -10.345895, - "Include=": -5.517581, - "Ingl": -9.652748, - "Inglaterra": -9.652748, - "Initiative": -9.652748, - "InsOaWQhGZTI": -10.345895, - "Instability": -10.345895, - "Installed": -10.345895, - "Interface": -10.345895, - "Interview": -10.345895, - "Invalidate": -9.652748, - "IoENAaotyr": -10.345895, - "IoabR": -10.345895, - "IpU": -10.345895, - "Ipsum": -8.266454, - "Iq": -10.345895, - "IqFlo": -10.345895, - "IqWLPcBapaiWiBEtVzTpjsVK": -10.345895, - "Ireland": -9.652748, - "Irlanda": -9.652748, - "Irto": -10.345895, - "IsAotleqCCDcUZ": -10.345895, - "IsCriticalRule=": -9.652748, - "IsDataSet": -10.345895, - "IslQELiLQiEAiFhKxYkTFiBURJ": -10.345895, - "Issues": -10.345895, - "It": -8.736457, - "Item": -8.736457, - "ItemChanged": -9.652748, - "ItemChanging": -9.652748, - "ItemChanging/ItemChanged.": -9.652748, - "ItemType=": -10.345895, - "ItlxjPpCIs": -10.345895, - "ItuenbbXPPueect": -10.345895, - "IuSNAAAAAElFTkSuQmCC": -10.345895, - "Iv": -10.345895, - "IvDERYR/": -10.345895, - "IxD": -10.345895, - "Ixuv": -10.345895, - "Izs": -10.345895, - "J": -7.948000, - "J//RyOiWy": -10.345895, - "J/m": -10.345895, - "JACKET": -10.345895, - "JAIwbIihZRkrAls": -10.345895, - "JCoc": -10.345895, - "JENSEN": -10.345895, - "JEOCIKPXFQGVmbvzI": -10.345895, - "JF": -10.345895, - "JFoH": -10.345895, - "JJKC": -10.345895, - "JK": -10.345895, - "JKM": -10.345895, - "JKoCLCsgkg": -10.345895, - "JLCnrXHAAAAAElFTkSuQmCC": -10.345895, - "JLRoddOBLv": -10.345895, - "JMg": -10.345895, - "JONES": -10.345895, - "JP/K": -10.345895, - "JRCXfeUiu": -10.345895, - "JRJZ": -10.345895, - "JRvClN": -10.345895, - "JSAyfWh": -10.345895, - "JSNJ": -10.345895, - "JUwGIlSd": -10.345895, - "JaRCbhCGhZwGVu": -10.345895, - "Jan.": -10.345895, - "January": -10.345895, - "JbAN": -10.345895, - "JbprAOCdh": -10.345895, - "Jbz": -10.345895, - "JcAAAAASUVORK": -9.652748, - "JcTzCEGH": -10.345895, - "JcaICWWtgAc": -10.345895, - "JdODL/ilx": -10.345895, - "JdWu": -10.345895, - "Je/XWD": -10.345895, - "JeRlbMZMf": -10.345895, - "JgwigMSJ": -10.345895, - "JifI": -10.345895, - "JkwMZqhrS": -10.345895, - "JlYXSJTquTcHmRC/MZVRN": -10.345895, - "JlbodjYZ": -10.345895, - "JnMeH": -10.345895, - "JnaxSV": -10.345895, - "JogLgCFNACM": -10.345895, - "JqHaU": -10.345895, - "JqqKt/O": -10.345895, - "JuNSNhQiPNK": -10.345895, - "July": -10.345895, - "June": -10.345895, - "JustMyCode": -9.652748, - "Jz": -9.247283, - "K": -8.148671, - "K/ZgByVm": -10.345895, - "KAAAAAElFTkSuQmCC": -10.345895, - "KBeJqP": -10.345895, - "KDJ": -10.345895, - "KDiltqllAdnwX": -10.345895, - "KEd": -10.345895, - "KFYzZNkWMNA": -10.345895, - "KFhZI": -10.345895, - "KFu": -10.345895, - "KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB": -6.944698, - "KJGiFTO": -10.345895, - "KK": -10.345895, - "KKnmhjvvi": -10.345895, - "KKsFOrFJZAZdovslLP": -10.345895, - "KN/B": -10.345895, - "KNhtYlUhZKnueAeAC": -10.345895, - "KTAAAAABJRU": -10.345895, - "KWVRzJT/": -10.345895, - "KXJ": -10.345895, - "KXQ": -10.345895, - "KYA": -10.345895, - "KYRNukSmslomP": -10.345895, - "KYeJM": -10.345895, - "KcW": -10.345895, - "KdT/kd/": -10.345895, - "KeepHistoric=": -10.345895, - "KeepXmlFiles=": -10.345895, - "KfGj": -10.345895, - "KgYAZrHGw": -10.345895, - "Kind=": -10.345895, - "Kingdom": -9.652748, - "Kiq": -10.345895, - "Km/": -10.345895, - "KnUfJ": -10.345895, - "KpqydGpBAapTIF": -10.345895, - "KqxEIjHJvNufUpSfIGT": -10.345895, - "KriG": -10.345895, - "Krsi": -10.345895, - "KtV": -10.345895, - "Ktk": -10.345895, - "KtrKzEVlYikVgkshKLZMUmjBmBaAiChIomVJC": -10.345895, - "Ktyw": -10.345895, - "Kw": -10.345895, - "KwCMHNaVe": -10.345895, - "L": -10.345895, - "LABEL": -10.345895, - "LIST": -9.247283, - "LMukLu": -10.345895, - "LSPEtO": -10.345895, - "LaTeX": -10.345895, - "Label=": -7.637845, - "Language": -10.345895, - "Language=": -10.345895, - "LayoutMaster": -10.345895, - "LayoutMaster=": -10.345895, - "Left": -10.345895, - "Level": -8.043310, - "Library": -9.652748, - "LibraryElement": -10.345895, - "License": -9.652748, - "Linker": -8.959601, - "Listen": -8.959601, - "Lite": -9.652748, - "LjjH": -10.345895, - "Log": -9.247283, - "Logs": -10.345895, - "Lorem": -8.148671, - "Low": -10.345895, - "LwbsCqFOnMoaDvKgWEtF": -10.345895, - "M": -8.148671, - "M/fmmY/aZwbXGzMlmtMdWBUWIm": -10.345895, - "M/vRlIM": -10.345895, - "MAEKER": -10.345895, - "MAeQ": -10.345895, - "MAx": -10.345895, - "MD": -10.345895, - "MDM": -8.148671, - "MEIW": -10.345895, - "METHODS": -10.345895, - "MFBn": -10.345895, - "MHQwEKjKjqWgkgpqFSTgoCAAEs": -10.345895, - "MK": -10.345895, - "ML": -10.345895, - "MLA": -9.652748, - "MLHyAKwAAAAAElFTkSuQmCC": -10.345895, - "MMgIsyk/DkSFgiswqYDgDPhFi": -10.345895, - "MODIFIED=": -7.210401, - "MP": -10.345895, - "MPF": -10.345895, - "MPZB": -10.345895, - "MQ": -10.345895, - "MRU": -10.345895, - "MS": -10.345895, - "MSBuildExtensionsPath": -9.247283, - "MSBuildProjectDirectory": -10.345895, - "MT": -10.345895, - "MTpSUI": -10.345895, - "MYEbsRExSMLxf/VTaHLUU": -10.345895, - "MZPoU": -10.345895, - "Made": -10.345895, - "MainWindow": -9.652748, - "Make": -9.652748, - "MakeObjectReactiveHelper.": -10.345895, - "ManagedCProj": -10.345895, - "Management": -10.345895, - "Manual": -10.345895, - "Mar.": -10.345895, - "Margin=": -10.345895, - "Martin": -9.652748, - "May": -10.345895, - "Message": -6.978599, - "MessageBus": -9.247283, - "MessageBus.Current.": -10.345895, - "Methods": -10.345895, - "Metric": -10.345895, - "Metrics": -9.247283, - "MfSfR": -10.345895, - "Mg": -10.345895, - "MgPHnCdltM": -10.345895, - "Mh": -10.345895, - "Michigan": -10.345895, - "Microsoft": -7.860988, - "Microsoft.CSharp": -10.345895, - "Microsoft.FSharp.Targets": -9.652748, - "Microsoft.NET": -9.652748, - "Microsoft.Vsix.TemplatesPackage": -10.345895, - "Microsoft.Vsix.TemplatesPackage.VsixWizard": -10.345895, - "Mj": -10.345895, - "MjI": -9.652748, - "MjKyNjKyMjI": -10.345895, - "Mobile": -10.345895, - "Model": -10.345895, - "Modern": -10.345895, - "MrIyMjYyaoSJEepSUWhEoc": -10.345895, - "MtkLkscJA": -10.345895, - "MtplSJz": -10.345895, - "Mueller": -10.345895, - "MulN": -10.345895, - "MvAem": -10.345895, - "MvBeniWG/Ui": -10.345895, - "Mw": -10.345895, - "MxR": -10.345895, - "My": -9.652748, - "My.Resources": -10.345895, - "My.Web": -9.652748, - "MyApplicationCodeGenerator": -10.345895, - "MyCommon": -10.345895, - "MyDef": -9.652748, - "MyqhWwJVIKqL": -10.345895, - "Mz": -10.345895, - "N": -8.266454, - "N//pruzkdyik": -10.345895, - "NAME=": -7.167841, - "NAcdZIcna": -10.345895, - "NAw": -10.345895, - "NB": -10.345895, - "NCL3": -9.652748, - "NCL30EDTV": -10.345895, - "NCTY": -10.345895, - "NCV": -10.345895, - "NDEBUG": -10.345895, - "NDQ": -10.345895, - "NDXrKcjT/fcF": -10.345895, - "NDaysAgo=": -9.652748, - "NDw": -10.345895, - "NET": -10.345895, - "NEoWQQ": -10.345895, - "NJ": -10.345895, - "NJe": -10.345895, - "NKcDAx/": -10.345895, - "NMC": -10.345895, - "NONE": -9.652748, - "NOT": -10.345895, - "NOTE": -10.345895, - "NOW": -7.948000, - "NQuGEUAn": -10.345895, - "NQwMLCy": -10.345895, - "NUaV": -10.345895, - "NWFV/": -10.345895, - "NZAthyg/ppjL": -10.345895, - "NZDhNpDw": -10.345895, - "NZU": -10.345895, - "Name": -7.948000, - "Name=": -5.891548, - "Namespace": -9.652748, - "Namespaces=": -10.345895, - "Nascetur": -9.652748, - "NdoO": -10.345895, - "NeZMZ": -10.345895, - "Nemerle": -8.959601, - "Nemerle.Linq.dll": -10.345895, - "Nemerle.dll": -10.345895, - "NemerleBinPathRoot": -9.652748, - "NemerleVersion": -10.345895, - "Net": -10.345895, - "New": -9.652748, - "New_Case_Created_Email_Alert": -9.652748, - "NgIoOfAdGRyCxQEpX": -10.345895, - "NgeNzJkQSbDcWdT": -10.345895, - "NiHGmWPfleBxKpCWCxOHxN": -10.345895, - "NizM": -10.345895, - "Nj": -10.345895, - "Nln": -10.345895, - "NlvuRbJ": -10.345895, - "NmJsdGokyH": -10.345895, - "NoZtBbcve": -10.345895, - "None": -10.345895, - "Normal": -10.345895, - "Norte": -9.652748, - "Northern": -9.652748, - "Northwestern": -10.345895, - "NotCcDuD": -10.345895, - "Note": -8.266454, - "Nov.": -10.345895, - "November": -10.345895, - "Now.ToString": -9.652748, - "Np": -10.345895, - "NuGet.VisualStudio.Interop": -10.345895, - "NuGet.VisualStudio.TemplateWizard": -10.345895, - "NuHdKd": -10.345895, - "Nullam": -10.345895, - "NuqUcy": -10.345895, - "NvH": -10.345895, - "NvU": -10.345895, - "NxJEHFVf": -10.345895, - "NylER": -10.345895, - "NymBS/R": -10.345895, - "NzPE/POEHIopWbukFiQ/sztybgUHsM": -10.345895, - "NzYPLAPSGAiRI": -10.345895, - "NzmSyXt": -10.345895, - "O": -8.399985, - "O/": -10.345895, - "OAPH": -9.652748, - "OASIS/CALS": -10.345895, - "OAZGut": -10.345895, - "OBU": -10.345895, - "OCaml": -10.345895, - "ODEIFVy": -10.345895, - "ODFpGKJl": -10.345895, - "ODIMygeVCCcppBS": -10.345895, - "OEpZWg": -10.345895, - "OFFER": -10.345895, - "OHBlxVgCd": -10.345895, - "OHEILZyRvb": -10.345895, - "OI": -10.345895, - "OIpVAAAAAElFTkSuQmCC": -10.345895, - "OIz": -10.345895, - "OKHw": -10.345895, - "OKOL": -10.345895, - "OLQGSIvDRArM": -10.345895, - "OM": -10.345895, - "OMfgSSLUIH": -10.345895, - "OMpBdDYVJCqbhJHHdmT": -10.345895, - "ON": -10.345895, - "ONJNwjAbUd": -10.345895, - "OP": -9.652748, - "OPMqWngzO": -10.345895, - "OQBzW": -10.345895, - "OQizxvEvpxI": -10.345895, - "OR": -10.345895, - "ORDER": -10.345895, - "OTLF": -10.345895, - "OUR": -10.345895, - "OVER": -10.345895, - "OVR_Device_getPitch.gml": -10.345895, - "OVR_Device_getRoll.gml": -10.345895, - "OVR_Device_getYaw.gml": -10.345895, - "OVR_Device_init.gml": -10.345895, - "OVR_Init.gml": -10.345895, - "OVR_beginFrame.gml": -10.345895, - "OVR_endFrame.gml": -10.345895, - "OVR_getEyePos.gml": -10.345895, - "OVR_getHMDName.gml": -10.345895, - "OVR_getVersion.gml": -10.345895, - "OVR_linkWindowHandle.gml": -10.345895, - "OW": -10.345895, - "OYmbdKJe": -10.345895, - "OYob": -10.345895, - "OZQUe": -10.345895, - "Oazv": -10.345895, - "Ob": -10.345895, - "Ob/V": -10.345895, - "ObmQpJyEgGKoMqITlXAXssbfYCEQeysztkWMoPcXTniLCxUqz": -10.345895, - "Observable": -6.320543, - "Observable.": -8.554136, - "Observable.Return": -10.345895, - "ObservableAsPropertyHelper": -8.554136, - "ObservableAsyncMRUCache": -9.652748, - "ObservableAsyncMRUCache.": -10.345895, - "ObservableAsyncMRUCache.AsyncGet": -10.345895, - "ObservableForProperty": -7.706838, - "ObservableForProperty.": -10.345895, - "ObservableToProperty": -10.345895, - "Observables": -8.959601, - "Observables.": -9.652748, - "Oc": -10.345895, - "Oct.": -10.345895, - "Off": -10.345895, - "OfwC": -10.345895, - "OhI": -10.345895, - "OmPy": -10.345895, - "On": -9.652748, - "On/JFp": -10.345895, - "OnLpNCe": -10.345895, - "OpenInEditor=": -10.345895, - "Opff": -10.345895, - "OpwVXsQyPycPO": -10.345895, - "Order": -10.345895, - "Ordinal": -8.554136, - "Organization=": -10.345895, - "Other": -8.736457, - "Ou": -10.345895, - "Oue": -10.345895, - "OutputPath": -10.345895, - "Owner": -10.345895, - "Oxford": -9.652748, - "OxoM": -10.345895, - "OyCbdSRlmclBg": -10.345895, - "OzFhiOIpLAC": -10.345895, - "P": -6.584695, - "PAYMENT": -10.345895, - "PBSyB": -10.345895, - "PBnfLX": -10.345895, - "PCDATA": -10.345895, - "PCTkPxwUHFUf": -10.345895, - "PDZD": -10.345895, - "PHA": -10.345895, - "PI": -10.345895, - "PJKO": -10.345895, - "PK": -10.345895, - "PLRHlGMznChKIcwiFTrlnTqxYkLbDG": -10.345895, - "POIOHEBZ": -10.345895, - "POLO": -10.345895, - "POQ": -10.345895, - "POSITION=": -8.959601, - "PP": -10.345895, - "PQ": -10.345895, - "PQJbhwAB": -10.345895, - "PRIORITY_HIGH": -10.345895, - "PRIORITY_LOW": -10.345895, - "PRIORITY_MASK": -9.247283, - "PRIORITY_NORMAL": -10.345895, - "PROMO": -10.345895, - "PRduvdsPiY": -10.345895, - "PS": -10.345895, - "PToi": -10.345895, - "PUMPING_MSGS_BIT": -9.652748, - "PUUhiJf": -10.345895, - "PUwti": -10.345895, - "PVNc": -10.345895, - "PW": -10.345895, - "PXJsisYwgAJAVOAFv": -10.345895, - "PYwXYJI": -10.345895, - "Package": -9.247283, - "Package.ico": -10.345895, - "Page": -10.345895, - "Pal": -10.345895, - "Path=": -10.345895, - "Patient": -10.345895, - "PbJUwiwr/AiHdeYi": -10.345895, - "PcC": -10.345895, - "Pd": -10.345895, - "Pdx": -10.345895, - "Pg": -10.345895, - "Phasellus": -8.736457, - "Phone": -9.247283, - "PibMlUYsAJWE": -10.345895, - "PiuJI": -10.345895, - "PjkzzFc": -10.345895, - "Pk/MdlVxTKwEe": -10.345895, - "Pk/f": -10.345895, - "Pl": -10.345895, - "PlRh": -10.345895, - "PlaceholderText=": -10.345895, - "Platform": -7.401456, - "Platform=": -10.345895, - "PmV/TyS": -10.345895, - "Pn": -10.345895, - "Pool": -10.345895, - "Portugu": -9.652748, - "Portuguese": -9.652748, - "PqbvZKpRvueoCGpQFvj": -10.345895, - "Prefer": -9.652748, - "Prefix": -10.345895, - "Prefix=": -10.345895, - "PreprocessorDefinitions": -9.652748, - "Privacy": -10.345895, - "PrmWtxRZ": -10.345895, - "PrmrLStEw": -10.345895, - "ProgramFiles": -10.345895, - "Project": -8.266454, - "Project=": -6.849388, - "ProjectFileToCompareWith=": -9.652748, - "ProjectMode=": -9.652748, - "ProjectName": -10.345895, - "ProjectRoot": -7.948000, - "Projects=": -10.345895, - "Properties": -9.247283, - "Properties=": -10.345895, - "PropertyChangedEventArgs.": -10.345895, - "PropertyGroup": -10.345895, - "Provides": -8.959601, - "PsVyErkvVwe": -10.345895, - "PtRFLZ/m": -10.345895, - "PtUBpnwDAT": -10.345895, - "PublicKeyToken": -8.959601, - "PublicKeyToken=": -9.247283, - "Publisher=": -10.345895, - "Pw": -10.345895, - "PwTrQA": -10.345895, - "PxqETx": -10.345895, - "PxwTkBLD": -10.345895, - "Pytlik": -10.345895, - "Pz": -10.345895, - "Q": -8.148671, - "QB": -10.345895, - "QBhBRDtAHYCkHyAIATRZdO": -10.345895, - "QCUuWaYeS": -10.345895, - "QESF": -10.345895, - "QG": -10.345895, - "QGKvZwEPxCqMBPcvUoQ": -10.345895, - "QK": -10.345895, - "QKCxJClrzD": -10.345895, - "QKEAIOEJSdru": -10.345895, - "QN": -10.345895, - "QNNZCCfG": -10.345895, - "QPQMRgGHJOv": -10.345895, - "QRJJ": -10.345895, - "QSW": -10.345895, - "QUpIiB/WLQilRZXfgXuVziro": -10.345895, - "QUwZ": -10.345895, - "QVAnTTy": -10.345895, - "QWKx": -10.345895, - "QWc": -10.345895, - "QYGAd": -10.345895, - "QYi": -10.345895, - "Qa": -10.345895, - "QgJylT": -10.345895, - "QgQTRGUgk": -10.345895, - "QgVGT": -10.345895, - "QgnopIehCtugaxe": -10.345895, - "QgsKjgLS": -10.345895, - "Qi": -10.345895, - "Qiva": -10.345895, - "QjWyZzfm": -10.345895, - "QjhTvExFIHoWTIFnhEUnMvxmMIqT": -10.345895, - "Qkge/bJpVK": -10.345895, - "QldVvHmkBOGkbGzQrA": -10.345895, - "QmR/": -10.345895, - "QnA": -10.345895, - "QnEkPqKxFdN/": -10.345895, - "QoAdQcZoy": -10.345895, - "Qogdvj": -10.345895, - "Qq": -9.652748, - "QqRd": -10.345895, - "QrWtPhHMADMHf": -10.345895, - "Qth": -10.345895, - "Quality": -10.345895, - "Queen": -9.652748, - "Query=": -10.345895, - "Quisque": -8.399985, - "Qy": -10.345895, - "QzFvE": -10.345895, - "R": -8.266454, - "R/CGHyk": -10.345895, - "RDCG": -10.345895, - "RDfebgWJuWQw": -10.345895, - "REPLY_BIT": -9.652748, - "REPLY_ERROR_BIT": -9.652748, - "RETu": -10.345895, - "REWqhvtok": -10.345895, - "RGOQ": -10.345895, - "RK/chkiq": -10.345895, - "RKala": -10.345895, - "RLlDdJGz": -10.345895, - "RMI": -10.345895, - "ROJq": -10.345895, - "RPB": -10.345895, - "RQVTpIJWChgoKCgYGBgYGNh": -10.345895, - "RQreCCNHw": -10.345895, - "RRQrgix/": -10.345895, - "RRuQAqOmDzkCSjdKy": -10.345895, - "RSkPQMghld": -10.345895, - "RWPln": -10.345895, - "Rahtz": -10.345895, - "Rainha": -9.652748, - "RaiseAndSetIfChanged": -9.652748, - "RaisePropertyChanged": -9.652748, - "RaisePropertyChanging": -9.652748, - "Re": -10.345895, - "ReactiveCollection": -10.345895, - "ReactiveCollection.": -10.345895, - "ReactiveObject": -7.948000, - "ReactiveObject.": -10.345895, - "ReactiveUI": -9.652748, - "Real": -10.345895, - "RealEstate": -10.345895, - "Rec": -9.652748, - "Redistribution": -10.345895, - "Redistributions": -9.652748, - "RefCount": -10.345895, - "RefCountedBase*": -9.652748, - "Reference": -10.345895, - "RegisterMessageSource": -8.959601, - "Registers": -9.247283, - "Reino": -9.652748, - "RelativeNode": -10.345895, - "RelativeNode=": -10.345895, - "RelativeTo": -8.959601, - "RelativeTo=": -8.736457, - "Release": -7.573306, - "ReplaceParameters=": -8.959601, - "Represents": -8.959601, - "ResX": -10.345895, - "ResXResourceReader": -10.345895, - "ResXResourceWriter": -10.345895, - "Resource": -9.652748, - "ResourceType": -10.345895, - "Resources": -9.247283, - "Resources.Designer.vb": -10.345895, - "Resources.resx": -10.345895, - "Return": -10.345895, - "Returns": -8.736457, - "Rev": -10.345895, - "RfOuPi": -10.345895, - "RgEGCpAZEcUCkFAQYFhgYHDI": -10.345895, - "Rhd": -10.345895, - "RhhAiPhCQB": -10.345895, - "RiftSharpDll.dll": -10.345895, - "RjQmcGdtCAcrLAsxjYTZ": -10.345895, - "RkPgPqaJtCHtPDCryTjYjqnzSxkUFqOn": -10.345895, - "RkR": -10.345895, - "RmwqJjUkQzi": -10.345895, - "RoDyM": -10.345895, - "Roboto": -10.345895, - "Routing": -10.345895, - "Rows=": -10.345895, - "Rpt": -10.345895, - "RqRi/fM": -10.345895, - "RqUJKlgGVUMM/KtnWYh": -10.345895, - "RqrQUFqFD/tvZeWQU": -10.345895, - "RrJA": -10.345895, - "RtXeU/": -10.345895, - "Ru": -9.652748, - "Rudmnx": -10.345895, - "RufAnnobTnbWGdOWvuPWtvrrg": -10.345895, - "Rules": -10.345895, - "Rw": -10.345895, - "RwWfNO": -10.345895, - "Rx.Net.": -10.345895, - "RxApp": -10.345895, - "RxApp.DeferredScheduler": -9.652748, - "RxApp.GetFieldNameForPropertyNameFunc.": -9.652748, - "S": -8.266454, - "S/dQG/dg": -10.345895, - "SBHCNQrrQTYPq/Vdk": -10.345895, - "SBmsxPjtkign": -10.345895, - "SBuso": -10.345895, - "SBwkJwndUxxXZkNwnpAhSp": -10.345895, - "SDKs": -9.652748, - "SDjypBvG": -10.345895, - "SECTION_1002": -10.345895, - "SGxyYP": -10.345895, - "SHIPPING": -9.652748, - "SHIRT": -10.345895, - "SHOES": -10.345895, - "SHOP": -10.345895, - "SHORTS": -10.345895, - "SHORT_PERMALINK": -9.247283, - "SIEIwfBxUn": -10.345895, - "SIZE=": -7.210401, - "SIZkpCZxRxbxVdDd": -10.345895, - "SJf": -10.345895, - "SKETCH": -10.345895, - "SL": -10.345895, - "SLEzaxjYSe": -10.345895, - "SM": -10.345895, - "SMFYj": -10.345895, - "SNYLivgNkYgAsHArkkwBpHBT": -10.345895, - "SO": -10.345895, - "SOTBV": -10.345895, - "SPIFK": -10.345895, - "SPRING": -10.345895, - "SQRL": -10.345895, - "SSCd": -10.345895, - "STRING": -9.247283, - "STYLE=": -7.573306, - "SUMMER": -10.345895, - "SUZGw": -10.345895, - "SWEATER": -10.345895, - "SXmMY": -10.345895, - "SYAAAAASUVORK": -10.345895, - "SYNC_BIT": -9.652748, - "SYSTEM": -7.455523, - "SZdfWA": -10.345895, - "SaixVQjzQCkmQMsdOY": -10.345895, - "Sample": -9.652748, - "Say": -10.345895, - "SbCeuPmne/oRDlC": -10.345895, - "Schema": -10.345895, - "Schematron": -10.345895, - "Scotland": -9.652748, - "Sebastian": -10.345895, - "SectionsEnabled=": -10.345895, - "Select": -9.247283, - "SelectMany": -9.652748, - "SelectMany.": -10.345895, - "Selector": -10.345895, - "Semperin": -10.345895, - "SendMessage.": -9.652748, - "Sender.": -10.345895, - "Sends": -9.652748, - "Sept.": -10.345895, - "Server.": -10.345895, - "Set": -9.247283, - "SetValueToProperty": -10.345895, - "Setter": -9.652748, - "Setters": -10.345895, - "Settings": -9.652748, - "Settings.Designer.vb": -10.345895, - "Settings.settings": -10.345895, - "SettingsSingleFileGenerator": -10.345895, - "Setup.Bypass__c.Workflow_Rules__c": -10.345895, - "Sf": -10.345895, - "ShareAlike": -9.652748, - "ShdpNJvx": -10.345895, - "ShownInReport=": -10.345895, - "Silverlight": -8.736457, - "Simple": -7.860988, - "Simple.": -10.345895, - "Since": -10.345895, - "SjJIz": -10.345895, - "SjNhcF": -10.345895, - "Slztu": -10.345895, - "SmhEajokBBDFpIqgtKzUa": -10.345895, - "SnMo": -10.345895, - "SolutionRoot": -9.652748, - "Some": -10.345895, - "Source": -8.554136, - "Source=": -8.554136, - "SourceFiles=": -9.247283, - "Specifying": -9.652748, - "SqdznMxWvigVE": -10.345895, - "SrRYx": -10.345895, - "SrbEczr": -10.345895, - "Src": -10.345895, - "SsdeZ/DNic": -10.345895, - "St": -10.345895, - "Standard=": -10.345895, - "Studio": -8.736457, - "Style": -10.345895, - "SubType=": -10.345895, - "Summary": -10.345895, - "SutsnJtPHX/ShhxPN": -10.345895, - "Sweater": -10.345895, - "SwonQdMVhCejkTF": -10.345895, - "SyRaTAnB": -10.345895, - "System": -9.247283, - "System.ComponentModel.TypeConverter": -10.345895, - "System.Core": -10.345895, - "System.Data": -10.345895, - "System.DateTime": -9.652748, - "System.Design": -10.345895, - "System.Drawing": -10.345895, - "System.Resources.ResXResourceReader": -9.652748, - "System.Resources.ResXResourceWriter": -9.652748, - "System.Runtime.Serialization.Formatters.Soap.SoapFormatter": -10.345895, - "System.Serialization.Formatters.Binary.BinaryFormatter": -10.345895, - "System.Windows.Forms": -8.736457, - "System.Xml": -10.345895, - "T": -7.860988, - "T/WnU": -10.345895, - "TANK": -10.345895, - "TASK": -10.345895, - "TBRb": -10.345895, - "TBxVBHdOqJJM": -10.345895, - "TBzSYxyF": -10.345895, - "TC": -10.345895, - "TCP": -9.652748, - "TEI": -6.880159, - "TEST": -10.345895, - "TEXT=": -7.210401, - "TF": -10.345895, - "TFJjORUJEZndI": -10.345895, - "TGOjU": -10.345895, - "TIUgaS": -10.345895, - "TJeTK": -10.345895, - "TKCYX": -10.345895, - "TL": -10.345895, - "TNqJl/tMG": -10.345895, - "TOGYkha": -10.345895, - "TOPAZ": -10.345895, - "TOemd": -10.345895, - "TP": -10.345895, - "TPL": -10.345895, - "TPvpCL": -10.345895, - "TQOEJyP": -10.345895, - "TQPJnDQTpnv": -10.345895, - "TQfgF": -10.345895, - "TR": -10.345895, - "TRACE": -8.399985, - "TREBLIoJLT": -10.345895, - "TRzSfE": -10.345895, - "TS": -9.247283, - "TSdWCgibYA": -10.345895, - "TSender": -10.345895, - "TTbNpibpyNT/N": -10.345895, - "TWO": -10.345895, - "TX": -10.345895, - "TYWuVrjA/UAfx": -10.345895, - "TZjcj": -10.345895, - "Tag": -10.345895, - "TaggJD/xuvM": -10.345895, - "Target": -8.736457, - "Target=": -8.959601, - "TargetFileName=": -8.959601, - "Targets": -10.345895, - "Targets=": -8.399985, - "Task": -10.345895, - "TaskName=": -9.652748, - "TaskpoolScheduler": -9.652748, - "Tb/tTknO": -10.345895, - "TckrBE": -10.345895, - "TeX": -10.345895, - "Test": -9.247283, - "Text": -9.652748, - "Text=": -8.399985, - "TextColor=": -10.345895, - "Tf": -10.345895, - "TfAYhtJtgqMAHewWqhqrwJXu": -10.345895, - "TgQO": -10.345895, - "TgYrohX": -10.345895, - "ThENTdax": -10.345895, - "The": -5.781547, - "Theme=": -9.652748, - "There": -10.345895, - "This": -6.911908, - "This.GetValue": -10.345895, - "ThlApvdRyYBal": -10.345895, - "Threadpool": -10.345895, - "Time": -8.736457, - "Timer.": -9.652748, - "Tite": -10.345895, - "TjxN": -10.345895, - "Tk": -10.345895, - "TlGeEqTfgbhhMEeXXwoEVa": -10.345895, - "TmR": -10.345895, - "Tn": -10.345895, - "To": -8.148671, - "ToPath=": -10.345895, - "ToProperty": -9.652748, - "ToZBI": -10.345895, - "Tools": -9.652748, - "ToolsVersion=": -7.780946, - "TpVluyCUtcah": -10.345895, - "TqU": -10.345895, - "TrQ": -10.345895, - "Tracking": -9.652748, - "Trans": -10.345895, - "Transcription": -10.345895, - "Transform": -9.247283, - "TransformOrigin=": -10.345895, - "Treemap": -10.345895, - "TrtDMlIheowMUF": -10.345895, - "True": -7.573306, - "True.": -9.652748, - "Tt": -9.247283, - "TtQtKq/WtlUnie": -10.345895, - "TtUYACIBHFcywHrGFsqssaY": -10.345895, - "Tu": -10.345895, - "TuJdIIYAklsK": -10.345895, - "Tukg": -10.345895, - "TuuKQaxHU": -10.345895, - "TwIyvtAAAAAElFTkSuQmCC": -10.345895, - "TxlEWM": -10.345895, - "Ty": -10.345895, - "Type": -7.948000, - "Type.": -9.652748, - "Type=": -8.554136, - "TypeConverter": -9.652748, - "Types": -9.652748, - "U": -9.652748, - "UAP": -10.345895, - "UDyeCdp": -10.345895, - "UFnZ": -10.345895, - "UI": -9.652748, - "UMlFKRaAVhUwUOvFgExMVT": -10.345895, - "UNBLOCK_BIT": -9.652748, - "UQfDVVlDtcBOo": -10.345895, - "URI": -9.652748, - "URL": -9.652748, - "US": -10.345895, - "UVdKcK": -10.345895, - "Uk": -10.345895, - "UmV": -10.345895, - "UncoverableAttribute=": -10.345895, - "Unicode": -9.652748, - "Unido": -9.652748, - "Unit": -10.345895, - "United": -9.652748, - "Unported": -10.345895, - "Unrecognized": -9.652748, - "Unsubscribe": -10.345895, - "UoVxGUMYaJAZaaofzvgvAG": -10.345895, - "Uri=": -10.345895, - "Use": -7.637845, - "Using": -10.345895, - "Uvqvv": -10.345895, - "UzLqFMzGDa": -10.345895, - "V": -8.554136, - "VBC": -10.345895, - "VClBDk": -10.345895, - "VCpKmOmTnYk": -10.345895, - "VCtPmbNY": -10.345895, - "VD": -10.345895, - "VERDANT": -10.345895, - "VEoibbPUMWapEXQvG": -10.345895, - "VFunpfeTl": -10.345895, - "VGSM": -10.345895, - "VGwjqbKMKkLugBXotSictylIXQHEu": -10.345895, - "VIY/iYBTkZ": -10.345895, - "VIg": -10.345895, - "VJVr": -10.345895, - "VKwoyMBvjVAYDzetFCrglkU": -10.345895, - "VLOSco": -10.345895, - "VLvPb": -10.345895, - "VMkD": -10.345895, - "VRpuX": -10.345895, - "VSIX": -10.345895, - "VSPackage.cs": -10.345895, - "VSPackage.ico": -10.345895, - "VSPackage.resx": -10.345895, - "VV": -10.345895, - "VVP": -10.345895, - "VVaIe": -10.345895, - "VWBM": -10.345895, - "VWV": -10.345895, - "VZSEKfNIEnpAxyuW": -10.345895, - "Value": -8.959601, - "Value=": -8.043310, - "ValueIfNotDefault": -10.345895, - "VbMyResourcesResXFileCodeGenerator": -10.345895, - "VcfFcWRVVSMbQfv": -10.345895, - "VcnJOx": -10.345895, - "Version": -8.399985, - "Version.Major": -10.345895, - "Version=": -8.043310, - "VersionNumberMajor": -10.345895, - "VersionNumberMinor": -10.345895, - "VerticalText": -10.345895, - "Vg": -10.345895, - "VgYzoAAAAASUVORK": -10.345895, - "VhAv": -10.345895, - "View": -10.345895, - "ViewModel": -8.266454, - "ViewModels": -9.247283, - "Villa": -10.345895, - "Violated": -10.345895, - "Visual": -8.959601, - "VisualStudio": -9.247283, - "VisualStudioVersion": -9.652748, - "VkX": -10.345895, - "Vkbqeng": -10.345895, - "VoVk": -10.345895, - "Vols": -10.345895, - "Vq//XHvG": -10.345895, - "VsPkg.cs": -10.345895, - "VsixVSPackageCSharp": -10.345895, - "Vsyclt": -10.345895, - "Vt": -10.345895, - "VvJtwd": -10.345895, - "VwaXa": -10.345895, - "VxPG": -10.345895, - "VzUzUXlgzyPYvFWriKVbgWsERdevxXqAI/COVELiam": -10.345895, - "VzWHGSqO": -10.345895, - "VzqyoucsdIP": -10.345895, - "W": -7.948000, - "W/DzcYBXyyAAAAAElFTkSuQmCC": -10.345895, - "WABmSHSTqSqlwoENUgGZ": -10.345895, - "WBH": -10.345895, - "WBWyaW": -10.345895, - "WE": -10.345895, - "WFhYGBoYGBg": -10.345895, - "WGf": -10.345895, - "WHURsGDNJSTHu": -10.345895, - "WIDTH=": -7.573306, - "WIN": -9.652748, - "WIVQcXLFGU": -10.345895, - "WKTbPUoQv": -10.345895, - "WL/qL": -10.345895, - "WLKmZ": -10.345895, - "WNmsl": -10.345895, - "WODyzjKOBjFdESBxIqEzqayMaESoEXxX": -10.345895, - "WP": -10.345895, - "WPF": -10.345895, - "WPfCSjqK": -10.345895, - "WQlFgnuzSAQhCCagGgCgqQIklYgKhAVExUTFc": -10.345895, - "WQqS": -10.345895, - "WUkFkPrSljAMvS": -10.345895, - "WUtULud/OpHtcyb": -10.345895, - "WVigKWGIkrLZJgU": -10.345895, - "WVm": -10.345895, - "WVwNnnFsrkc": -10.345895, - "Wales": -9.652748, - "WdoiV/TjBHmPEE": -10.345895, - "We": -9.247283, - "Web": -10.345895, - "Web.config": -10.345895, - "WebRequest": -10.345895, - "When": -8.399985, - "WhenAny": -7.860988, - "WiX": -10.345895, - "Width=": -7.512682, - "Win": -9.652748, - "Window": -10.345895, - "Windows": -8.736457, - "With": -10.345895, - "Wix.targets": -10.345895, - "WixProject": -10.345895, - "WixTargetsPath": -10.345895, - "Wjgyc": -10.345895, - "WkHeCbXfDV": -10.345895, - "WkbmpjCK": -10.345895, - "Wl/yULCD/b": -10.345895, - "WlB": -10.345895, - "Wm": -10.345895, - "Wo": -10.345895, - "WorkingDirectory=": -10.345895, - "Works": -9.652748, - "Wp": -10.345895, - "WqB": -10.345895, - "WtfZz": -10.345895, - "Wu": -10.345895, - "WunpQzOkL": -10.345895, - "WvQRc": -10.345895, - "WvfJ": -10.345895, - "WwrmR": -10.345895, - "WyvO": -10.345895, - "X": -8.554136, - "X/Cb": -10.345895, - "X/SAJyeSaxOPY": -10.345895, - "X/hvO": -10.345895, - "X=": -10.345895, - "XEBo": -10.345895, - "XEUmVQgoxCe": -10.345895, - "XF": -10.345895, - "XFzFVBVAjcW": -10.345895, - "XHTML": -8.399985, - "XI": -10.345895, - "XJPGUG": -10.345895, - "XMA/": -10.345895, - "XML": -8.959601, - "XMLSchema": -8.554136, - "XN": -10.345895, - "XO": -10.345895, - "XPPOffm": -10.345895, - "XPe": -10.345895, - "XQJZCbuXp/": -10.345895, - "XQZMm": -10.345895, - "XRAuP": -10.345895, - "XRrxHT": -10.345895, - "XS": -10.345895, - "XSL": -8.959601, - "XUDYaMagwfWXhCilMsZ": -10.345895, - "XUSbY": -10.345895, - "XUYjEmebBXSeTYePjIdVj": -10.345895, - "XUg": -10.345895, - "XV/Kn": -10.345895, - "XVzdQ": -10.345895, - "XWVlZW": -10.345895, - "XX": -10.345895, - "XbJ/rU/pX": -10.345895, - "Xc": -10.345895, - "XdUtg": -10.345895, - "XgNc": -10.345895, - "XhyfIWbCOQCHEM": -10.345895, - "Xj": -10.345895, - "XjrDXRGWjIBO": -10.345895, - "Xkkp": -10.345895, - "XmMvAppMUb": -10.345895, - "XmlInputPath=": -10.345895, - "XnxIBIdrEnf": -10.345895, - "Xs": -10.345895, - "XslPath=": -10.345895, - "Xu": -10.345895, - "XuXBkUyOx": -10.345895, - "Xw": -10.345895, - "Xy": -10.345895, - "Y": -8.399985, - "Y=": -8.736457, - "YAAAAASUVORK": -10.345895, - "YAunhIkT": -10.345895, - "YBGRDGARACIGfU": -10.345895, - "YCRCH": -10.345895, - "YGJF": -10.345895, - "YKgHgbWYoKEUD": -10.345895, - "YMCgwKDAYKD": -10.345895, - "YMYy/": -10.345895, - "YMrPObHy/u": -10.345895, - "YN": -10.345895, - "YOQ": -10.345895, - "YTtcYqSwuW": -10.345895, - "YVkPUqssYU": -10.345895, - "YWiFAKaHTokI": -10.345895, - "YZy": -10.345895, - "Ye": -10.345895, - "Yfvq": -10.345895, - "YgZZvx": -10.345895, - "Ygc": -10.345895, - "YhAF": -10.345895, - "YhYJEm/": -10.345895, - "YhfYAwnQzulBQdc": -10.345895, - "YhuunCcp": -10.345895, - "Yi": -10.345895, - "YiK": -10.345895, - "YiqMcT": -10.345895, - "Yj": -10.345895, - "YjprkLcJOo": -10.345895, - "Yk": -10.345895, - "YkTFmrP": -10.345895, - "YnpN": -10.345895, - "YnrUMzAFTMz": -10.345895, - "YoJMahcQVQHBbOfAmrDsgC": -10.345895, - "You": -10.345895, - "YpQsF": -10.345895, - "YpsYKz": -10.345895, - "YrrTNcV": -10.345895, - "Yrs": -10.345895, - "YsQKBqFjBvzA": -10.345895, - "YtI": -10.345895, - "YwGS": -10.345895, - "YwkPPx": -10.345895, - "Yx": -10.345895, - "Yy": -10.345895, - "Yz": -10.345895, - "Yzb": -10.345895, - "Z": -8.399985, - "Z/HrKPYnEj": -10.345895, - "ZAAAAF": -9.652748, - "ZAAAAhklEQVR": -10.345895, - "ZAAAB/": -10.345895, - "ZAAAB/klEQVR": -10.345895, - "ZAAABYklEQVR": -10.345895, - "ZAAABfElEQVR": -10.345895, - "ZAAABjklEQVR": -10.345895, - "ZAAABvklEQVR": -10.345895, - "ZAAACIUlEQVR": -10.345895, - "ZAAACK": -10.345895, - "ZAAACMUlEQVR": -10.345895, - "ZAAACN": -10.345895, - "ZAAACNElEQVR": -10.345895, - "ZAAACO": -10.345895, - "ZAAACOElEQVR": -10.345895, - "ZAAACOUlEQVR": -10.345895, - "ZAAACP": -10.345895, - "ZAAACPUlEQVR": -10.345895, - "ZAAACQ": -10.345895, - "ZAAACQklEQVR": -10.345895, - "ZAAACS": -10.345895, - "ZAAACSElEQVR": -10.345895, - "ZAAACSUlEQVR": -10.345895, - "ZAAACTElEQVR": -10.345895, - "ZAAACUElEQVR": -10.345895, - "ZAAACUklEQVR": -10.345895, - "ZAAACV": -10.345895, - "ZAAACYUlEQVR": -10.345895, - "ZAAACjElEQVR": -10.345895, - "ZAuuu": -10.345895, - "ZAvLtuTd": -10.345895, - "ZC": -10.345895, - "ZCVwdsiun": -10.345895, - "ZChWhmJN/hlcTERrXVWcq": -10.345895, - "ZEb": -10.345895, - "ZFJSQJk": -10.345895, - "ZFPXviIWIJAHJ/S": -10.345895, - "ZGA": -10.345895, - "ZH": -10.345895, - "ZHv": -10.345895, - "ZJhH": -10.345895, - "ZLbbmL": -10.345895, - "ZLeVIwGFst": -10.345895, - "ZPyUmZ": -10.345895, - "ZQ": -10.345895, - "ZQwAAAABJRU": -10.345895, - "ZR": -10.345895, - "ZRiESZ": -10.345895, - "ZSO": -10.345895, - "ZSrk/g": -10.345895, - "ZTC": -10.345895, - "ZUaiksejgA": -10.345895, - "ZUlFIRaEShEYVUFFJREVExomLEidjv": -10.345895, - "ZWc": -10.345895, - "ZWoicWMkECgqQIklY": -10.345895, - "ZX": -10.345895, - "ZZ": -10.345895, - "Zbi": -10.345895, - "Zcp": -10.345895, - "ZdmLWwHIv": -10.345895, - "Zdvx": -10.345895, - "Ze": -10.345895, - "ZeTMM": -10.345895, - "Zecy": -10.345895, - "Zeubr": -10.345895, - "Zf": -10.345895, - "ZfiRIzkvYGna": -10.345895, - "Zfo": -10.345895, - "Zg": -10.345895, - "ZgST": -10.345895, - "ZhjPPElRYMEMrNItgjA": -10.345895, - "Zho": -10.345895, - "ZiScdCWe": -10.345895, - "Zillig": -10.345895, - "ZipFileName=": -10.345895, - "ZipLevel=": -10.345895, - "ZkVz": -10.345895, - "ZkcyxTSC": -10.345895, - "ZnFYxOhOUeqc/vGlLPpUrAKwnFDSstPPJu/": -10.345895, - "ZnYzGv": -10.345895, - "ZrnvSuGlIb": -10.345895, - "ZvDb": -10.345895, - "ZvLB/eOxTAAAAAElFTkSuQmCC": -10.345895, - "ZwJqBAPZrquXujKbP": -10.345895, - "Zy": -10.345895, - "Zzeuq": -10.345895, - "ZziW": -10.345895, - "[": -7.780946, - "\\": -5.078037, - "]": -6.790547, - "_DEBUG": -10.345895, - "_PlatformToolsetFriendlyNameFor_v": -10.345895, - "_PlatformToolsetShortNameFor_v": -10.345895, - "_bench.d": -10.345895, - "_bench.png": -10.345895, - "_scd": -8.736457, - "_woodstack.d": -10.345895, - "a": -5.042590, - "a.SourceDecls.Select": -10.345895, - "a.SourceFileDeclAvailable": -10.345895, - "aDGF": -10.345895, - "aGUraCBBU": -10.345895, - "aKBOADiMiarVAVEK": -10.345895, - "aNIckLMnQyPIh": -10.345895, - "aQUduSsanKjnVDe": -10.345895, - "aRgrIw/ghE": -10.345895, - "aSbNw": -10.345895, - "aT": -10.345895, - "aUk": -10.345895, - "aWpGxYTnvvMN/STd": -10.345895, - "aX": -10.345895, - "aXzwZFkJzLh": -10.345895, - "aYOiBj": -10.345895, - "aa": -10.345895, - "ab": -9.652748, - "abbr": -9.652748, - "able": -9.247283, - "about": -8.554136, - "above": -9.652748, - "ac": -10.345895, - "acVEBeIEomICe": -10.345895, - "accept": -10.345895, - "access": -9.247283, - "accommodate": -10.345895, - "accordingly": -10.345895, - "achieve": -10.345895, - "across": -9.652748, - "act": -9.652748, - "action": -9.247283, - "action_end_game": -10.345895, - "actual": -8.736457, - "add": -8.148671, - "added": -8.399985, - "added.": -8.736457, - "added/removed": -10.345895, - "adding": -9.247283, - "addition": -8.959601, - "additional": -9.247283, - "additionnal": -10.345895, - "adds": -9.652748, - "adipiscing": -10.345895, - "ado": -10.345895, - "adopting": -10.345895, - "advised": -10.345895, - "ae": -9.247283, - "af": -10.345895, - "after": -9.652748, - "agn": -10.345895, - "ahhUl": -10.345895, - "ahnYcXg": -10.345895, - "aims": -9.652748, - "akWxuWYJxV": -10.345895, - "al": -6.561706, - "algorithmic": -10.345895, - "align": -7.127019, - "align=": -6.069229, - "aligned": -10.345895, - "alignment": -9.652748, - "alignment=": -10.345895, - "aliquam": -10.345895, - "all": -7.948000, - "allcaps": -10.345895, - "allow": -9.652748, - "allowed.": -10.345895, - "allowing": -10.345895, - "allows": -7.573306, - "almost": -9.652748, - "alongside": -10.345895, - "alpVmc": -10.345895, - "alpha=": -10.345895, - "already": -10.345895, - "also": -7.455523, - "alt=": -7.013691, - "always": -6.880159, - "amet": -10.345895, - "amp": -7.573306, - "an": -5.813296, - "anQ": -10.345895, - "analysis.": -10.345895, - "analyze": -10.345895, - "ancestor": -8.399985, - "and": -5.463093, - "and/or": -10.345895, - "and=": -7.401456, - "annotation": -10.345895, - "another": -8.959601, - "ant": -10.345895, - "ante": -8.554136, - "antlib": -9.652748, - "any": -7.455523, - "anything": -9.652748, - "aoqjman": -10.345895, - "aoxqZoF": -10.345895, - "apache": -9.652748, - "application": -9.247283, - "application/x": -8.959601, - "applications": -9.652748, - "applies": -10.345895, - "apply": -9.247283, - "approach": -10.345895, - "appropriate": -9.247283, - "arbitrarily": -9.652748, - "architecture": -10.345895, - "architecture.": -10.345895, - "archive": -10.345895, - "are": -7.013691, - "area": -9.652748, - "areas": -10.345895, - "arguments=": -6.657016, - "arising": -10.345895, - "armHYZ": -10.345895, - "array": -9.652748, - "article": -8.959601, - "artifact": -10.345895, - "artifactName=": -9.652748, - "as": -6.414070, - "as=": -9.652748, - "asJhp": -10.345895, - "asTSqV": -10.345895, - "asm": -10.345895, - "asmSourceFilesPaths": -9.652748, - "asmx": -10.345895, - "assigned": -9.652748, - "associated": -10.345895, - "associates": -10.345895, - "association": -10.345895, - "assumption": -8.959601, - "async": -9.247283, - "asynchronous": -8.959601, - "asyncronous": -10.345895, - "at": -8.554136, - "attached.": -10.345895, - "attaching": -10.345895, - "attclasses": -10.345895, - "attempt": -10.345895, - "attempts": -10.345895, - "attlist": -8.959601, - "attrib": -7.948000, - "attribute": -9.652748, - "author": -9.247283, - "automatically": -9.247283, - "available": -9.652748, - "available.": -10.345895, - "avoid": -9.652748, - "awesome": -10.345895, - "axOHLu": -10.345895, - "ay": -10.345895, - "ayJ": -10.345895, - "b": -7.512682, - "b/sYwCsPDinSuun": -10.345895, - "bAwq": -10.345895, - "bCXZhMq": -10.345895, - "bD": -10.345895, - "bDR": -10.345895, - "bEiw": -10.345895, - "bEjCJmbCxieBe": -10.345895, - "bKOH": -10.345895, - "bLWClmtuQ": -10.345895, - "bLjdJXkp/dow": -10.345895, - "bLm": -10.345895, - "bLvC": -10.345895, - "bNPFqtBz": -10.345895, - "bNWqLwvMVhEOo/hu": -10.345895, - "bOpVcmp/UqGS": -10.345895, - "bPRp": -10.345895, - "bQSY": -10.345895, - "bRl": -10.345895, - "bSjE": -10.345895, - "bTVkkLBijuc": -10.345895, - "bU": -10.345895, - "bVBXwdgbukndLA": -10.345895, - "bVDWta": -10.345895, - "bW": -10.345895, - "bZ": -10.345895, - "bZRIPzDfFuj": -10.345895, - "backed": -10.345895, - "background": -6.375603, - "backing": -8.148671, - "backpack": -9.652748, - "bak_soldier": -10.345895, - "banned": -10.345895, - "bark.png": -10.345895, - "base": -7.512682, - "base.dll": -8.736457, - "based": -8.043310, - "basic": -10.345895, - "basis": -10.345895, - "bat": -10.345895, - "battleScribeVersion=": -10.345895, - "bbwzGcGAtrhU": -10.345895, - "bc": -10.345895, - "bc8a": -9.652748, - "bcHvSFn/gW": -10.345895, - "bccc": -10.345895, - "bd": -10.345895, - "bdD": -10.345895, - "bdjDRn": -10.345895, - "be": -5.976447, - "beae": -10.345895, - "because": -9.652748, - "become": -10.345895, - "been": -8.399985, - "before": -8.148671, - "behN": -10.345895, - "behaviour=": -5.210097, - "being": -9.247283, - "bel": -9.652748, - "believe": -10.345895, - "below": -8.736457, - "below.": -10.345895, - "benefit": -10.345895, - "between": -7.637845, - "beyond": -10.345895, - "bh": -10.345895, - "bibl": -9.652748, - "biblFull": -9.247283, - "biblStruct": -9.652748, - "bin": -7.637845, - "binary": -9.652748, - "binary_value_": -9.652748, - "binding.": -10.345895, - "bindings": -7.706838, - "bkLrxZWDtoyX": -10.345895, - "bl": -10.345895, - "blKxZvZlbWYOs": -10.345895, - "black": -10.345895, - "blackLetter": -10.345895, - "blackletter": -10.345895, - "blackletterType": -10.345895, - "blank_spr": -10.345895, - "bllzG": -10.345895, - "block": -9.247283, - "blog": -10.345895, - "blue=": -10.345895, - "bmp": -10.345895, - "bnQIqNlXwVynYbSzL": -10.345895, - "bo": -9.247283, - "body": -8.148671, - "bol": -10.345895, - "bold": -7.637845, - "bon": -10.345895, - "book": -8.736457, - "books": -9.247283, - "bool_value_": -9.652748, - "bootstrap=": -10.345895, - "border": -7.167841, - "border=": -7.127019, - "bot": -9.247283, - "both": -8.959601, - "bottom": -6.111789, - "bottom=": -10.345895, - "bottombraced": -10.345895, - "boxed": -10.345895, - "bpDp": -10.345895, - "bq": -10.345895, - "bqeDju": -10.345895, - "br": -9.652748, - "braced": -10.345895, - "bring": -10.345895, - "brings": -10.345895, - "brm": -10.345895, - "broadcast": -9.652748, - "bt": -10.345895, - "btEztdVhytfg": -10.345895, - "btjcrb": -10.345895, - "build": -8.399985, - "buildArtefactType=": -9.652748, - "buildPath=": -9.652748, - "buildProperties=": -9.652748, - "buildSystemId=": -9.652748, - "built": -10.345895, - "builtIn=": -8.959601, - "bus.": -10.345895, - "business": -10.345895, - "but": -8.043310, - "bv": -10.345895, - "bvsxXDBStU": -10.345895, - "bwUbNW": -10.345895, - "by": -7.013691, - "byte": -9.652748, - "c": -6.911908, - "c/AW": -10.345895, - "cCk": -10.345895, - "cCkDERKQaWGBBhEVUGkBVRywCQHRDqDAIOAAwUHCgxG": -10.345895, - "cDKe": -10.345895, - "cDPN": -10.345895, - "cDTYCjcwjYW": -10.345895, - "cEG": -10.345895, - "cEhhoaGpoGBgYamhoaWgOTFeaCSS": -10.345895, - "cEikAlzOTMh": -10.345895, - "cH": -10.345895, - "cIzL": -10.345895, - "cJ": -10.345895, - "cJIxYisgHEatA": -10.345895, - "cKov": -10.345895, - "cL/wB": -10.345895, - "cLbf": -10.345895, - "cMz": -10.345895, - "cOJLfDPsmGFNUL": -10.345895, - "cPugAAAABJRU": -10.345895, - "cQUrnXhXBSui": -10.345895, - "cRoQcROJDYJYmHklxUBoMDcxUyAZVUg": -10.345895, - "cSpyS": -10.345895, - "cVcqlf/": -10.345895, - "cVwZgpTAGA/WRiAYSrLwXf": -10.345895, - "c_gray": -10.345895, - "caI/i": -10.345895, - "cache": -7.706838, - "cache.": -8.736457, - "cached": -9.652748, - "caches": -9.652748, - "calculation": -8.266454, - "calculationFunc": -9.652748, - "call": -8.736457, - "called": -8.736457, - "called.": -10.345895, - "calls.": -9.652748, - "can": -7.512682, - "cannot": -10.345895, - "cap": -10.345895, - "capacity_after_header_": -10.345895, - "capitalize": -6.414070, - "caps": -10.345895, - "case": -6.028407, - "castable": -8.959601, - "casting": -10.345895, - "caused": -10.345895, - "cb": -9.652748, - "cc": -9.652748, - "ccx": -10.345895, - "cd": -9.652748, - "cda": -10.345895, - "cell": -8.736457, - "center": -9.247283, - "centre": -10.345895, - "centric": -10.345895, - "cfa": -10.345895, - "cgksgxBnPhfaPERJZhX": -10.345895, - "chained": -9.652748, - "change": -7.087799, - "change.": -7.860988, - "changed": -7.455523, - "changed.": -8.148671, - "changes": -7.780946, - "changes.": -9.652748, - "char": -7.780946, - "char*": -10.345895, - "character": -10.345895, - "characters": -9.652748, - "charoff": -9.247283, - "checks.": -10.345895, - "chen": -9.652748, - "child": -8.959601, - "choice": -10.345895, - "choices": -9.247283, - "ciABPZvAbNl": -10.345895, - "cia": -9.652748, - "cifuR/Z": -10.345895, - "ciibcwPvF": -10.345895, - "citation": -10.345895, - "clVdZLL": -10.345895, - "clarification": -10.345895, - "class": -7.860988, - "class=": -9.652748, - "classdef=": -10.345895, - "classes": -8.959601, - "classes.": -9.652748, - "classification": -10.345895, - "clean": -10.345895, - "cleanCommand=": -9.652748, - "clear": -9.652748, - "clearsContextBeforeDrawing=": -10.345895, - "client.": -9.652748, - "clu": -10.345895, - "cmpE": -10.345895, - "co": -10.345895, - "coarse": -10.345895, - "code": -8.554136, - "collection": -7.050058, - "collection.": -8.554136, - "collections": -10.345895, - "colname": -9.247283, - "colnum": -10.345895, - "color": -6.454075, - "color=": -6.632323, - "colorSpace=": -10.345895, - "colors=": -10.345895, - "colour.": -10.345895, - "cols": -7.780946, - "colspec": -7.706838, - "column": -8.959601, - "colwidth": -8.266454, - "com": -8.148671, - "combination": -9.652748, - "come": -10.345895, - "command=": -6.657016, - "commercial": -10.345895, - "common": -10.345895, - "communicate": -9.652748, - "community.": -10.345895, - "compare": -10.345895, - "compatVersion=": -10.345895, - "compatible": -10.345895, - "compilation": -10.345895, - "compile": -10.345895, - "compiler": -10.345895, - "complete": -9.247283, - "completes": -8.959601, - "component=": -9.247283, - "compute": -10.345895, - "computer": -10.345895, - "concat": -9.652748, - "concurrent": -8.736457, - "concurrently": -9.652748, - "conditions": -9.247283, - "conf": -10.345895, - "conf=": -9.652748, - "conference": -10.345895, - "config": -10.345895, - "configure": -10.345895, - "configured": -10.345895, - "consectetur": -10.345895, - "consequential": -10.345895, - "consistently": -10.345895, - "constrain": -10.345895, - "constrained": -8.554136, - "constructors": -7.860988, - "contact": -10.345895, - "contain": -10.345895, - "contains": -9.652748, - "content": -8.043310, - "contentMode=": -10.345895, - "contents": -9.247283, - "context=": -8.148671, - "contract": -10.345895, - "contract.": -9.652748, - "contrast": -10.345895, - "contributors": -9.652748, - "control": -10.345895, - "convenient.": -10.345895, - "convention": -9.652748, - "conversion": -10.345895, - "convert": -9.652748, - "copyright": -8.959601, - "core": -10.345895, - "corpus": -9.652748, - "corr": -9.247283, - "corresp": -10.345895, - "corresponding": -9.652748, - "corresponds": -10.345895, - "cost": -9.652748, - "could": -9.652748, - "count": -7.948000, - "count=": -9.652748, - "countTowardsParentMaxPercentage=": -9.652748, - "countTowardsParentMaxPoints=": -9.652748, - "countTowardsParentMaxSelections=": -9.652748, - "countTowardsParentMinPercentage=": -9.652748, - "countTowardsParentMinPoints=": -9.652748, - "countTowardsParentMinSelections=": -9.652748, - "coupled": -9.652748, - "cover": -9.652748, - "cpjPnFcT": -10.345895, - "cpp": -7.948000, - "cq": -10.345895, - "created": -8.959601, - "creating": -8.959601, - "cref=": -10.345895, - "csa": -10.345895, - "csproj": -9.247283, - "csproj_sample": -10.345895, - "cu": -10.345895, - "cuWH": -10.345895, - "cur": -10.345895, - "currencies": -10.345895, - "current": -7.637845, - "currently": -9.247283, - "cursive": -9.247283, - "custom": -8.959601, - "customClass=": -9.652748, - "customization": -8.959601, - "customizations": -9.652748, - "customizations.": -10.345895, - "customize": -10.345895, - "cx/": -10.345895, - "cxx": -10.345895, - "czYrC": -10.345895, - "d": -6.517254, - "d.gml": -8.959601, - "d/": -10.345895, - "d6dde5": -10.345895, - "dABowIYXxg": -10.345895, - "dBHjwHIgsdaSSmA": -10.345895, - "dBU": -10.345895, - "dCLvBpPcHsf": -10.345895, - "dD": -6.790547, - "dEOfKsfPeh": -10.345895, - "dETRQBmoVHnv": -10.345895, - "dGr": -10.345895, - "dIH": -10.345895, - "dJZEgAgX": -10.345895, - "dKuHpm": -10.345895, - "dLMMUHSiSXMEDJBGgRJESRFkBRB": -10.345895, - "dNIsPeWcD/": -10.345895, - "dQ": -10.345895, - "dR": -10.345895, - "dTFte": -10.345895, - "dUSennNZLmI": -10.345895, - "dUWcSgrpv": -10.345895, - "dV": -10.345895, - "dVLhTI": -10.345895, - "dVTfJWDtzwwgByQWEcJucRTE": -10.345895, - "dWcXXEhjUkQXf": -10.345895, - "dWkYceL": -10.345895, - "dX/": -10.345895, - "dZKgOSGzpBQIvsQZhbx": -10.345895, - "d_parent": -10.345895, - "d_particle": -10.345895, - "d_set_projection_simple.gml": -10.345895, - "dabap": -10.345895, - "damage.": -10.345895, - "damages": -10.345895, - "dapibus": -8.554136, - "dashed": -10.345895, - "data": -7.780946, - "datatype": -9.652748, - "date": -10.345895, - "daunting": -10.345895, - "dbkNzCebm": -10.345895, - "ddMhYfHp": -10.345895, - "de": -9.652748, - "deMuHU": -10.345895, - "deRZMRiGRsZymKJdcSlukFTey": -10.345895, - "declare": -9.652748, - "declared": -10.345895, - "decorInit": -10.345895, - "decoration": -8.266454, - "deep": -9.652748, - "def": -10.345895, - "default": -7.948000, - "default.": -9.652748, - "defaultValue=": -9.652748, - "defaults": -10.345895, - "define": -10.345895, - "defined": -9.652748, - "deg": -8.959601, - "degree": -10.345895, - "delay": -9.652748, - "delay.": -9.652748, - "delete": -9.652748, - "delimiter": -7.013691, - "delimiter=": -6.608226, - "dellorus.": -10.345895, - "delta_": -8.399985, - "demexp": -10.345895, - "demote": -10.345895, - "departure": -10.345895, - "dependencies": -10.345895, - "dependency": -10.345895, - "depending": -10.345895, - "depends": -10.345895, - "depersist": -10.345895, - "derive": -10.345895, - "describe": -10.345895, - "describes": -10.345895, - "description": -10.345895, - "description=": -8.959601, - "descriptive": -10.345895, - "descriptor=": -9.247283, - "design": -9.652748, - "designed": -10.345895, - "designer": -10.345895, - "desirable": -10.345895, - "destination=": -10.345895, - "detail_particle.d": -10.345895, - "details": -9.652748, - "determine": -10.345895, - "determined": -10.345895, - "developed": -10.345895, - "developer": -9.652748, - "dfd": -10.345895, - "dgkZWVtUjkZGVt": -10.345895, - "dict_": -9.652748, - "dictate": -10.345895, - "dictionaries": -10.345895, - "dictionary": -10.345895, - "dictum": -10.345895, - "difference": -10.345895, - "differently": -10.345895, - "differing": -10.345895, - "digital": -9.247283, - "digitized": -10.345895, - "diplomatic": -10.345895, - "diqYCduhNy": -10.345895, - "dir": -7.860988, - "direct": -10.345895, - "directly": -10.345895, - "disable": -10.345895, - "disableLights.gml": -10.345895, - "disabled": -10.345895, - "disambiguate": -10.345895, - "disambiguate=": -10.345895, - "discarded.": -8.959601, - "disciplines": -10.345895, - "disclaimed.": -10.345895, - "disclaimer": -10.345895, - "disclaimer.": -10.345895, - "disconnects": -10.345895, - "disk": -10.345895, - "display": -8.554136, - "display=": -10.345895, - "displayName=": -9.652748, - "displaying": -10.345895, - "disposed": -8.959601, - "disposed.": -9.247283, - "distinct": -10.345895, - "distinguish": -7.860988, - "distribution.": -10.345895, - "diversity": -10.345895, - "dj": -10.345895, - "dk": -10.345895, - "dkqq": -10.345895, - "dlg": -10.345895, - "dll=": -9.247283, - "dm/syEuBnIZ/FJk": -10.345895, - "dnHxXz": -10.345895, - "dnZnMhGdDb": -10.345895, - "do": -8.736457, - "doZ": -10.345895, - "document": -10.345895, - "documentation": -10.345895, - "documentation.": -10.345895, - "documents": -10.345895, - "does": -9.652748, - "doesn": -9.652748, - "dolor": -10.345895, - "domain": -9.652748, - "don": -9.652748, - "done": -9.247283, - "dotnet": -10.345895, - "dotted": -9.247283, - "double": -9.652748, - "double_value_": -9.652748, - "doublestrikethrough": -10.345895, - "doubleunderline": -10.345895, - "down": -10.345895, - "download": -10.345895, - "dq": -10.345895, - "dqSxtvv": -10.345895, - "drIyMrY/oOTFScrKioqKioiwhFxcBWFVhQaU": -10.345895, - "draw_set_color": -10.345895, - "draw_text": -10.345895, - "drawing": -10.345895, - "driver": -10.345895, - "dropcap": -10.345895, - "dropping": -10.345895, - "dsSnFfZPDYYbh": -10.345895, - "dt": -10.345895, - "dtOi": -10.345895, - "dtd": -10.345895, - "dtfd": -10.345895, - "dtsp": -10.345895, - "du/WLA": -10.345895, - "dummy": -10.345895, - "duplicate": -9.652748, - "during": -10.345895, - "dvzljzpEHqTINVaFlVVvFtDutIx": -10.345895, - "dw": -10.345895, - "dxto": -10.345895, - "dyLaqz": -10.345895, - "dzOBEHSD": -10.345895, - "dzvgD": -10.345895, - "e": -7.455523, - "e/": -10.345895, - "e/V": -10.345895, - "eAHR": -10.345895, - "eAraFFxrUh": -10.345895, - "eCk": -10.345895, - "eDQwMDDQNDIwKqqisBZbOINKZRJGBZRlY": -10.345895, - "eFK": -10.345895, - "eHFnSwy": -10.345895, - "eHLDuBZ": -10.345895, - "eHlbMe": -10.345895, - "eIyc": -10.345895, - "eJs": -10.345895, - "eMO": -10.345895, - "eMcMZP": -10.345895, - "ePtGvg": -10.345895, - "eSpGDNDAiPZFJmK": -10.345895, - "eTP/inB": -10.345895, - "eVHmVP": -10.345895, - "eWXzeRuTy": -10.345895, - "eXsNb": -10.345895, - "eYZKz": -10.345895, - "eZsl": -10.345895, - "ea": -8.959601, - "each": -8.399985, - "early": -10.345895, - "easier": -10.345895, - "easily": -9.652748, - "easyant": -8.399985, - "ec": -10.345895, - "ecVYf": -10.345895, - "ed": -10.345895, - "edgXgYdwvQAJsbrFvdGUDu/QQYZOXPwj": -10.345895, - "edition": -10.345895, - "editions": -10.345895, - "editor": -10.345895, - "eds": -10.345895, - "edy": -10.345895, - "ee": -10.345895, - "efNeLi": -10.345895, - "efffa": -10.345895, - "efqk": -10.345895, - "ei": -10.345895, - "either": -9.652748, - "ejt": -10.345895, - "el": -10.345895, - "element": -8.959601, - "elements": -8.399985, - "elit": -10.345895, - "else": -8.736457, - "em": -8.554136, - "empty": -8.959601, - "en": -8.148671, - "enable": -10.345895, - "enableLights.gml": -10.345895, - "enabled": -8.043310, - "enabled.": -10.345895, - "enabled=": -5.517581, - "encoded": -8.399985, - "encoders": -10.345895, - "encoding": -9.247283, - "encoding.": -9.247283, - "encoding=": -6.041830, - "encountered": -10.345895, - "encyclopedia": -9.652748, - "endeavor.": -10.345895, - "engine": -10.345895, - "enormous": -10.345895, - "enough": -10.345895, - "enough.": -10.345895, - "enrich": -10.345895, - "enrollments.": -10.345895, - "ensure": -9.247283, - "ensuring": -9.652748, - "ent": -6.414070, - "enter": -9.652748, - "entire": -10.345895, - "entity": -10.345895, - "entries": -9.652748, - "entry": -7.948000, - "enumb=": -8.736457, - "environment": -10.345895, - "environment.": -10.345895, - "eoC": -10.345895, - "eogWeP": -10.345895, - "epigraphic": -10.345895, - "eq": -9.652748, - "eqWLuUbZ": -10.345895, - "eqdlq": -10.345895, - "equal": -9.652748, - "equivalent": -9.247283, - "equivalently": -10.345895, - "eschewing": -10.345895, - "especially": -10.345895, - "et": -6.561706, - "eu": -10.345895, - "ev": -10.345895, - "evaluate": -10.345895, - "evaluated": -10.345895, - "even": -10.345895, - "event": -10.345895, - "events.": -9.652748, - "eventtype=": -8.736457, - "everybody": -10.345895, - "evicted": -9.652748, - "ewJhR/D": -10.345895, - "examining": -10.345895, - "example": -9.247283, - "exbix": -10.345895, - "except": -10.345895, - "exchanged.": -10.345895, - "execution": -10.345895, - "exemplary": -10.345895, - "exist": -8.736457, - "existing": -8.959601, - "exists": -7.860988, - "expan": -8.959601, - "expected": -10.345895, - "expensive": -9.652748, - "explainText=": -10.345895, - "explicit": -10.345895, - "explicitly": -10.345895, - "exposes": -10.345895, - "express": -10.345895, - "expression": -9.247283, - "expression.": -10.345895, - "expressive": -10.345895, - "extended": -10.345895, - "extensible.": -10.345895, - "extension": -8.399985, - "extensionOf=": -10.345895, - "extensive": -10.345895, - "extraordinary": -10.345895, - "extremely": -10.345895, - "eyk": -10.345895, - "ezLnBQLMkkgNWR": -10.345895, - "ezdlQvVNUrCJS": -10.345895, - "f": -9.652748, - "f.HasAttribute": -10.345895, - "f.Name": -10.345895, - "f.ParentType.DeriveFrom": -10.345895, - "fa8739": -7.706838, - "facebook": -10.345895, - "facilitates": -10.345895, - "facsimile": -10.345895, - "fail.": -10.345895, - "fake": -8.959601, - "faking": -8.959601, - "false": -7.301373, - "family": -7.637845, - "fantasy": -10.345895, - "far": -9.652748, - "fashion.": -10.345895, - "faster": -9.652748, - "features": -10.345895, - "feel": -10.345895, - "felis": -9.247283, - "fern.d": -10.345895, - "fern.png": -10.345895, - "fetch": -10.345895, - "feugiat": -8.736457, - "few": -10.345895, - "fff": -8.736457, - "ffffff": -10.345895, - "field": -8.043310, - "field.": -10.345895, - "field=": -10.345895, - "file": -8.399985, - "file.": -10.345895, - "filePath": -9.652748, - "filePath.ToString": -10.345895, - "filePath=": -6.657016, - "filePathLower": -10.345895, - "filePathLower.Contains": -10.345895, - "filePathLower.EndsWithAny": -10.345895, - "filename=": -7.573306, - "files": -9.652748, - "filled": -10.345895, - "filters": -10.345895, - "find_height.gml": -10.345895, - "finishes.": -10.345895, - "fire": -7.948000, - "fire.d": -10.345895, - "fire_": -10.345895, - "firehay.d": -10.345895, - "fires": -8.554136, - "firewood": -10.345895, - "firewood.d": -10.345895, - "firewood.png": -10.345895, - "first": -5.963869, - "fitness": -10.345895, - "five": -10.345895, - "fixed": -10.345895, - "flOQo": -10.345895, - "flags=": -9.652748, - "flat": -10.345895, - "flattened": -9.652748, - "flexibility": -10.345895, - "flexibleMaxX=": -10.345895, - "flexibleMaxY=": -10.345895, - "flight": -9.652748, - "float": -9.247283, - "floral": -9.652748, - "flying_fuzzy.png": -10.345895, - "focusIndex=": -10.345895, - "focuses": -10.345895, - "focusing": -10.345895, - "folder": -10.345895, - "follow": -10.345895, - "followed": -10.345895, - "following": -8.736457, - "font": -5.575211, - "foot": -10.345895, - "for": -5.824107, - "forTests=": -10.345895, - "form": -9.247283, - "form=": -6.171508, - "formally": -10.345895, - "format": -8.959601, - "format=": -6.944698, - "formats": -10.345895, - "forms": -9.652748, - "found.": -10.345895, - "fps": -10.345895, - "framework": -10.345895, - "framework.": -10.345895, - "free": -9.652748, - "friendlier": -10.345895, - "from": -7.087799, - "frustum_culling.gml": -10.345895, - "frustum_culling_init.gml": -10.345895, - "fsproj": -10.345895, - "fsproj_sample": -9.652748, - "fsproj_sample.XML": -9.652748, - "full": -8.399985, - "fully": -9.247283, - "function": -7.706838, - "function.": -8.554136, - "function=": -10.345895, - "functx": -9.652748, - "furniture": -9.652748, - "further": -9.652748, - "future": -9.652748, - "fx": -9.652748, - "fxml": -10.345895, - "g": -7.780946, - "g/qcELLFPuOG": -10.345895, - "gAQRbCyADx": -10.345895, - "gBeWvCOlJdQ": -10.345895, - "gJ": -10.345895, - "gJR": -10.345895, - "gJsOyi": -10.345895, - "gJvgXzjufU": -10.345895, - "gK": -10.345895, - "gKAc": -10.345895, - "gKBTs": -10.345895, - "gLcIvGtBr/Efr": -10.345895, - "gLk": -10.345895, - "gNggJuQQknMFqXFLyCF": -10.345895, - "gOQNdCby": -10.345895, - "gORHHCSD": -10.345895, - "gOcj/M": -10.345895, - "gOo": -10.345895, - "gSQ": -10.345895, - "gStr": -10.345895, - "gTXyLisFvzcgoNjXY": -10.345895, - "gUOxSHbKs": -10.345895, - "gVQZRpeBiuro": -10.345895, - "gXyTF": -10.345895, - "gXzwynIh": -10.345895, - "gYOC": -10.345895, - "gYRdjGR": -10.345895, - "gaGhqaGgYGGpoaBgaGBvbASSmpTgVRFWCpAZFiYMkGkRxgsKDAIGBBgMGRd": -10.345895, - "gaq": -10.345895, - "gbcNHPLET": -10.345895, - "gbdoHLh": -10.345895, - "gcc": -8.043310, - "geAlGBmEBM": -10.345895, - "generally": -9.652748, - "generate": -10.345895, - "generated": -9.652748, - "generation": -9.652748, - "generic": -9.247283, - "genre": -10.345895, - "geography": -10.345895, - "geometry": -10.345895, - "getEffectTexture.gml": -10.345895, - "getEffectTextureAlpha.gml": -10.345895, - "getLightId.gml": -10.345895, - "getTexture.gml": -10.345895, - "gets": -10.345895, - "gfLYisADEpQE": -10.345895, - "ghRM/wHEaAExgRusPml": -10.345895, - "ghyJjzac": -10.345895, - "gif": -10.345895, - "give": -10.345895, - "given": -7.706838, - "givenname": -10.345895, - "gkG": -10.345895, - "glPrxXEmtGXYjdvOL": -10.345895, - "global": -10.345895, - "global._GMO_DEVICE_NAME": -10.345895, - "global._GMO_DLL_VERSION": -10.345895, - "gm": -10.345895, - "gml": -8.399985, - "gnHe": -10.345895, - "gnZO": -10.345895, - "gnkuXAgMcajhSEjMht": -10.345895, - "go": -9.652748, - "goals": -10.345895, - "going": -8.959601, - "goods": -10.345895, - "google": -9.652748, - "gothic": -10.345895, - "gp": -10.345895, - "gprp": -10.345895, - "gq": -10.345895, - "gr": -10.345895, - "grantshubsupport@cabinetoffice.gov.uk": -10.345895, - "graphic": -10.345895, - "grass_hires.png": -10.345895, - "gray": -8.959601, - "green=": -10.345895, - "gro": -10.345895, - "gt": -7.210401, - "gtOv/": -10.345895, - "gtZoVnT/": -10.345895, - "guarantees": -8.554136, - "gwx": -10.345895, - "gxKCI": -10.345895, - "gxyexwkSNtnJ": -10.345895, - "h": -8.266454, - "hACgcdUQb": -10.345895, - "hBB": -10.345895, - "hBW": -10.345895, - "hCNtmwyOzKnII": -10.345895, - "hCnKggEuMlAkjovmDtMrIRKfK": -10.345895, - "hEYpGVSCwSOYmsPVnZTF": -10.345895, - "hF": -10.345895, - "hFEgzV": -10.345895, - "hFiLCTqEUBzj": -10.345895, - "hGdRf/Az": -10.345895, - "hGjpmujN": -10.345895, - "hH": -10.345895, - "hHGEmDrXJaJlrQ": -10.345895, - "hLiKvQo/x": -10.345895, - "hMProfnAk": -10.345895, - "hNubMGfZkgAZq": -10.345895, - "hOxDNDqIZ": -10.345895, - "hPXfsJpR": -10.345895, - "hQiRqPNEe/sbLvX": -10.345895, - "hR": -10.345895, - "hRmHuDNJL/fsgNr": -10.345895, - "hXRNJg/FVLrj/G": -10.345895, - "hZDHBNEJqHKM": -10.345895, - "hamburger=": -10.345895, - "hanging": -10.345895, - "has": -7.301373, - "hasellus": -10.345895, - "have": -7.254853, - "having": -10.345895, - "hay.png": -10.345895, - "hbbA": -10.345895, - "hbhwSJi": -10.345895, - "hbt": -10.345895, - "hd": -10.345895, - "hdHYkpjrbGPOzk": -10.345895, - "head": -8.148671, - "header": -8.554136, - "header=": -10.345895, - "header_": -9.652748, - "header_size_": -9.652748, - "headers": -10.345895, - "height": -7.706838, - "height=": -8.959601, - "height_": -10.345895, - "hello": -10.345895, - "help": -10.345895, - "help.rtf": -10.345895, - "helper": -8.736457, - "helps": -10.345895, - "here": -9.652748, - "here.": -9.652748, - "heuristically": -10.345895, - "hfhTm": -10.345895, - "hgXx": -10.345895, - "hgfezwvcR": -10.345895, - "hh": -10.345895, - "hhsTlIFkLQgjIHkd": -10.345895, - "high": -10.345895, - "highly": -10.345895, - "hjAKkjOFLt": -10.345895, - "hkn": -10.345895, - "hl7": -10.345895, - "hlCCPFfN": -10.345895, - "hm": -10.345895, - "hmUvNVOD": -10.345895, - "hmZ": -10.345895, - "hoCt": -10.345895, - "holder": -10.345895, - "holders": -10.345895, - "holobloc": -10.345895, - "home": -10.345895, - "hood": -10.345895, - "how": -9.652748, - "however": -9.247283, - "hpj": -10.345895, - "hpp": -10.345895, - "hqq": -10.345895, - "hr": -10.345895, - "href": -9.247283, - "href=": -7.013691, - "hs": -10.345895, - "ht": -10.345895, - "html": -8.148671, - "http": -7.013691, - "https": -9.652748, - "hufc": -10.345895, - "human": -9.652748, - "humanities": -10.345895, - "hundreds": -9.652748, - "hwL": -10.345895, - "hxx": -10.345895, - "hyLOKh": -10.345895, - "hyphen": -10.345895, - "i": -8.043310, - "i.e.": -7.210401, - "i/": -10.345895, - "i//": -10.345895, - "iAj": -10.345895, - "iBSDSDaw": -10.345895, - "iD": -10.345895, - "iEENEMEziIPMoooJHsGkSiMEHwCUpHgPRBGnQlcpcglY": -10.345895, - "iFiFSoMoG": -10.345895, - "iHZ": -10.345895, - "iIdIYMGkvktSDLM": -10.345895, - "iIfguA": -10.345895, - "iIqCZl": -10.345895, - "iJ": -10.345895, - "iJc": -10.345895, - "iKKUUG": -10.345895, - "iKqBHSaNNuW": -10.345895, - "iLcrZVmI": -10.345895, - "iOSBSAiI": -10.345895, - "iP": -10.345895, - "iQIqkBiYXIM": -10.345895, - "iRNV": -10.345895, - "iRx/T": -10.345895, - "iTOQFMzsMROMAcKSU": -10.345895, - "iUyWRK": -10.345895, - "iVBORw": -6.944698, - "iVyA": -10.345895, - "iWAqN": -10.345895, - "iXMGkVaTOh": -10.345895, - "iYCQ/Wz": -10.345895, - "iYPD//rVZ/GsiszWS": -10.345895, - "ia": -10.345895, - "ici": -10.345895, - "ico": -9.652748, - "id": -6.474694, - "id=": -4.925360, - "ideas": -10.345895, - "ident=": -4.865256, - "identical": -7.948000, - "identifier=": -9.652748, - "idl": -10.345895, - "ie": -10.345895, - "ies": -10.345895, - "if": -6.880159, - "ifXrUnXAoBo/RePsBmbc": -10.345895, - "ignored.": -10.345895, - "igpN": -10.345895, - "iiyP": -10.345895, - "ijs": -10.345895, - "ikO": -10.345895, - "ilGQmBabYvf": -10.345895, - "image": -10.345895, - "img": -9.652748, - "immediately": -9.247283, - "impaYVg": -10.345895, - "imperdiet": -10.345895, - "imperdiet.": -8.736457, - "impl_.body_": -8.959601, - "implement": -8.736457, - "implementing": -9.652748, - "implements": -8.266454, - "implied": -9.652748, - "important": -8.554136, - "imr": -10.345895, - "in": -5.781547, - "inCamera.gml": -10.345895, - "inc": -10.345895, - "incidental": -10.345895, - "include": -10.345895, - "including": -8.959601, - "incorrectly": -10.345895, - "indent": -10.345895, - "indicates": -10.345895, - "indirect": -10.345895, - "information": -10.345895, - "infrastructure": -10.345895, - "inherit": -9.652748, - "inheritsScope=": -10.345895, - "inheritsSet=": -10.345895, - "init": -9.652748, - "initLights.gml": -10.345895, - "initial": -7.013691, - "initialize": -9.247283, - "initialize=": -9.652748, - "initialized": -9.652748, - "initio": -10.345895, - "inl": -10.345895, - "inline": -9.652748, - "input": -9.652748, - "inside": -8.736457, - "instance": -8.554136, - "instanceId=": -8.959601, - "instead": -9.652748, - "int": -8.736457, - "int_value_": -9.652748, - "integer": -9.247283, - "integration.": -10.345895, - "intend": -10.345895, - "intended": -8.554136, - "intends": -10.345895, - "interface": -8.736457, - "internal": -10.345895, - "interoperability": -10.345895, - "interoperability.": -10.345895, - "interruption": -10.345895, - "interview": -10.345895, - "into": -8.736457, - "introductory": -10.345895, - "invoke": -8.959601, - "io": -10.345895, - "ipb": -10.345895, - "ipsum": -10.345895, - "irrelevant.": -10.345895, - "is": -5.308943, - "isTestSource=": -9.652748, - "isVZQ": -10.345895, - "issue": -9.652748, - "it": -6.911908, - "it.": -10.345895, - "itEsskgrxDVPRILeAXFl": -10.345895, - "itFzpEPXkhjb": -10.345895, - "itIs": -10.345895, - "ital": -10.345895, - "italic": -6.734977, - "italics": -10.345895, - "itbfhQCPbC": -10.345895, - "item": -7.401456, - "item.": -9.247283, - "items": -7.050058, - "its": -8.399985, - "itself": -9.652748, - "ixsxVCR": -10.345895, - "izFhgopAVMdnttHcq": -10.345895, - "izGTLxFiBZOWR": -10.345895, - "j": -7.706838, - "j/INJbGZFfSy": -10.345895, - "jABzF": -10.345895, - "jCfI": -10.345895, - "jCm": -10.345895, - "jCnpwduAPZMvaCz": -10.345895, - "jEOxvx": -10.345895, - "jFMAiKb": -10.345895, - "jFmrGFBMPDk": -10.345895, - "jKdWQEqB": -10.345895, - "jNsBJyAhCyh": -10.345895, - "jO": -9.652748, - "jOL": -10.345895, - "jPwzYlj": -10.345895, - "jQBDtp": -10.345895, - "jQyOTuLcaiNO": -10.345895, - "jTUTu": -10.345895, - "jUBDsJwQGmhoaGpoWBhoGhgYGGp": -10.345895, - "jVZuqtJtW": -10.345895, - "jVrBa": -10.345895, - "jW": -10.345895, - "jWCZK": -10.345895, - "jWqnhRT": -10.345895, - "jYEIVdvQc": -10.345895, - "jYWUxHS": -10.345895, - "jZNiMqJJWVyt": -10.345895, - "janmPczUK": -10.345895, - "java": -9.652748, - "javafx": -8.959601, - "jbXuQNvAXFLFpzAmJ": -10.345895, - "jcI": -10.345895, - "jdwPuATYmXfuUh": -10.345895, - "jeJgqoygWaekkQxbQOKOpnV": -10.345895, - "jenitennison": -10.345895, - "jfRvPET/": -10.345895, - "jg": -10.345895, - "jiW": -10.345895, - "jj": -10.345895, - "jjtmQvepmgE": -10.345895, - "jkDPNdf": -10.345895, - "jkMRwPARx": -10.345895, - "jki": -10.345895, - "jl": -10.345895, - "jlC": -10.345895, - "jlGoXmA": -10.345895, - "jn": -10.345895, - "join": -10.345895, - "journal": -10.345895, - "jpe": -10.345895, - "jpeg": -10.345895, - "jpg": -10.345895, - "jpgok": -10.345895, - "jqLqOZUABlFViZ": -10.345895, - "jtWtWAWSBwWmVBG": -10.345895, - "juL": -10.345895, - "jupMo": -10.345895, - "just": -10.345895, - "jvJWBrlVQSHWaIv": -10.345895, - "jvTWkt": -10.345895, - "jw/": -10.345895, - "jyk": -10.345895, - "jzlQTFRN": -10.345895, - "k": -8.043310, - "kAzhuUeg": -10.345895, - "kBsBRznisUr": -10.345895, - "kCiHfm/": -10.345895, - "kDBmaOqczXoXgTz": -10.345895, - "kES": -10.345895, - "kFNlUBAQKQaRHBDJBpEcELDggMGBBQELSqbvza": -10.345895, - "kFovYp": -10.345895, - "kHrNL": -10.345895, - "kHxtHdYFCrvY": -10.345895, - "kKSw/ufSTdWakwceU": -10.345895, - "kL": -10.345895, - "kLJV": -10.345895, - "kMicrosecondsPerDay": -10.345895, - "kMicrosecondsPerHour": -10.345895, - "kMicrosecondsPerMillisecond": -10.345895, - "kMicrosecondsPerMinute": -10.345895, - "kMicrosecondsPerSecond": -10.345895, - "kN": -10.345895, - "kNAhVXLyYRIk": -10.345895, - "kOKvzMRmPhiRYF": -10.345895, - "kQ": -9.652748, - "kQM": -10.345895, - "kSvJGSvgTNN": -10.345895, - "kSyvA": -10.345895, - "kU": -10.345895, - "kXQWWLZmS": -10.345895, - "kXhXBjGP": -10.345895, - "kY": -10.345895, - "kYkIJ": -10.345895, - "kZ": -10.345895, - "kZOzF": -10.345895, - "kbexcB/AEhbiVW/ps": -10.345895, - "kc": -10.345895, - "kcO": -10.345895, - "kdBaoozyqKfnc": -10.345895, - "keep": -10.345895, - "keepEnvironmentInBuildfile=": -9.652748, - "key": -7.455523, - "key=": -6.338562, - "keyboard": -10.345895, - "keyboard_check_direct": -9.652748, - "keyword.": -9.652748, - "kghGyBgpzbVujW": -10.345895, - "kgqc": -10.345895, - "kijXbzIc": -10.345895, - "kimU": -10.345895, - "kind=": -8.554136, - "kinds": -10.345895, - "kirTZ": -10.345895, - "kj": -10.345895, - "kjvNgDwAErjxuj": -10.345895, - "kkqzhHnBjSmbROKYEbGWGEeado": -10.345895, - "kl": -10.345895, - "kmQEcgoTXRedObsY": -10.345895, - "knnkBYSnEADRwKS": -10.345895, - "koXabRrOTvvN": -10.345895, - "kq": -10.345895, - "kqvhICCph": -10.345895, - "krCRZCQXDiY": -10.345895, - "ksEB": -10.345895, - "ksWFrFIgWEcixhHAVXq": -10.345895, - "kt/": -10.345895, - "ktlH": -10.345895, - "kuYZVSOcdF": -10.345895, - "kvFNwPai": -10.345895, - "kvFTSSvIGnsQjiqTSIN": -10.345895, - "kxyKQEDqPERwBiPs/qvBZzU/tqaTmqNUUvNge": -10.345895, - "kyz": -10.345895, - "l": -10.345895, - "lEI": -10.345895, - "lFpSTpWMx": -10.345895, - "lIoAAAAASUVORK": -10.345895, - "label": -8.554136, - "label=": -9.652748, - "lang": -9.247283, - "language": -9.652748, - "language=": -9.652748, - "laoreet.": -8.399985, - "large": -10.345895, - "largely": -10.345895, - "larger": -9.652748, - "last": -7.455523, - "layout": -10.345895, - "layoutMaster": -10.345895, - "leak": -9.652748, - "learned": -10.345895, - "leave": -8.043310, - "leaves.png": -10.345895, - "left": -6.584695, - "left=": -10.345895, - "leftbraced": -10.345895, - "legal_case": -10.345895, - "legislation": -10.345895, - "lengthdir_all_": -10.345895, - "lengthdir_x_": -10.345895, - "lengthdir_y_": -10.345895, - "lengthdir_z_": -10.345895, - "lengthdr": -10.345895, - "lessons": -10.345895, - "let": -9.247283, - "letter": -10.345895, - "letterspace": -10.345895, - "level": -9.247283, - "level=": -10.345895, - "liability": -9.652748, - "liable": -10.345895, - "liberty": -10.345895, - "licence": -9.652748, - "licences.": -10.345895, - "license=": -10.345895, - "licensed": -9.652748, - "life": -10.345895, - "like": -8.959601, - "limit": -8.736457, - "limited": -8.959601, - "line": -7.512682, - "line=": -7.573306, - "line_col.gml": -10.345895, - "linguistic": -9.652748, - "lining": -10.345895, - "lining.": -10.345895, - "list": -8.959601, - "list.": -9.652748, - "list_": -9.652748, - "listed": -10.345895, - "listen": -8.554136, - "lists": -10.345895, - "literature": -10.345895, - "loadModels.gml": -10.345895, - "loadTextures.gml": -10.345895, - "loadable": -10.345895, - "loaded": -9.247283, - "loader/saver": -10.345895, - "log": -9.652748, - "logger": -9.652748, - "logo": -9.652748, - "long": -9.652748, - "loosely": -9.652748, - "lorem": -8.399985, - "loss": -10.345895, - "love": -10.345895, - "low": -10.345895, - "ls": -10.345895, - "lsCisjMp": -10.345895, - "lt": -8.399985, - "m": -6.762376, - "m.HasAttribute": -10.345895, - "m.NbLinesOfCode": -10.345895, - "m.SourceDecls.First": -10.345895, - "m.SourceFileDeclAvailable": -10.345895, - "m/dYWSjAjmMqP": -10.345895, - "mCBQ": -10.345895, - "mDcvV": -10.345895, - "mDsBLacCLfUeY": -10.345895, - "mF": -10.345895, - "mHASIhbAb": -10.345895, - "mIs": -10.345895, - "mLhXm": -10.345895, - "mLlW": -10.345895, - "mMmt": -10.345895, - "mNOAqbTRv": -10.345895, - "mNgGAWjYBSMglEwCkbBSAcACBAAAb": -9.652748, - "mNgGKpgztI": -10.345895, - "mOrGkCBIUIROEIEiKICmCpAiSTiAqJhAT/Rfevu/BwUZGlv": -10.345895, - "mPFFyvT": -10.345895, - "mPJmBxKwbv/Wf": -10.345895, - "mQpkOVaxjNFzLdEXjiAtYtylP": -10.345895, - "mRVjMZW": -10.345895, - "mRcVUPgpoAiK": -10.345895, - "mRjuDIAwYKcvUALAHhK": -10.345895, - "mTjRczSuoEKunY": -10.345895, - "mUjltWl": -10.345895, - "mVEhkMuWYdVeZGQTrtCZTDqz": -10.345895, - "mVq": -10.345895, - "mWvkr": -10.345895, - "mXe": -10.345895, - "mYsgC": -10.345895, - "mYsgFDzUcpODGN": -10.345895, - "mZw": -10.345895, - "machine": -10.345895, - "macro=": -5.369161, - "made": -9.652748, - "magazine": -10.345895, - "maintain": -10.345895, - "maintained": -10.345895, - "major": -10.345895, - "majors": -10.345895, - "make": -8.959601, - "making": -9.247283, - "manage": -10.345895, - "managed": -10.345895, - "managedBuildOn=": -9.652748, - "manipulating": -10.345895, - "manually": -8.959601, - "manuscript": -9.652748, - "many": -8.959601, - "mapping": -10.345895, - "maps": -10.345895, - "maqdQg": -10.345895, - "marg1": -10.345895, - "marg2": -10.345895, - "marg4": -10.345895, - "margin": -9.652748, - "markup": -10.345895, - "martin@refme.com": -10.345895, - "master": -10.345895, - "match=": -5.903244, - "matches": -10.345895, - "material": -10.345895, - "materials": -10.345895, - "mathematical": -9.652748, - "maxConcurrent": -10.345895, - "maxHeight=": -10.345895, - "maxOccurs=": -10.345895, - "maxPercentage=": -9.652748, - "maxPoints=": -9.652748, - "maxSelections=": -9.652748, - "maxWidth=": -10.345895, - "maximum": -9.652748, - "may": -8.959601, - "mbQdVV": -10.345895, - "mcaB": -10.345895, - "me": -9.652748, - "mean": -10.345895, - "means": -10.345895, - "media": -10.345895, - "meeting": -10.345895, - "meets": -10.345895, - "memoization": -9.652748, - "memoized": -10.345895, - "memoizes": -9.652748, - "memoizing": -9.652748, - "merchantability": -10.345895, - "message": -6.944698, - "message.": -10.345895, - "messages": -7.254853, - "met": -10.345895, - "method": -6.819535, - "method.": -9.652748, - "methods.": -9.652748, - "metus": -8.399985, - "mf": -10.345895, - "mfE": -10.345895, - "mfcribbon": -10.345895, - "mfmtmVPvDj": -10.345895, - "microsoft": -9.247283, - "microsoft.net.object.binary.base": -9.652748, - "microsoft.net.object.bytearray.base": -10.345895, - "microsoft.net.object.soap.base": -10.345895, - "middle": -8.554136, - "mime": -9.652748, - "mimetype": -8.554136, - "mimetype.": -10.345895, - "mimetype=": -9.652748, - "min": -7.637845, - "minHeight=": -10.345895, - "minOccurs=": -9.247283, - "minPercentage=": -9.652748, - "minPoints=": -9.652748, - "minRequiredRevision=": -10.345895, - "minSelections=": -9.652748, - "minWidth=": -9.652748, - "mirror": -10.345895, - "misassigned": -10.345895, - "mix": -9.247283, - "mjYCSq": -10.345895, - "mjml": -10.345895, - "mk": -8.736457, - "mk/Ju/": -10.345895, - "mmEup": -10.345895, - "mml": -10.345895, - "mnemonicParsing=": -10.345895, - "mock": -8.959601, - "mod_to_triList.gml": -10.345895, - "mode": -9.247283, - "mode=": -5.270721, - "model": -10.345895, - "modelclasses": -10.345895, - "modern": -9.247283, - "modes": -10.345895, - "modification": -10.345895, - "modifications": -10.345895, - "modify": -8.554136, - "module": -9.247283, - "module.": -10.345895, - "module.ant": -10.345895, - "module.ivy": -10.345895, - "module=": -8.736457, - "moduleId=": -7.706838, - "modules": -9.652748, - "monitor": -10.345895, - "monospace": -10.345895, - "morNcfuQpOwP": -10.345895, - "more": -7.455523, - "mostly": -10.345895, - "motion_picture": -8.959601, - "move": -10.345895, - "ms": -10.345895, - "msdata": -8.148671, - "mt": -10.345895, - "mtpvCfXPqb": -10.345895, - "mulberrytech": -9.652748, - "multiple": -8.554136, - "mus.": -9.652748, - "must": -8.148671, - "mvJ": -10.345895, - "mvudofkgCyIzxffiNrPw": -10.345895, - "mwStcxoPbkVQwvqsc": -10.345895, - "mxGwTR": -10.345895, - "mxfN": -10.345895, - "my": -9.247283, - "myapp": -10.345895, - "myzJZL": -10.345895, - "n": -7.455523, - "nASOA": -10.345895, - "nDJzCqtxgXfltp": -10.345895, - "nDe": -10.345895, - "nDl": -10.345895, - "nE": -10.345895, - "nFZK": -10.345895, - "nHk": -10.345895, - "nIoLz": -10.345895, - "nJtAuozQTDSFBnYc/EmgEBAyoxJnjITbn": -10.345895, - "nLsCvvBvYXPk": -10.345895, - "nOHLwO": -10.345895, - "nOptV": -10.345895, - "nOqG": -10.345895, - "nPgJu": -10.345895, - "nQv": -10.345895, - "nUNqOwhmGBOLoAQP": -10.345895, - "nVFIRWFrikloiwVhVQUuqLQioWuOBGxIuLE/gvfve": -10.345895, - "nVqbQf": -10.345895, - "nW": -10.345895, - "nXLgCAQzfoSKInurCvZLpJ": -10.345895, - "nYx": -10.345895, - "nZLn": -10.345895, - "nZqvYeuJG": -10.345895, - "name": -7.087799, - "name.": -10.345895, - "name/value": -10.345895, - "name=": -3.957334, - "named": -9.247283, - "nameend": -9.652748, - "namespace": -8.043310, - "namespace=": -9.652748, - "namest": -9.247283, - "naming": -10.345895, - "nbX": -10.345895, - "ncSFFESoQkcuSdbZyv": -10.345895, - "ncl": -9.652748, - "nd": -10.345895, - "ndNa": -10.345895, - "ne": -10.345895, - "nec": -10.345895, - "necessary": -10.345895, - "need": -7.706838, - "needed": -10.345895, - "needs": -9.652748, - "negligence": -10.345895, - "neither": -9.247283, - "net": -8.959601, - "netcore": -10.345895, - "netstandardapp": -10.345895, - "neutral": -8.959601, - "never": -8.736457, - "new": -7.780946, - "newLayoutMaster": -9.652748, - "newly": -9.652748, - "newsletter": -10.345895, - "newspaper": -10.345895, - "next": -10.345895, - "nimus": -9.652748, - "nivBN": -10.345895, - "nkL": -10.345895, - "nlRFQJAPW": -10.345895, - "nnKeQb": -10.345895, - "nnSFhgzOAZLqOZ": -10.345895, - "no": -8.148671, - "node_modules": -10.345895, - "noeNhfo": -10.345895, - "non": -9.652748, - "none": -9.247283, - "noon": -10.345895, - "nor": -9.247283, - "normal": -8.043310, - "normalize": -8.959601, - "normally": -8.554136, - "normalstyle": -10.345895, - "normalweight": -10.345895, - "not": -6.944698, - "notation": -10.345895, - "nothing": -10.345895, - "notice": -9.652748, - "notification": -8.554136, - "notification.": -9.652748, - "notifications": -7.254853, - "notifications.": -8.736457, - "notify": -9.247283, - "notmycode": -9.652748, - "np": -10.345895, - "nproj": -10.345895, - "nproj_sample": -9.652748, - "nr/CmVZNk": -10.345895, - "nrcV": -10.345895, - "ns": -8.148671, - "nsJd": -10.345895, - "nu": -10.345895, - "nuget": -10.345895, - "null": -8.399985, - "null.": -8.043310, - "nulla": -8.554136, - "number": -7.860988, - "number=": -8.399985, - "nvfB": -10.345895, - "nvzEiH": -10.345895, - "nvza": -10.345895, - "nx": -10.345895, - "nxGn": -10.345895, - "nzebg": -10.345895, - "o": -7.401456, - "oButj": -10.345895, - "oC": -10.345895, - "oDDQNLDQMDTQMDDQNDAyqogOVUlApB": -10.345895, - "oKM": -10.345895, - "oMEiFNNw": -10.345895, - "oMI": -10.345895, - "oNPYWvn": -10.345895, - "oQtb": -10.345895, - "oS": -10.345895, - "oT": -10.345895, - "oUPCRb": -10.345895, - "oYNQKb": -10.345895, - "oYnWJOEgKAR": -10.345895, - "oasis": -10.345895, - "obj": -9.247283, - "obj_": -9.652748, - "obj_bench": -10.345895, - "obj_camera": -10.345895, - "obj_camera.pitch": -10.345895, - "obj_camera.roll": -10.345895, - "obj_camera.x": -10.345895, - "obj_camera.y": -10.345895, - "obj_camera.yaw": -10.345895, - "obj_control": -10.345895, - "obj_fern": -10.345895, - "obj_fire": -10.345895, - "obj_fire_particle_emitter": -10.345895, - "obj_fuzzies": -10.345895, - "obj_game_init": -10.345895, - "obj_grass": -10.345895, - "obj_house": -10.345895, - "obj_lantern": -10.345895, - "obj_master_outside_night": -10.345895, - "obj_player": -10.345895, - "obj_player_eyes": -10.345895, - "obj_sky": -10.345895, - "obj_soldier": -10.345895, - "obj_tree": -10.345895, - "obj_woodstack": -10.345895, - "object": -6.495748, - "object.": -8.959601, - "objects": -7.087799, - "obmGePC": -10.345895, - "observe": -7.860988, - "observed": -10.345895, - "odl": -10.345895, - "of": -5.369161, - "offer": -9.652748, - "often": -9.247283, - "og": -10.345895, - "ogDWLJADAxmxSbCKVlXsZlUFh": -10.345895, - "ogO": -10.345895, - "oi": -10.345895, - "oi/aMR": -10.345895, - "ojuXnrUFOKwHgOG": -10.345895, - "okay": -8.736457, - "okkRiCdGPIF": -10.345895, - "oknEE": -10.345895, - "okyrolgPYAAAAASUVORK": -10.345895, - "old": -10.345895, - "on": -6.608226, - "on.": -8.554136, - "onChanged": -9.652748, - "onCreateOnly": -10.345895, - "onRelease": -10.345895, - "once": -8.959601, - "one": -6.880159, - "one.": -10.345895, - "ones": -9.652748, - "only": -7.350163, - "only.": -10.345895, - "onto": -10.345895, - "ontologies": -10.345895, - "ooEPB": -10.345895, - "op": -10.345895, - "opaque=": -10.345895, - "opengis": -9.652748, - "operation": -9.652748, - "operation.": -10.345895, - "operations": -8.554136, - "optional": -9.652748, - "optionally": -9.652748, - "optionnal": -10.345895, - "options": -9.652748, - "or": -5.891548, - "ord": -9.652748, - "order": -7.706838, - "org": -7.573306, - "org=": -9.652748, - "organisation=": -8.736457, - "orig": -9.247283, - "origin.": -10.345895, - "origin_.x_": -10.345895, - "origin_.y_": -10.345895, - "os=": -10.345895, - "other": -7.637845, - "others": -10.345895, - "otherwise": -9.652748, - "our": -9.652748, - "out": -8.736457, - "out.": -10.345895, - "outer": -10.345895, - "outgrow": -10.345895, - "output": -9.652748, - "output=": -8.554136, - "outsourcing": -10.345895, - "over": -9.247283, - "overload": -9.652748, - "override": -10.345895, - "own": -9.247283, - "ox": -10.345895, - "oxford": -10.345895, - "oxim": -10.345895, - "oxojqHlnvBCWCN": -10.345895, - "oz": -10.345895, - "p": -7.167841, - "pAAAAAElFTkSuQmCC": -10.345895, - "pAeStjNjzDxip/KFyX": -10.345895, - "pD": -10.345895, - "pDH": -10.345895, - "pE": -10.345895, - "pFxff": -10.345895, - "pGRKyPXVlZWHeXEQc": -10.345895, - "pJXV": -10.345895, - "pKfJtL": -10.345895, - "pKq": -10.345895, - "pMNwZakBJHEq": -10.345895, - "pOgkpBo": -10.345895, - "pPEPJlUSZDMMBp": -10.345895, - "pRm": -10.345895, - "pTEPjObefdhf": -10.345895, - "pVgHNQxaMqHATdvm": -10.345895, - "pVp": -10.345895, - "pWbLT": -10.345895, - "pYM": -10.345895, - "pYb": -10.345895, - "package": -9.652748, - "packageName": -9.652748, - "padding": -5.078037, - "padding=": -6.433872, - "page": -10.345895, - "pageTop": -10.345895, - "pairs.": -10.345895, - "pamphlet": -9.652748, - "paper": -10.345895, - "parameter": -8.554136, - "parameter.": -10.345895, - "parameters": -10.345895, - "parameters.": -10.345895, - "parent": -8.399985, - "parent=": -9.652748, - "parsing": -10.345895, - "part": -9.652748, - "particle": -10.345895, - "particular": -8.736457, - "pass": -9.652748, - "passed": -10.345895, - "path": -10.345895, - "path.": -9.652748, - "paths": -8.736457, - "paths=": -8.959601, - "pattern=": -6.171508, - "pay": -10.345895, - "payments": -10.345895, - "pbH": -10.345895, - "pdbonly": -9.247283, - "pdtNd": -10.345895, - "pecQs": -10.345895, - "pede": -10.345895, - "per": -9.247283, - "performance": -10.345895, - "performs": -10.345895, - "permit": -9.652748, - "permitted": -10.345895, - "personal_communication": -9.652748, - "phase": -10.345895, - "phases": -10.345895, - "philosophy": -10.345895, - "pifiGWz": -10.345895, - "pjHcxeJ/": -10.345895, - "place": -9.247283, - "placed": -10.345895, - "placeholderIdentifier=": -9.652748, - "places": -10.345895, - "playerMouselook.gml": -10.345895, - "playerMovement.gml": -10.345895, - "please": -10.345895, - "plug": -10.345895, - "plugin_state_location": -6.790547, - "pn/": -10.345895, - "png": -8.266454, - "pockets": -10.345895, - "point": -10.345895, - "point=": -7.860988, - "points": -8.736457, - "policy": -8.736457, - "politics": -10.345895, - "polo": -10.345895, - "populate": -10.345895, - "populated": -8.959601, - "port=": -10.345895, - "possibility": -10.345895, - "possible": -9.247283, - "post": -9.652748, - "posted": -9.247283, - "potential": -9.652748, - "potentially": -9.652748, - "pre": -10.345895, - "precedes": -7.013691, - "preceding": -8.959601, - "predicate=": -6.083215, - "prefHeight=": -9.652748, - "prefWidth=": -8.554136, - "prefix": -8.266454, - "prefix=": -5.592305, - "prefixes": -8.959601, - "prescriptive": -9.247283, - "present": -9.652748, - "preserve": -10.345895, - "previous": -9.652748, - "primarily": -10.345895, - "primary": -10.345895, - "print": -10.345895, - "printed": -10.345895, - "private": -10.345895, - "problemReportingEnabled=": -8.736457, - "process": -8.736457, - "processes": -10.345895, - "processing": -9.652748, - "processing.": -10.345895, - "procurement": -10.345895, - "produce": -10.345895, - "production": -10.345895, - "profile": -8.959601, - "profiles": -10.345895, - "profits": -10.345895, - "programmer": -10.345895, - "programmers": -10.345895, - "progress": -10.345895, - "project": -8.266454, - "project.": -10.345895, - "projectType=": -10.345895, - "project_name": -8.736457, - "projects": -9.652748, - "projects.": -10.345895, - "promise": -10.345895, - "prompt": -8.736457, - "properties": -6.978599, - "properties/methods": -10.345895, - "property": -6.041830, - "property.": -7.860988, - "property=": -10.345895, - "propertyAccessControl=": -9.652748, - "props": -8.399985, - "prosopography": -10.345895, - "protocol=": -10.345895, - "prototype": -10.345895, - "provide": -9.247283, - "provided": -7.512682, - "provided.": -8.736457, - "provider": -10.345895, - "provides": -8.554136, - "providing": -7.350163, - "psWgUGHq": -10.345895, - "psgvkDGLIBYgAGKogIwjrm": -10.345895, - "pt": -7.948000, - "ptr_": -8.959601, - "public": -10.345895, - "public/New_Case_Create_Email_Alert": -10.345895, - "published": -10.345895, - "publisher": -10.345895, - "punctuation": -10.345895, - "purpose": -7.948000, - "purposes": -10.345895, - "put": -9.652748, - "pvIx": -10.345895, - "pvvueV": -10.345895, - "pw": -10.345895, - "pwBJykGyBj": -10.345895, - "px": -10.345895, - "pxomsm": -10.345895, - "q": -8.266454, - "qA/EgvMogJryB": -10.345895, - "qAHAOigBoAFXio/": -10.345895, - "qEJ": -10.345895, - "qFBf": -10.345895, - "qG": -10.345895, - "qGb": -10.345895, - "qGlLDYdBlTUVYjKtKKAqUAEhpPko/": -10.345895, - "qH": -10.345895, - "qJyq": -10.345895, - "qLzudCOhJjaxX": -10.345895, - "qO": -10.345895, - "qOAAPvZJcvAoJlHnRz": -10.345895, - "qPSlq": -10.345895, - "qPi": -10.345895, - "qS": -10.345895, - "qT": -9.652748, - "qYVUvpmci": -10.345895, - "qYo": -10.345895, - "qbV": -10.345895, - "qck": -10.345895, - "qeJjZrFRUij/yfo//WhArI/vaKDhxbbRqqdgsSzyntmKGsoCgUjLVe": -10.345895, - "qgyvPZIgmA": -10.345895, - "qkr": -10.345895, - "qnAcPbLZlMU": -10.345895, - "qname": -7.637845, - "qoUMoHQL": -10.345895, - "quNAw": -10.345895, - "quam": -9.652748, - "queried": -10.345895, - "query": -8.959601, - "query=": -10.345895, - "queryBinding=": -9.652748, - "querying": -10.345895, - "queued": -10.345895, - "queues": -9.652748, - "quis": -8.736457, - "quite": -9.652748, - "quot": -6.944698, - "quote": -10.345895, - "quotes=": -7.780946, - "qw": -10.345895, - "qwHDYutqtRtrqSnkim": -10.345895, - "qwl": -10.345895, - "qySPGyjyEAhXMzBiHy": -10.345895, - "qznsmlVeCKxv": -10.345895, - "r": -7.780946, - "r/kEfQ": -10.345895, - "rAczoRMDBZ": -10.345895, - "rBgCuDrl": -10.345895, - "rCN": -10.345895, - "rEB/F": -10.345895, - "rEsbvcrETybvIJ": -10.345895, - "rGKA": -10.345895, - "rGlvf": -10.345895, - "rIIABjc": -10.345895, - "rLUQxX": -10.345895, - "rQS": -10.345895, - "rRWAMJ": -10.345895, - "rTYa": -10.345895, - "rTcj": -10.345895, - "rUv": -10.345895, - "rWWlUHFVjgjXbPN": -10.345895, - "rXB": -10.345895, - "rYZ": -10.345895, - "rZb": -10.345895, - "raKlM": -10.345895, - "raTSFuB": -10.345895, - "raWbyOOyl": -10.345895, - "radius": -7.706838, - "raise": -9.652748, - "raiseAndSetIfChanged": -10.345895, - "raisePropertyChanging": -8.959601, - "raised": -10.345895, - "range": -9.247283, - "rather": -10.345895, - "ray_coll.gml": -10.345895, - "rbS/gvtaNtGV": -10.345895, - "rc": -9.652748, - "rct": -10.345895, - "rdp": -10.345895, - "re": -10.345895, - "reWzJOQKiAxGKlVMKNauZ": -10.345895, - "reached": -9.652748, - "read": -8.959601, - "readable": -10.345895, - "reader": -10.345895, - "realestate": -9.652748, - "reason": -10.345895, - "reasons": -10.345895, - "rebroadcast": -9.652748, - "receives": -10.345895, - "recently": -9.247283, - "recipe": -10.345895, - "recommending": -10.345895, - "rect1": -10.345895, - "rect2": -10.345895, - "rect3": -10.345895, - "rect4": -9.652748, - "rect5": -10.345895, - "red": -9.652748, - "red=": -10.345895, - "reenables": -9.247283, - "ref=": -9.247283, - "ref_count_": -8.959601, - "reflection": -10.345895, - "reg": -8.959601, - "regardless": -9.652748, - "region=": -9.247283, - "registered": -10.345895, - "registered.": -9.652748, - "rel=": -9.652748, - "relativeNode": -9.652748, - "relatively": -10.345895, - "reliably.": -10.345895, - "religion": -10.345895, - "remotely": -10.345895, - "removed": -8.959601, - "removed.": -8.959601, - "rend=": -8.399985, - "rendered": -10.345895, - "rendition": -8.959601, - "repeat": -8.959601, - "replace": -10.345895, - "replaces": -10.345895, - "report": -10.345895, - "repository=": -10.345895, - "repositoryId=": -10.345895, - "representation": -9.652748, - "representing": -7.301373, - "represents": -8.959601, - "reproduce": -10.345895, - "request": -9.247283, - "requested": -10.345895, - "requests": -8.959601, - "requests.": -9.652748, - "required": -9.652748, - "reserved.": -10.345895, - "resheader": -10.345895, - "resourcePath=": -9.652748, - "respective": -10.345895, - "response": -9.652748, - "rest.": -9.652748, - "result": -9.247283, - "result.": -9.652748, - "resulting": -10.345895, - "results": -8.148671, - "resx": -8.959601, - "retain": -10.345895, - "retrieve": -9.247283, - "return": -7.455523, - "returned": -9.652748, - "returned.": -9.652748, - "returning": -10.345895, - "returns": -8.736457, - "rev=": -9.652748, - "review": -8.736457, - "revision": -10.345895, - "revision=": -8.266454, - "rf": -9.652748, - "rgb": -8.148671, - "rgs": -10.345895, - "rh": -10.345895, - "riTUQIzNntZzjlMxxzn": -10.345895, - "richness": -10.345895, - "ridiculus": -9.652748, - "rifoq": -10.345895, - "right": -6.561706, - "right=": -10.345895, - "rightbraced": -10.345895, - "rights": -10.345895, - "riwFzpHDi": -10.345895, - "rj": -10.345895, - "rjos": -10.345895, - "rmPg": -10.345895, - "rm_fps": -10.345895, - "rnD/NFCxuaQAv": -10.345895, - "ro": -10.345895, - "role=": -7.860988, - "roman": -9.247283, - "roof.d": -10.345895, - "roof.png": -10.345895, - "room_menu": -10.345895, - "rooms": -9.652748, - "rotate": -8.959601, - "rotateClockwise": -10.345895, - "rotateCounterclockwise": -10.345895, - "rotateleft": -10.345895, - "rotateright": -10.345895, - "routing": -9.652748, - "row": -8.148671, - "rowno": -10.345895, - "rows": -10.345895, - "rq": -10.345895, - "rqO": -10.345895, - "rqR": -10.345895, - "rrVW/pWaoZNrLcjfGqhC": -10.345895, - "rtg": -10.345895, - "rtsQ": -10.345895, - "ru": -10.345895, - "rule": -10.345895, - "rule.": -10.345895, - "rules": -10.345895, - "run": -8.399985, - "running": -8.959601, - "running.": -10.345895, - "rutrum": -10.345895, - "rutrum.": -8.554136, - "rvAL": -10.345895, - "rwmFqUu": -10.345895, - "rwxuMP": -10.345895, - "rxEc": -10.345895, - "rz": -9.652748, - "s": -7.210401, - "s.SourceFile.FilePath": -10.345895, - "s/TIlQWbYgA": -10.345895, - "sD": -10.345895, - "sDed": -10.345895, - "sE/E": -10.345895, - "sF": -10.345895, - "sGc": -10.345895, - "sHc": -10.345895, - "sIDZ": -10.345895, - "sLT": -10.345895, - "sN": -10.345895, - "sNWxBKP": -10.345895, - "sO": -10.345895, - "sRLV/ty": -10.345895, - "sYcUR": -10.345895, - "salve": -9.652748, - "same": -8.266454, - "sample": -8.554136, - "sample.xml": -9.652748, - "sans": -8.043310, - "satisfies": -8.736457, - "save": -9.247283, - "say": -10.345895, - "sc": -10.345895, - "scenarios": -8.959601, - "scene": -9.652748, - "schedule": -9.652748, - "scheduler": -7.948000, - "schema": -8.736457, - "schemaLocation": -10.345895, - "schemaVersion=": -9.652748, - "schemas": -9.247283, - "schematypens=": -10.345895, - "scheme=": -8.399985, - "science": -10.345895, - "scope": -9.652748, - "scope=": -7.050058, - "scripts": -5.976447, - "sdESBxYyAQhH": -10.345895, - "sdk": -10.345895, - "sdkextension": -10.345895, - "section": -10.345895, - "see": -8.736457, - "seems": -10.345895, - "select": -9.247283, - "select=": -6.608226, - "selectedProfileId=": -8.736457, - "selector": -8.554136, - "selector.": -9.652748, - "selectors": -9.652748, - "self": -8.736457, - "semantically": -9.247283, - "send": -9.247283, - "send.": -8.959601, - "sending": -9.652748, - "sense": -10.345895, - "sense.": -10.345895, - "sent": -9.652748, - "ser": -10.345895, - "serialized": -8.554136, - "serif": -8.043310, - "server": -9.652748, - "server.": -9.652748, - "service": -10.345895, - "serviceName=": -9.652748, - "services": -9.247283, - "set": -6.414070, - "set.": -8.959601, - "setGeneralLight.gml": -10.345895, - "setting": -8.959601, - "settings": -10.345895, - "setup.": -7.860988, - "several": -10.345895, - "sfTQAIYjwupvXUhvRjOBwEXY": -10.345895, - "sg": -10.345895, - "sgL": -10.345895, - "sgM": -10.345895, - "sgatIDAFhaSXctxLkRoKjfV": -10.345895, - "shN": -10.345895, - "shaders": -9.652748, - "shall": -10.345895, - "share": -9.652748, - "shipping": -10.345895, - "shirt": -10.345895, - "shoes": -10.345895, - "shorts": -10.345895, - "should": -7.706838, - "show": -10.345895, - "sibling": -8.959601, - "sic": -9.652748, - "side": -10.345895, - "similar": -8.266454, - "similarly": -10.345895, - "simple": -8.266454, - "simplechanges": -10.345895, - "simpleelementspm": -10.345895, - "simpler": -10.345895, - "simplify": -10.345895, - "single": -9.247283, - "sit": -9.652748, - "size": -6.454075, - "size_.height_": -10.345895, - "size_.width_": -10.345895, - "skos": -9.652748, - "sleSGS": -10.345895, - "slot": -10.345895, - "small": -9.247283, - "smallCap": -10.345895, - "smallcaps": -10.345895, - "smaller": -8.736457, - "smoke_": -10.345895, - "snd_birds": -10.345895, - "snd_crickets": -10.345895, - "snd_fire": -10.345895, - "snd_rain": -10.345895, - "so": -9.652748, - "so.": -10.345895, - "software": -9.247283, - "soldier_wip.d": -9.652748, - "solid": -10.345895, - "some": -8.736457, - "song": -10.345895, - "sort": -7.780946, - "sound": -8.959601, - "source": -7.167841, - "source.extension.vsixmanifest": -10.345895, - "sourceFilesPathsToDiscard": -10.345895, - "sourceFilesPathsToDiscard.Contains": -10.345895, - "sourcedoc": -10.345895, - "spAyr": -10.345895, - "space": -8.736457, - "space_.data_": -9.652748, - "spaceletter": -10.345895, - "spacing": -10.345895, - "spacing=": -10.345895, - "spamming": -9.652748, - "spec_": -10.345895, - "special": -10.345895, - "specialist": -10.345895, - "specific": -7.948000, - "specified": -8.399985, - "specifies": -10.345895, - "specify": -10.345895, - "specs": -7.350163, - "specs_file": -7.637845, - "speech": -9.652748, - "spr_angle": -10.345895, - "spr_cam": -10.345895, - "spr_fern": -10.345895, - "spr_fireicon": -10.345895, - "spr_house": -10.345895, - "spr_lantern": -10.345895, - "spr_logo": -10.345895, - "spr_master_outside_night": -10.345895, - "spr_player": -10.345895, - "spr_rectangle": -10.345895, - "spr_tallgrass": -10.345895, - "spr_tree": -10.345895, - "sprites": -7.780946, - "srKyticWeuJga": -10.345895, - "src": -10.345895, - "src=": -6.880159, - "srsName=": -9.652748, - "sryoWq": -10.345895, - "ssxBx": -10.345895, - "standalone=": -8.736457, - "standard": -10.345895, - "standardized": -10.345895, - "start": -9.652748, - "start=": -10.345895, - "starts": -8.736457, - "startup.": -10.345895, - "status": -10.345895, - "status=": -10.345895, - "step": -10.345895, - "steps": -10.345895, - "still": -9.652748, - "storage": -10.345895, - "storage_.value_": -10.345895, - "storage_type_id=": -10.345895, - "store": -10.345895, - "stored": -10.345895, - "stream": -8.399985, - "stream.": -9.247283, - "strict": -10.345895, - "strikethrough": -10.345895, - "string": -6.944698, - "string_value_": -9.652748, - "strong": -10.345895, - "structure": -10.345895, - "style": -6.539233, - "style=": -7.127019, - "stylesheets": -10.345895, - "su": -10.345895, - "sub": -10.345895, - "subscribed": -9.652748, - "subscribing": -10.345895, - "subscript": -10.345895, - "subsequent": -9.247283, - "subset": -9.247283, - "substitute": -9.247283, - "substring": -9.247283, - "subtle": -9.652748, - "success": -10.345895, - "successful": -10.345895, - "such": -8.399985, - "suffice.": -10.345895, - "suffix=": -4.457017, - "suit": -10.345895, - "suited": -10.345895, - "sum": -9.652748, - "sup": -10.345895, - "super": -9.652748, - "superClass=": -6.608226, - "superscript": -10.345895, - "support": -9.247283, - "supralinear": -10.345895, - "svGZRjkHFBSejevtuU": -10.345895, - "svenhaustein.de": -10.345895, - "swIs": -10.345895, - "sx": -10.345895, - "sxAMnoPtuMYiCAiSQQlCCdpPaTIKLxXxOSIdr": -10.345895, - "symbols": -8.959601, - "synchronous": -10.345895, - "systemVersion=": -9.652748, - "szGJbCfSALeJCRjSKmgOQncAKL": -10.345895, - "t": -7.350163, - "t/mx": -10.345895, - "tAAAAAElFTkSuQmCC": -10.345895, - "tBpzgrJ": -10.345895, - "tBynmiZI": -10.345895, - "tEi": -10.345895, - "tGftufJlD": -10.345895, - "tIiqseI": -10.345895, - "tK": -10.345895, - "tKDIYkMMwBY": -10.345895, - "tLQbjMAAAAASUVORK": -10.345895, - "tMC": -10.345895, - "tMq": -10.345895, - "tN": -10.345895, - "tQi": -10.345895, - "tRBmAil": -10.345895, - "tRSe/qqWflbLuzXu": -10.345895, - "tTHdUJew": -10.345895, - "tUf": -10.345895, - "tUmk": -10.345895, - "tVUr": -9.247283, - "tVVLU/DUBTlp": -10.345895, - "tVVLW/CUBRFIpGVWGRlZW": -10.345895, - "tVVLW/jQBTsT": -10.345895, - "tVVLY/iUBSdn": -10.345895, - "tVVLYvDQBBduTJy": -10.345895, - "tVVoW": -9.247283, - "tVVq": -10.345895, - "tVVr": -9.247283, - "tVVrW/bQBTvnzBYGDpoaBgaaGhoaHrw": -10.345895, - "tVVsWrDMBDNp": -10.345895, - "tVdvPg": -10.345895, - "tVlSJgNd": -10.345895, - "tWVoW/qUBjF": -10.345895, - "tWVr": -8.959601, - "tWVrW/bUBTF": -10.345895, - "tWVrW/jQBDFCwsPFi": -10.345895, - "tWVrY/bQBDF": -10.345895, - "tWVrY/bQBTEAwMNDU": -10.345895, - "tWft": -10.345895, - "tWx": -10.345895, - "tX": -10.345895, - "tYnGU": -10.345895, - "table": -9.247283, - "tablefoot": -10.345895, - "tagged": -10.345895, - "tagging": -10.345895, - "take": -9.247283, - "taken": -10.345895, - "takes": -10.345895, - "tank": -10.345895, - "target": -8.266454, - "target.": -10.345895, - "target.property": -10.345895, - "target=": -7.573306, - "targetRuntime=": -9.652748, - "targets": -7.512682, - "task": -8.554136, - "tcygiDPzeuBDCuR": -10.345895, - "technology": -10.345895, - "tei": -7.780946, - "teiCorpus": -10.345895, - "tells": -10.345895, - "tellus": -10.345895, - "tellus.": -8.959601, - "temp": -10.345895, - "templates": -7.512682, - "temporary": -10.345895, - "term=": -8.148671, - "test": -8.266454, - "test=": -6.584695, - "tests": -10.345895, - "tests.": -10.345895, - "tex_arrow": -10.345895, - "tex_sky": -10.345895, - "tex_sky_day": -10.345895, - "tex_test": -10.345895, - "text": -5.781547, - "text.": -10.345895, - "text/microsoft": -9.652748, - "text/value": -10.345895, - "text=": -8.959601, - "texts": -8.266454, - "texts.": -10.345895, - "tgroup": -7.860988, - "th": -9.247283, - "thGodg": -10.345895, - "than": -8.554136, - "that": -5.627396, - "the": -4.496570, - "their": -9.652748, - "them": -9.247283, - "then": -7.860988, - "theory": -10.345895, - "there": -9.652748, - "therein": -10.345895, - "these": -9.652748, - "they": -8.959601, - "think": -9.652748, - "this": -5.802600, - "those": -9.652748, - "thread.": -9.247283, - "through": -8.399985, - "thrown": -10.345895, - "tif": -10.345895, - "tiff": -10.345895, - "time": -8.959601, - "times.": -8.959601, - "title": -6.790547, - "tj": -10.345895, - "tjNvuvr": -10.345895, - "tkzEghoAYPYjElZX": -10.345895, - "tmZ": -10.345895, - "tnyQ/qufk": -10.345895, - "to": -5.013176, - "to.": -8.399985, - "tokenize": -9.247283, - "tomorrow": -10.345895, - "too": -10.345895, - "toolsVersion=": -9.652748, - "top": -6.235021, - "top=": -9.652748, - "topbraced": -10.345895, - "tort": -10.345895, - "total": -9.652748, - "tp": -10.345895, - "tpGAR": -10.345895, - "tpKi/TV": -10.345895, - "tpl": -9.652748, - "traditional": -9.247283, - "trans.": -10.345895, - "transcr": -10.345895, - "transcription": -10.345895, - "transcriptional": -10.345895, - "transform": -8.736457, - "translator": -10.345895, - "travelling": -10.345895, - "traversal": -9.652748, - "treat": -10.345895, - "tree_leaves.d": -10.345895, - "tree_trunk.d": -10.345895, - "true": -6.584695, - "tu": -10.345895, - "tuhTTjf": -10.345895, - "tutorial": -10.345895, - "tv": -10.345895, - "twitter": -9.652748, - "two": -9.652748, - "tx": -10.345895, - "tyF": -10.345895, - "type": -7.087799, - "type.": -9.247283, - "type=": -5.915078, - "type_": -10.345895, - "typed": -9.652748, - "types": -7.860988, - "typewriter": -10.345895, - "typically": -10.345895, - "u": -9.652748, - "uCGWWFMx": -10.345895, - "uDQqZH": -10.345895, - "uOdBctgHB": -10.345895, - "uc": -10.345895, - "ultricies": -9.652748, - "uncomment": -8.736457, - "undeclared": -10.345895, - "undefined": -9.247283, - "under": -9.247283, - "underline": -8.959601, - "understood": -10.345895, - "undertaken": -10.345895, - "unenroll": -10.345895, - "unfiled": -10.345895, - "unique": -7.860988, - "unit": -8.266454, - "unless": -10.345895, - "unlike": -7.780946, - "unpredictable.": -10.345895, - "unprefixed": -10.345895, - "until": -8.399985, - "up": -7.127019, - "updateAudioListener.gml": -10.345895, - "updated": -10.345895, - "updated.": -10.345895, - "upon": -10.345895, - "upper": -10.345895, - "uppercase": -10.345895, - "uri": -8.736457, - "uri=": -7.780946, - "url": -8.959601, - "url=": -9.247283, - "urn": -9.652748, - "usUygMoCw": -10.345895, - "usage": -10.345895, - "usages": -10.345895, - "use": -7.050058, - "use=": -10.345895, - "useAutolayout=": -9.652748, - "useDefault=": -6.657016, - "useSourceRendition=": -8.043310, - "useTraitCollections=": -9.652748, - "used": -7.254853, - "useful": -9.652748, - "user": -8.959601, - "userLabel=": -9.652748, - "users": -9.247283, - "users.": -9.652748, - "uses": -9.652748, - "using": -7.860988, - "usually": -10.345895, - "ut": -8.399985, - "util": -9.652748, - "uuid": -9.652748, - "ux": -8.148671, - "v": -6.285452, - "v/": -9.652748, - "v/WeP": -10.345895, - "v3": -10.345895, - "v4": -10.345895, - "vA": -10.345895, - "vAXxPEe": -10.345895, - "vAwaQJ": -10.345895, - "vCbChH": -10.345895, - "vGNxeEilWMVSVSM": -10.345895, - "vGTAulhguppjof": -10.345895, - "vH": -10.345895, - "vHlxrq": -10.345895, - "vI": -10.345895, - "vIEt/cM": -10.345895, - "vIwLBI": -10.345895, - "vKYSA": -10.345895, - "vM": -10.345895, - "vMYWA/O": -10.345895, - "vMsUnNiwaZQ": -10.345895, - "vOu": -10.345895, - "vPMkEZ": -10.345895, - "vRtiqctC": -10.345895, - "vT": -10.345895, - "vUsDiKsHQjCCQga": -10.345895, - "vVSsiZ": -10.345895, - "vXfz": -10.345895, - "vXzZjkiQhkvGhPBQHKZwAMwKAHg": -10.345895, - "vZ": -10.345895, - "vZYgeYJJhHW": -10.345895, - "val": -8.959601, - "validation": -10.345895, - "value": -6.433872, - "value.": -9.247283, - "value=": -6.708309, - "valueName=": -10.345895, - "valueType=": -7.860988, - "values": -8.959601, - "varables": -10.345895, - "variable=": -4.689903, - "variant": -10.345895, - "variation": -10.345895, - "various": -9.652748, - "varius": -8.399985, - "vb": -8.959601, - "vbproj": -9.247283, - "vbproj_sample": -10.345895, - "vbproj_sample.Module": -10.345895, - "vc": -10.345895, - "vc/": -10.345895, - "vcK": -10.345895, - "vcxprojsample": -10.345895, - "veP": -10.345895, - "veTEzXm": -10.345895, - "vector_rotate.gml": -10.345895, - "vendors": -10.345895, - "version": -8.399985, - "version=": -5.857259, - "versions": -9.247283, - "vertical": -7.637845, - "very": -8.959601, - "vfFznwktzPqsavY": -10.345895, - "vfd": -10.345895, - "vfiHRCyjB": -10.345895, - "vgmY": -10.345895, - "vhkEq": -10.345895, - "via": -8.266454, - "view": -9.247283, - "viewed": -10.345895, - "vinFLQX": -10.345895, - "virtue": -10.345895, - "visibility=": -9.652748, - "viverra": -7.860988, - "vjQBReWVkZGRsZGRlbWVkZOXY": -10.345895, - "vjQBTePyV": -10.345895, - "vjQBjdPyU": -10.345895, - "vlm": -10.345895, - "vmsD": -10.345895, - "vn": -10.345895, - "void*": -9.652748, - "vols": -8.959601, - "vote": -9.652748, - "votes": -9.652748, - "voting": -10.345895, - "voypwiHgurVx": -10.345895, - "vpCG": -10.345895, - "vpREjLn": -10.345895, - "vqg": -10.345895, - "vr": -9.652748, - "vrUBSenKyMjI": -10.345895, - "vs.": -10.345895, - "vsArRsRicf": -10.345895, - "vsmuestt": -10.345895, - "vss": -10.345895, - "vstemplate": -10.345895, - "vsx": -10.345895, - "vuoyvzmGMiOOz": -10.345895, - "vv": -10.345895, - "vw": -10.345895, - "vyLgwIGCgIAAEwMD": -10.345895, - "vydxC": -10.345895, - "vzheDplJC": -10.345895, - "w": -8.266454, - "w3": -8.043310, - "wASqnIuKNk": -10.345895, - "wAr": -10.345895, - "wBMXUFQeC": -10.345895, - "wDlGEwr": -10.345895, - "wGPIJOT": -10.345895, - "wHlq": -10.345895, - "wJ/ZSrfUYvujCO": -10.345895, - "wL": -10.345895, - "wLbjO": -10.345895, - "wLhpRvLWN": -10.345895, - "wMyHwZuLyPqNiEdDgktJh": -10.345895, - "wNVjJjsNvLuLpXxIpX": -10.345895, - "wP/xAiRtD": -10.345895, - "wQdaKa": -10.345895, - "wR": -10.345895, - "wSmTBDT": -10.345895, - "wV": -10.345895, - "wWoVRVrgzoehU": -10.345895, - "wXmwjz": -10.345895, - "waUQPvZL": -10.345895, - "wait": -9.247283, - "want": -9.652748, - "warranties": -9.652748, - "was": -8.554136, - "wav": -10.345895, - "wavy": -10.345895, - "wavyunderline": -10.345895, - "way": -8.959601, - "way.": -9.652748, - "ways": -10.345895, - "wbIj/bkvASQnoLQIZTzzZTiFAjgDjHGOMey": -10.345895, - "wbtdSCr": -10.345895, - "wcjoHkb": -10.345895, - "wcksN": -10.345895, - "wdX": -10.345895, - "we": -9.247283, - "web": -8.399985, - "webkit": -9.652748, - "webpage": -9.652748, - "weight": -7.637845, - "well": -9.652748, - "weoXiCRUQ": -10.345895, - "were": -10.345895, - "what": -10.345895, - "when": -6.657016, - "whenever": -7.455523, - "where": -8.043310, - "whether": -9.652748, - "which": -7.401456, - "who": -9.652748, - "whom": -10.345895, - "whose": -8.399985, - "wide": -9.652748, - "width": -8.554136, - "width=": -6.356911, - "width_": -10.345895, - "will": -5.976447, - "with": -6.375603, - "withDelay": -9.652748, - "without": -9.652748, - "wkFxqMdK/qYrQJdEzVlJHIWYpyAkqnRovnaKkMWL": -10.345895, - "wmnu/": -10.345895, - "wn": -10.345895, - "wnrz": -10.345895, - "woodstack.png": -10.345895, - "word": -10.345895, - "work": -8.554136, - "working": -10.345895, - "works": -9.652748, - "would": -9.247283, - "wpa": -10.345895, - "wqJsqBJm": -10.345895, - "write": -9.652748, - "writing": -10.345895, - "www": -7.401456, - "www.flaticon.com": -10.345895, - "wxGQ": -10.345895, - "wxLE": -10.345895, - "wyZk/WnQnrvJ": -10.345895, - "wyubKS": -10.345895, - "wzi": -10.345895, - "x": -7.127019, - "x.Foo.Bar.Baz": -10.345895, - "x.SomeProperty": -10.345895, - "x86": -9.652748, - "x=": -8.736457, - "xBmNE": -10.345895, - "xD": -10.345895, - "xGWMbJUgLfsodkbX": -10.345895, - "xGhLjKOYPiWT": -10.345895, - "xHyBC": -10.345895, - "xIIomuHUb": -10.345895, - "xISBEglOD": -10.345895, - "xJVS": -10.345895, - "xLMYEksMbfC/HuP": -10.345895, - "xNUz": -10.345895, - "xNgu": -10.345895, - "xPzSg": -10.345895, - "xRMIPrgFxpHk": -10.345895, - "xSiCcE": -10.345895, - "xTS": -10.345895, - "xVr": -10.345895, - "xZ": -10.345895, - "xZ/": -10.345895, - "xZwEifOrBKU": -10.345895, - "x_": -10.345895, - "xeqPPgT": -10.345895, - "xg": -10.345895, - "xgvRzNqvLuaUQ": -10.345895, - "xiMlp": -10.345895, - "xj": -10.345895, - "xlQ": -10.345895, - "xldbWJQhHy": -10.345895, - "xml": -6.414070, - "xmlns": -7.050058, - "xmlns=": -6.474694, - "xnodpQZVmmKBq": -10.345895, - "xo": -10.345895, - "xq": -10.345895, - "xq/Wgox": -10.345895, - "xquery": -10.345895, - "xrHUo": -10.345895, - "xs": -8.736457, - "xsd": -8.736457, - "xsi": -8.959601, - "xsl": -9.652748, - "xslt": -9.247283, - "xspec": -10.345895, - "y": -7.780946, - "y=": -8.736457, - "yBOS": -10.345895, - "yBR": -10.345895, - "yD": -10.345895, - "yDfywLBX": -10.345895, - "yEDAJpH": -10.345895, - "yEomdRCKRtVUvVUsz": -10.345895, - "yGYC": -10.345895, - "yHCCvg": -10.345895, - "yHX": -10.345895, - "yHezIeUfUZx": -10.345895, - "yHfvHFPtdiuZliL": -10.345895, - "yI": -10.345895, - "yIzwQKVJgErfUmsakwnM": -10.345895, - "yJ": -10.345895, - "yLg": -10.345895, - "yMbo": -10.345895, - "yNYO": -10.345895, - "yPI": -10.345895, - "yR": -10.345895, - "yRxC": -10.345895, - "yTIZ": -10.345895, - "yWRMvTUGcg": -10.345895, - "yWv": -10.345895, - "yXTlE": -10.345895, - "yZPga": -10.345895, - "yZjEUwInD": -10.345895, - "y_": -10.345895, - "yajiP": -10.345895, - "ycGd": -10.345895, - "ycMBoYaFgaGBhoGGoYaGgZN": -10.345895, - "yczOTDKT": -10.345895, - "ydCZeUukbYtNWDnituXUrrwjcUZOB": -10.345895, - "ye": -10.345895, - "years": -9.652748, - "yfb": -10.345895, - "ylcC": -10.345895, - "ym": -10.345895, - "ymQrynjqSXeLQCOCG/bpR": -10.345895, - "yoBcGAg": -10.345895, - "you": -7.087799, - "your": -7.401456, - "ypvKVMnI": -10.345895, - "yr": -10.345895, - "ysrURWYpFIJBKLRJJTVZsUQcKKTajZEAQhCBIqmrSCpAiSIhCfQFQgKk": -10.345895, - "yt": -10.345895, - "yufHKmkiiheTIUMnEk": -10.345895, - "ywkAgRd": -10.345895, - "yx": -9.652748, - "yzo": -10.345895, - "z": -8.148671, - "zA": -10.345895, - "zC": -10.345895, - "zD": -10.345895, - "zIdGX": -10.345895, - "zIndex=": -10.345895, - "zLfjfXMXUipklk": -10.345895, - "zLuxyR": -10.345895, - "zMV/": -10.345895, - "zQN": -10.345895, - "zQxmED": -10.345895, - "zUyM": -10.345895, - "zV": -10.345895, - "zVATM": -10.345895, - "zWlZb": -10.345895, - "zZPRfOJagN": -10.345895, - "zaTX": -10.345895, - "zauhiEvMOy": -10.345895, - "zcDuhpOynFWhwP": -10.345895, - "zcUTqrSK": -10.345895, - "zdAcqI": -10.345895, - "zdbBVnXZDb": -10.345895, - "zeaE": -10.345895, - "zfTnvfO/cMErAQxjpINkbUKd": -10.345895, - "zh": -10.345895, - "zi": -10.345895, - "zip": -10.345895, - "zkw": -10.345895, - "zl": -10.345895, - "zmJmgFn/": -10.345895, - "zmkIb": -10.345895, - "zn": -10.345895, - "zoTPLVy": -10.345895, - "zpC": -10.345895, - "zq": -10.345895, - "zqRfBsr": -10.345895, - "zstcuAu": -10.345895, - "zszOzL": -10.345895, - "zt": -10.345895, - "zvmeJKzcDAxRqoRSK": -10.345895, - "zwh": -10.345895, - "zwr": -10.345895, - "zyBe": -10.345895, - "zytUAlydFzDXJeIGGBsgbByC": -10.345895, - "zyv": -10.345895, - "{": -6.320543, - "||": -9.247283, - "}": -6.320543, - "ê": -8.959601, - "ó": -9.652748, - "ö": -9.652748, - "ü": -9.652748, - "–": -8.959601, - "‘": -9.247283, - "’": -9.247283, - "“": -10.345895, - "”": -10.345895, - "⚊": -10.345895, - "\ufeff": -7.948000, + "!": -10.353990, + "#c": -10.353990, + "#x": -7.956094, + "$": -6.770471, + "%": -9.255377, + "&": -6.743072, + "&&": -9.660843, + "'": -9.660843, + "(": -5.122881, + ")": -5.155493, + "*": -8.744552, + "*after*": -9.660843, + "*always*": -10.353990, + "*before*": -9.660843, + "*must*": -10.353990, + "*ptr_": -10.353990, + "+": -4.633678, + ",": -4.617417, + "-": -4.582549, + ".": -7.095893, + "..": -8.562230, + "...": -9.255377, + ".AllowNoMatch": -9.255377, + ".NET": -8.274548, + ".NETPlatform": -10.353990, + ".SourceFile.FilePath": -10.353990, + ".ToHashSet": -10.353990, + ".ToLower": -10.353990, + ".example": -10.353990, + ".x": -10.353990, + ".xml": -10.353990, + "/": -6.857482, + "//Start": -10.353990, + "//github.com/github/hubot/LICENSEmd": -10.353990, + "//hubot.github.com": -10.353990, + "//www.freemedforms.com/": -10.353990, + "//www.zotero.org/styles/modern": -10.353990, + "/AALjR": -10.353990, + "/AaEwRe": -10.353990, + "/BViIrschKZGVtJbKyFsmKS": -10.353990, + "/C": -10.353990, + "/CQBTmT": -10.353990, + "/CQBTmb": -10.353990, + "/DwVX": -10.353990, + "/Eul": -10.353990, + "/Gn": -10.353990, + "/NJH": -10.353990, + "/NUVOyZSDbl": -10.353990, + "/OLgnzj": -10.353990, + "/P": -10.353990, + "/PEstbNVJVKbAhvPOVTx": -10.353990, + "/Prefer": -9.660843, + "/TwnkalWdpzgYTPUrsX": -10.353990, + "/VxEnzMR": -10.353990, + "/W": -10.353990, + "/WsAOrFo": -10.353990, + "/YBQkRflz": -10.353990, + "/ZJBpCGcs": -10.353990, + "/_PlatformToolsetFriendlyNameFor_v": -10.353990, + "/_PlatformToolsetShortNameFor_v": -10.353990, + "/aNwbxb": -10.353990, + "/ah": -10.353990, + "/akgN": -10.353990, + "/axcZ/": -10.353990, + "/bQBzF": -10.353990, + "/cmKYzGmiZHz/Vlx": -10.353990, + "/ewjxLtQfcl": -10.353990, + "/ggxQw": -10.353990, + "/hHJDvCAZ": -10.353990, + "/iUBDHV": -10.353990, + "/icBDF": -10.353990, + "/kQKPFV": -10.353990, + "/kUsr": -10.353990, + "/l": -10.353990, + "/p/W": -10.353990, + "/qUBTHJ": -10.353990, + "/ri": -10.353990, + "/tUSO": -10.353990, + "/zHZ": -10.353990, + "/zZjX": -10.353990, + "/zwRFOQoSzEP": -10.353990, + "0": -5.494177, + "000000": -9.660843, + "02": -9.255377, + "1": -5.876653, + "10": -6.986694, + "100": -10.353990, + "10px": -9.255377, + "11": -6.716404, + "113883": -6.827629, + "11px": -10.353990, + "12": -9.660843, + "12b3c8bb": -9.660843, + "13": -7.463618, + "135": -8.156765, + "13px": -10.353990, + "14": -8.744552, + "14px": -10.353990, + "15": -7.956094, + "15px": -8.156765, + "16": -6.770471, + "164753": -10.353990, + "16px": -10.353990, + "17": -9.660843, + "17px": -10.353990, + "18": -10.353990, + "1999": -8.967695, + "19px": -9.660843, + "1a5f3280b8ba": -9.660843, + "2": -6.592790, + "20": -7.463618, + "2001": -8.562230, + "2004": -10.353990, + "2010": -10.353990, + "2011": -10.353990, + "2014": -10.353990, + "2021": -10.353990, + "20px": -6.986694, + "21px": -10.353990, + "22": -9.255377, + "25": -6.482789, + "250": -8.156765, + "26": -8.562230, + "27px": -10.353990, + "2f323b": -9.255377, + "2px": -9.660843, + "3": -6.640418, + "30": -9.255377, + "30px": -7.021785, + "32": -6.827629, + "36": -10.353990, + "36px": -9.660843, + "3px": -7.956094, + "4": -7.358257, + "40": -10.353990, + "400": -10.353990, + "40px": -8.562230, + "42px": -9.660843, + "48px": -9.660843, + "4f83": -9.660843, + "5": -9.660843, + "52": -10.353990, + "57": -8.156765, + "5px": -10.353990, + "6": -9.255377, + "7": -9.660843, + "79": -10.353990, + "8": -9.255377, + "840": -6.827629, + "88": -6.827629, + "9": -9.660843, + "9085": -9.660843, + "9B9B9B": -9.255377, + ":": -5.384176, + ";": -5.254123, + "<": -8.274548, + "<!-->": -8.274548, + "<!ATTLIST>": -9.660843, + "<!DOCTYPE>": -8.744552, + "<!ELEMENT>": -8.967695, + "<!ENTITY>": -6.952792, + "<![%body.attlist;[>": -10.353990, + "<![%body.element;[>": -10.353990, + "<![%head.element;[>": -10.353990, + "<![%html.element;[>": -10.353990, + "<![%title.attlist;[>": -10.353990, + "<![%title.element;[>": -10.353990, + "<![CDATA[//>": -9.660843, + "</App>": -9.660843, + "</AppDesignerFolder>": -9.255377, + "</AppliesTo>": -10.353990, + "</AppxManifest>": -10.353990, + "</ArtifactsDir>": -10.353990, + "</Assembly>": -8.051405, + "</AssemblyName>": -8.744552, + "</AssemblyVersion>": -10.353990, + "</Assets>": -10.353990, + "</AutoGen>": -9.255377, + "</AutoGenerateBindingRedirects>": -9.255377, + "</AutoVisualizer>": -10.353990, + "</BorderPane>": -10.353990, + "</Button>": -9.660843, + "</CLRSupport>": -9.660843, + "</CharacterSet>": -9.660843, + "</Choose>": -10.353990, + "</ClCompile>": -8.562230, + "</ClInclude>": -9.660843, + "</Compile>": -9.255377, + "</CompilerInfo>": -10.353990, + "</Config>": -6.920003, + "</ConfigFiles>": -10.353990, + "</ConfigOptions>": -6.952792, + "</Configs>": -10.353990, + "</Configuration>": -7.581401, + "</ConfigurationSettings>": -9.255377, + "</ConfigurationType>": -9.660843, + "</CopyToMask>": -6.952792, + "</CurrentBuildDateStamp>": -10.353990, + "</CurrentBuildDir>": -10.353990, + "</CurrentBuildTimeStamp>": -10.353990, + "</CustomParameters>": -10.353990, + "</CustomToolNamespace>": -9.660843, + "</DataConnections>": -10.353990, + "</DebugSymbols>": -8.562230, + "</DebugType>": -8.408080, + "</DefaultLanguage>": -10.353990, + "</DefaultName>": -10.353990, + "</DefineConstants>": -8.274548, + "</DefineDebug>": -9.660843, + "</DefineTrace>": -9.660843, + "</Dependencies>": -10.353990, + "</DependentUpon>": -9.255377, + "</Description>": -9.660843, + "</DesignTime>": -10.353990, + "</DesignTimeSharedInput>": -10.353990, + "</Dir>": -9.660843, + "</DirectoryNamespaceAssociation>": -10.353990, + "</Dirs>": -10.353990, + "</DisableFastUpToDateCheck>": -10.353990, + "</DisplayName>": -10.353990, + "</DisplayString>": -6.592790, + "</DockPanel>": -10.353990, + "</DocumentationFile>": -8.744552, + "</DotNetNamingPolicy>": -10.353990, + "</EdgeNavigator>": -10.353990, + "</EmbeddedResource>": -10.353990, + "</EnableDotNetNativeCompatibleProfile>": -10.353990, + "</ErrorReport>": -8.744552, + "</EventConnections>": -10.353990, + "</Expand>": -8.156765, + "</ExpandedItem>": -8.562230, + "</Extensions>": -9.255377, + "</FB>": -9.255377, + "</FBNetwork>": -10.353990, + "</FSharpTargetsPath>": -9.660843, + "</FileAlignment>": -9.255377, + "</FileWidth>": -10.353990, + "</Filter>": -8.051405, + "</FullClassName>": -9.660843, + "</GenerateDebugInformation>": -9.660843, + "</Generator>": -9.255377, + "</Grid>": -10.353990, + "</Group>": -10.353990, + "</HBox.margin>": -10.353990, + "</HBox>": -10.353990, + "</HintPath>": -9.660843, + "</Icon>": -10.353990, + "</Image>": -10.353990, + "</ImportGroup>": -8.967695, + "</InputEndpoints>": -10.353990, + "</Installation>": -10.353990, + "</IntermediateOutputPath>": -9.660843, + "</IsTutorial>": -10.353990, + "</Item>": -7.789040, + "</ItemDefinitionGroup>": -9.660843, + "</ItemGroup>": -6.665110, + "</Keyword>": -10.353990, + "</LastGenOutput>": -9.255377, + "</LayoutAnimation>": -10.353990, + "</Link>": -9.660843, + "</LinkIncremental>": -9.660843, + "</MacroReference>": -10.353990, + "</Metadata>": -10.353990, + "</MinimumVisualStudioVersion>": -9.660843, + "</MyType>": -10.353990, + "</NDepend>": -10.353990, + "</Name>": -8.274548, + "</Nemerle>": -10.353990, + "</NemerleBinPathRoot>": -10.353990, + "</NemerleVersion>": -10.353990, + "</NoStdLib>": -10.353990, + "</NoTabsAfterNonTabs>": -10.353990, + "</NoWarn>": -9.660843, + "</None>": -9.660843, + "</NuGetTargetMoniker>": -10.353990, + "</NumberOfParentCategoriesToRollUp>": -10.353990, + "</Optimization>": -10.353990, + "</Optimize>": -8.274548, + "</OptionCompare>": -10.353990, + "</OptionExplicit>": -10.353990, + "</OptionInfer>": -10.353990, + "</OptionStrict>": -10.353990, + "</Otherwise>": -10.353990, + "</OutputDir>": -10.353990, + "</OutputName>": -10.353990, + "</OutputPath>": -7.956094, + "</OutputType>": -8.408080, + "</PackageFiles>": -10.353990, + "</PackageManifest>": -10.353990, + "</PackageTargetFramework>": -10.353990, + "</Panel>": -9.255377, + "</PhysicsObject>": -10.353990, + "</PhysicsObjectAngularDamping>": -10.353990, + "</PhysicsObjectAwake>": -10.353990, + "</PhysicsObjectDensity>": -10.353990, + "</PhysicsObjectFriction>": -10.353990, + "</PhysicsObjectGroup>": -10.353990, + "</PhysicsObjectKinematic>": -10.353990, + "</PhysicsObjectLinearDamping>": -10.353990, + "</PhysicsObjectRestitution>": -10.353990, + "</PhysicsObjectSensor>": -10.353990, + "</PhysicsObjectShape>": -10.353990, + "</Platform>": -7.581401, + "</PlatformTarget>": -8.562230, + "</PlatformToolset>": -9.255377, + "</PolicySet>": -10.353990, + "</PrecompiledHeader>": -8.967695, + "</PreprocessorDefinitions>": -9.660843, + "</Private>": -9.255377, + "</ProductVersion>": -9.255377, + "</Project>": -7.463618, + "</ProjectConfiguration>": -8.051405, + "</ProjectGuid>": -8.051405, + "</ProjectItem>": -8.967695, + "</ProjectReference>": -9.660843, + "</ProjectRoot>": -10.353990, + "</ProjectType>": -10.353990, + "</ProjectVersion>": -10.353990, + "</PropertyGroup>": -6.640418, + "</Queries>": -10.353990, + "</Query>": -9.660843, + "</RealOSVersion>": -10.353990, + "</Rectangle>": -9.660843, + "</Reference>": -7.789040, + "</References>": -10.353990, + "</Report>": -10.353990, + "</RequiredFrameworkVersion>": -10.353990, + "</RequiredTargetFramework>": -9.255377, + "</ResourceCompile>": -10.353990, + "</ResourceNamePolicy>": -10.353990, + "</ResourceType>": -10.353990, + "</Role>": -9.660843, + "</RoleName>": -10.353990, + "</RoleType>": -10.353990, + "</RootNamespace>": -8.562230, + "</SchemaVersion>": -9.255377, + "</Section>": -7.956094, + "</ServiceConfiguration>": -9.660843, + "</ServiceDefinition>": -10.353990, + "</ShowByDefault>": -10.353990, + "</SolutionRoot>": -10.353990, + "</SpecificVersion>": -10.353990, + "</StackPanel>": -10.353990, + "</StartDevelopmentStorage>": -10.353990, + "</StartupObject>": -10.353990, + "</SubSystem>": -9.660843, + "</SubType>": -9.660843, + "</SupportedFramework>": -10.353990, + "</Switch>": -10.353990, + "</Synthetic>": -7.358257, + "</TEI>": -10.353990, + "</TS>": -9.255377, + "</TableView>": -10.353990, + "</TabsToSpaces>": -10.353990, + "</Tailcalls>": -9.660843, + "</Target>": -7.358257, + "</TargetFSharpCoreVersion>": -10.353990, + "</TargetFrameworkVersion>": -8.744552, + "</TargetOsAndVersion>": -10.353990, + "</TargetPlatformIdentifier>": -10.353990, + "</TargetPlatformMinVersion>": -10.353990, + "</TargetPlatformVersion>": -10.353990, + "</TemplateContent>": -10.353990, + "</TemplateData>": -10.353990, + "</TemplateID>": -10.353990, + "</Text>": -9.660843, + "</TextInput>": -10.353990, + "</TextStylePolicy>": -10.353990, + "</TutorialName>": -10.353990, + "</TutorialPage>": -10.353990, + "</TutorialState>": -10.353990, + "</Type>": -7.714932, + "</UniqueIdentifier>": -9.255377, + "</UseDebugLibraries>": -9.660843, + "</UseDotNetNativeToolchain>": -9.255377, + "</VSTemplate>": -10.353990, + "</VersionMajor>": -10.353990, + "</VersionMinor>": -10.353990, + "</VersionPatch>": -10.353990, + "</VersionPreRelease>": -10.353990, + "</VerticalText>": -8.562230, + "</VisualStudioVersion>": -10.353990, + "</WarningLevel>": -8.156765, + "</WebConfig>": -10.353990, + "</WebElementEntity>": -10.353990, + "</WebRole>": -10.353990, + "</When>": -10.353990, + "</WhileKeyboardVisible>": -10.353990, + "</WhilePressed>": -10.353990, + "</WhileTrue>": -10.353990, + "</WixTargetsPath>": -10.353990, + "</WizardData>": -10.353990, + "</WizardExtension>": -9.660843, + "</Workflow>": -10.353990, + "</a>": -8.967695, + "</action>": -8.744552, + "</actions>": -10.353990, + "</active>": -10.353990, + "</alerts>": -10.353990, + "</argument>": -8.967695, + "</arguments>": -8.967695, + "</assembly>": -10.353990, + "</assert>": -7.058153, + "</assets>": -10.353990, + "</attDef>": -8.274548, + "</attList>": -8.156765, + "</author>": -10.353990, + "</authors>": -10.353990, + "</availability>": -10.353990, + "</background>": -8.744552, + "</backgrounds>": -10.353990, + "</bibliography>": -10.353990, + "</body>": -8.967695, + "</bottom>": -10.353990, + "</buildOutputProvider>": -6.665110, + "</c>": -10.353990, + "</categories>": -9.660843, + "</category>": -9.255377, + "</ccEmails>": -10.353990, + "</cconfiguration>": -9.660843, + "</center>": -10.353990, + "</characteristics>": -10.353990, + "</children>": -10.353990, + "</choose>": -6.276452, + "</citation>": -10.353990, + "</classSpec>": -8.744552, + "</codestring>": -8.744552, + "</columns>": -10.353990, + "</component>": -10.353990, + "</configuration>": -9.255377, + "</configurations>": -10.353990, + "</connections>": -10.353990, + "</constant>": -6.482789, + "</constants>": -10.353990, + "</constraint>": -8.408080, + "</constraintSpec>": -8.408080, + "</content>": -10.353990, + "</context>": -9.255377, + "</copyright>": -10.353990, + "</cproject>": -10.353990, + "</data>": -6.798642, + "</datafile>": -6.952792, + "</datafiles>": -8.562230, + "</date>": -6.798642, + "</dc:format>": -10.353990, + "</dependencies>": -9.255377, + "</dependencyList>": -10.353990, + "</depth>": -10.353990, + "</desc>": -5.865353, + "</description>": -8.408080, + "</descriptorBase>": -9.255377, + "</directory>": -9.660843, + "</disabledValue>": -10.353990, + "</displayName>": -10.353990, + "</div>": -8.156765, + "</dllmap>": -10.353990, + "</doc>": -10.353990, + "</docAuthor>": -9.255377, + "</docDate>": -10.353990, + "</docTitle>": -10.353990, + "</document>": -9.660843, + "</ea:build>": -10.353990, + "</echo>": -9.660843, + "</elementSpec>": -5.617791, + "</else-if>": -7.021785, + "</else>": -6.743072, + "</email>": -10.353990, + "</enabledValue>": -10.353990, + "</entry>": -9.255377, + "</event>": -8.744552, + "</events>": -10.353990, + "</exception>": -10.353990, + "</exetype>": -8.744552, + "</exif:ColorSpace>": -10.353990, + "</exif:PixelXDimension>": -10.353990, + "</exif:PixelYDimension>": -10.353990, + "</exists>": -6.952792, + "</exportAction>": -6.952792, + "</exportDir>": -6.952792, + "</extensions>": -9.660843, + "</fileDesc>": -10.353990, + "</filename>": -6.952792, + "</files>": -10.353990, + "</filter>": -10.353990, + "</folderInfo>": -9.660843, + "</forceType>": -10.353990, + "</forceTypes>": -10.353990, + "</formula>": -10.353990, + "</freeData>": -6.952792, + "</front>": -10.353990, + "</fullName>": -9.660843, + "</functionname>": -8.744552, + "</gameSystem>": -10.353990, + "</gi>": -9.255377, + "</gml:Point>": -9.660843, + "</gml:pos>": -9.660843, + "</group>": -9.660843, + "</head>": -7.869083, + "</help>": -10.353990, + "</hi>": -8.274548, + "</id>": -8.408080, + "</if>": -6.276452, + "</image>": -6.952792, + "</info>": -9.660843, + "</inputType>": -9.660843, + "</isnot>": -8.744552, + "</isquestion>": -8.744552, + "</item>": -9.660843, + "</ivy-module>": -10.353990, + "</key>": -9.255377, + "</kind>": -8.156765, + "</layout>": -9.660843, + "</libid>": -8.744552, + "</licence>": -9.660843, + "</license>": -10.353990, + "</licenseUrl>": -10.353990, + "</list>": -10.353990, + "</locale>": -10.353990, + "</macro>": -7.175936, + "</map>": -10.353990, + "</maskName>": -10.353990, + "</media>": -10.353990, + "</member>": -5.541805, + "</members>": -10.353990, + "</message>": -7.262947, + "</metadata>": -10.353990, + "</mj-attributes>": -10.353990, + "</mj-body>": -9.660843, + "</mj-button>": -7.714932, + "</mj-column>": -6.525348, + "</mj-container>": -9.660843, + "</mj-head>": -10.353990, + "</mj-image>": -7.021785, + "</mj-inline-links>": -10.353990, + "</mj-link>": -9.255377, + "</mj-navbar>": -10.353990, + "</mj-section>": -7.095893, + "</mj-social>": -10.353990, + "</mj-text>": -6.690428, + "</mj-title>": -10.353990, + "</mjml>": -9.660843, + "</model>": -6.134482, + "</modelSequence>": -8.744552, + "</module>": -10.353990, + "</multiple>": -10.353990, + "</name>": -6.743072, + "</names>": -7.409551, + "</ncl>": -9.255377, + "</node>": -7.218496, + "</object>": -7.309467, + "</objects>": -8.408080, + "</option>": -8.967695, + "</overwrite>": -6.952792, + "</owners>": -10.353990, + "</p>": -6.310938, + "</package>": -10.353990, + "</packages>": -10.353990, + "</param>": -5.865353, + "</parentName>": -10.353990, + "</pattern>": -9.660843, + "</persistent>": -10.353990, + "</phase>": -8.967695, + "</photoshop:ColorMode>": -10.353990, + "</photoshop:ICCProfile>": -10.353990, + "</phpunit>": -10.353990, + "</placeholder>": -10.353990, + "</plugin>": -10.353990, + "</policies>": -10.353990, + "</policy>": -10.353990, + "</policyDefinitionResources>": -10.353990, + "</policyDefinitions>": -10.353990, + "</policyNamespaces>": -10.353990, + "</profile>": -6.665110, + "</profileType>": -10.353990, + "</profileTypes>": -10.353990, + "</project>": -9.660843, + "</projectUrl>": -10.353990, + "</protected>": -10.353990, + "</publicationStmt>": -10.353990, + "</publisher>": -10.353990, + "</rdf:Description>": -10.353990, + "</rdf:RDF>": -10.353990, + "</rdf:Seq>": -10.353990, + "</rdf:li>": -10.353990, + "</ref>": -10.353990, + "</regionBase>": -9.255377, + "</relative>": -8.744552, + "</removeEnd>": -6.952792, + "</rendition>": -5.729017, + "</report>": -7.581401, + "</requireLicenseAcceptance>": -10.353990, + "</resheader>": -8.274548, + "</resources>": -10.353990, + "</returns>": -6.770471, + "</rights>": -10.353990, + "</room>": -9.660843, + "</rooms>": -10.353990, + "</root>": -10.353990, + "</rtf>": -10.353990, + "</rule>": -8.156765, + "</rules>": -10.353990, + "</scannerConfigBuildInfo>": -8.967695, + "</scannerInfoProvider>": -6.665110, + "</schema>": -9.255377, + "</schemaSpec>": -10.353990, + "</script>": -5.984542, + "</scripts>": -7.358257, + "</selectorCollection>": -10.353990, + "</senderType>": -10.353990, + "</shader>": -9.660843, + "</shaders>": -9.660843, + "</single>": -10.353990, + "</size>": -6.952792, + "</solid>": -10.353990, + "</sort>": -10.353990, + "</sound>": -8.967695, + "</sounds>": -10.353990, + "</source>": -7.262947, + "</sourceDesc>": -10.353990, + "</sourceEntries>": -9.660843, + "</span>": -9.660843, + "</specGrp>": -8.274548, + "</sprite>": -7.789040, + "</spriteName>": -10.353990, + "</sprites>": -9.660843, + "</stEvt:action>": -10.353990, + "</stEvt:instanceID>": -10.353990, + "</stEvt:softwareAgent>": -10.353990, + "</stEvt:when>": -10.353990, + "</storageModule>": -8.408080, + "</store>": -6.952792, + "</string>": -8.408080, + "</stringTable>": -10.353990, + "</strong>": -8.744552, + "</style>": -10.353990, + "</substitute>": -8.744552, + "</summary>": -5.525676, + "</target>": -9.660843, + "</teiHeader>": -10.353990, + "</template>": -10.353990, + "</term>": -7.409551, + "</terms>": -10.353990, + "</testsuite>": -10.353990, + "</testsuites>": -10.353990, + "</text>": -10.353990, + "</tiff:Orientation>": -10.353990, + "</tiff:ResolutionUnit>": -10.353990, + "</tiff:XResolution>": -10.353990, + "</tiff:YResolution>": -10.353990, + "</tile>": -6.952792, + "</tileset>": -10.353990, + "</title-short>": -10.353990, + "</title>": -8.744552, + "</titlePage>": -10.353990, + "</titlePart>": -10.353990, + "</titleStmt>": -10.353990, + "</tool>": -8.274548, + "</toolChain>": -9.660843, + "</translation>": -7.262947, + "</triggerType>": -10.353990, + "</type>": -10.353990, + "</typeparam>": -7.869083, + "</updated>": -10.353990, + "</url>": -10.353990, + "</useapplyto>": -8.744552, + "</userelative>": -8.744552, + "</valItem>": -6.077324, + "</valList>": -8.408080, + "</value>": -8.274548, + "</vendor>": -10.353990, + "</version>": -10.353990, + "</visible>": -10.353990, + "</whitelist>": -10.353990, + "</whoName>": -8.744552, + "</window>": -10.353990, + "</x:call>": -10.353990, + "</x:description>": -10.353990, + "</x:scenario>": -10.353990, + "</x:xmpmeta>": -10.353990, + "</xmp:CreateDate>": -10.353990, + "</xmp:CreatorTool>": -10.353990, + "</xmp:MetadataDate>": -10.353990, + "</xmp:ModifyDate>": -10.353990, + "</xmpMM:DocumentID>": -10.353990, + "</xmpMM:History>": -10.353990, + "</xmpMM:InstanceID>": -10.353990, + "</xmpMM:OriginalDocumentID>": -10.353990, + "</xsd:choice>": -10.353990, + "</xsd:complexType>": -9.255377, + "</xsd:element>": -9.255377, + "</xsd:schema>": -10.353990, + "</xsd:sequence>": -9.660843, + "</xsl:function>": -10.353990, + "</xsl:variable>": -10.353990, + "<?exactMatch>": -6.383698, + "<?fileVersion>": -10.353990, + "<?import>": -8.967695, + "<?xml-model>": -10.353990, + "<?xml>": -6.383698, + "<AdditionalDependencies>": -9.660843, + "<AlternativeType>": -8.967695, + "<App>": -9.660843, + "<AppDesignerFolder>": -9.255377, + "<AppliesTo>": -10.353990, + "<AppxManifest>": -10.353990, + "<ArtifactsDir>": -10.353990, + "<Assemblies>": -10.353990, + "<Assembly>": -8.051405, + "<AssemblyName>": -8.744552, + "<AssemblyVersion>": -10.353990, + "<Asset>": -10.353990, + "<Assets>": -10.353990, + "<AutoGen>": -9.255377, + "<AutoGenerateBindingRedirects>": -9.255377, + "<AutoVisualizer>": -10.353990, + "<BaselineInUISetting>": -10.353990, + "<BorderPane>": -10.353990, + "<BuildComparisonSetting>": -10.353990, + "<Button>": -9.660843, + "<CLRSupport>": -9.660843, + "<CallTarget>": -8.562230, + "<Change>": -10.353990, + "<CharacterSet>": -9.660843, + "<Choose>": -10.353990, + "<ClCompile>": -8.274548, + "<ClInclude>": -8.967695, + "<Compile>": -7.956094, + "<CompilerInfo>": -10.353990, + "<Config>": -6.920003, + "<ConfigFiles>": -10.353990, + "<ConfigOptions>": -6.952792, + "<Configs>": -10.353990, + "<Configuration>": -7.581401, + "<ConfigurationSettings>": -9.255377, + "<ConfigurationType>": -9.660843, + "<Connection>": -8.562230, + "<Content>": -7.175936, + "<Copy>": -9.255377, + "<CopyToMask>": -6.952792, + "<CoverageFiles>": -10.353990, + "<CurrentBuildDateStamp>": -10.353990, + "<CurrentBuildDir>": -10.353990, + "<CurrentBuildTimeStamp>": -10.353990, + "<CustomParameter>": -8.562230, + "<CustomParameters>": -10.353990, + "<CustomToolNamespace>": -9.660843, + "<DataConnections>": -10.353990, + "<DebugSymbols>": -8.562230, + "<DebugType>": -8.408080, + "<DefaultLanguage>": -10.353990, + "<DefaultName>": -10.353990, + "<DefineConstants>": -8.274548, + "<DefineDebug>": -9.660843, + "<DefineTrace>": -9.660843, + "<Delete>": -9.660843, + "<Dependencies>": -10.353990, + "<Dependency>": -9.660843, + "<DependentUpon>": -9.255377, + "<Description>": -9.660843, + "<DesignTime>": -10.353990, + "<DesignTimeSharedInput>": -10.353990, + "<Dir>": -9.660843, + "<DirectoryNamespaceAssociation>": -10.353990, + "<Dirs>": -10.353990, + "<DisableFastUpToDateCheck>": -10.353990, + "<DisplayName>": -10.353990, + "<DisplayString>": -6.592790, + "<DockPanel>": -10.353990, + "<DocumentationFile>": -8.744552, + "<DotNetNamingPolicy>": -10.353990, + "<EdgeNavigator>": -10.353990, + "<EmbeddedResource>": -10.353990, + "<EnableDotNetNativeCompatibleProfile>": -10.353990, + "<ErrorReport>": -8.744552, + "<EventConnections>": -10.353990, + "<Expand>": -8.156765, + "<ExpandedItem>": -8.562230, + "<Extensions>": -9.255377, + "<FB>": -8.967695, + "<FBNetwork>": -10.353990, + "<FSharpTargetsPath>": -9.660843, + "<FileAlignment>": -9.255377, + "<FileWidth>": -10.353990, + "<Filter>": -8.051405, + "<Folder>": -10.353990, + "<FrameworkAssemblies>": -10.353990, + "<FullClassName>": -9.660843, + "<GenerateDebugInformation>": -9.660843, + "<Generator>": -9.255377, + "<Grid>": -10.353990, + "<Group>": -10.353990, + "<HBox.margin>": -10.353990, + "<HBox>": -10.353990, + "<HintPath>": -9.660843, + "<Icon>": -10.353990, + "<Identification>": -10.353990, + "<Identity>": -10.353990, + "<Image>": -9.660843, + "<Import>": -6.616320, + "<ImportGroup>": -8.967695, + "<InputEndpoint>": -10.353990, + "<InputEndpoints>": -10.353990, + "<Insets>": -10.353990, + "<Installation>": -10.353990, + "<InstallationTarget>": -10.353990, + "<Instances>": -9.660843, + "<IntermediateOutputPath>": -9.660843, + "<IsTutorial>": -10.353990, + "<Item>": -7.789040, + "<ItemDefinitionGroup>": -9.660843, + "<ItemGroup>": -6.665110, + "<Keyword>": -10.353990, + "<LastGenOutput>": -9.255377, + "<LayoutAnimation>": -10.353990, + "<Link>": -9.660843, + "<LinkIncremental>": -9.660843, + "<MSBuild>": -10.353990, + "<MacroReference>": -10.353990, + "<MakeDir>": -9.660843, + "<Message>": -8.562230, + "<Metadata>": -10.353990, + "<MinimumVisualStudioVersion>": -9.660843, + "<Move>": -8.744552, + "<MyType>": -10.353990, + "<NDepend>": -10.353990, + "<Name>": -8.562230, + "<Nemerle>": -10.353990, + "<NemerleBinPathRoot>": -10.353990, + "<NemerleVersion>": -10.353990, + "<NewExtensions/>": -10.353990, + "<NoStdLib>": -10.353990, + "<NoTabsAfterNonTabs>": -10.353990, + "<NoWarn>": -9.660843, + "<None>": -8.408080, + "<NuGetTargetMoniker>": -10.353990, + "<NumberOfParentCategoriesToRollUp>": -10.353990, + "<Optimization>": -10.353990, + "<Optimize>": -8.274548, + "<OptionCompare>": -10.353990, + "<OptionExplicit>": -10.353990, + "<OptionInfer>": -10.353990, + "<OptionStrict>": -10.353990, + "<Otherwise>": -10.353990, + "<OutputDir>": -10.353990, + "<OutputName>": -10.353990, + "<OutputPath>": -7.956094, + "<OutputType>": -8.408080, + "<PackageFiles>": -10.353990, + "<PackageManifest>": -10.353990, + "<PackageTargetFramework>": -10.353990, + "<Panel>": -8.967695, + "<Parameter>": -9.255377, + "<PhysicsObject>": -10.353990, + "<PhysicsObjectAngularDamping>": -10.353990, + "<PhysicsObjectAwake>": -10.353990, + "<PhysicsObjectDensity>": -10.353990, + "<PhysicsObjectFriction>": -10.353990, + "<PhysicsObjectGroup>": -10.353990, + "<PhysicsObjectKinematic>": -10.353990, + "<PhysicsObjectLinearDamping>": -10.353990, + "<PhysicsObjectRestitution>": -10.353990, + "<PhysicsObjectSensor>": -10.353990, + "<PhysicsObjectShape>": -10.353990, + "<PhysicsShapePoints/>": -10.353990, + "<Platform>": -7.581401, + "<PlatformTarget>": -8.562230, + "<PlatformToolset>": -9.255377, + "<PolicySet>": -10.353990, + "<PrecompiledHeader>": -8.967695, + "<PreprocessorDefinitions>": -9.660843, + "<Private>": -9.255377, + "<ProductVersion>": -9.255377, + "<Project>": -7.409551, + "<ProjectConfiguration>": -8.051405, + "<ProjectGuid>": -8.051405, + "<ProjectItem>": -8.967695, + "<ProjectReference>": -8.744552, + "<ProjectRoot>": -10.353990, + "<ProjectType>": -10.353990, + "<ProjectVersion>": -10.353990, + "<PropertyGroup>": -6.616320, + "<Queries>": -10.353990, + "<Query>": -9.660843, + "<RealOSVersion>": -10.353990, + "<Rectangle>": -8.274548, + "<Reference>": -6.716404, + "<References>": -10.353990, + "<RemoveDir>": -10.353990, + "<Report>": -10.353990, + "<RequiredFrameworkVersion>": -10.353990, + "<RequiredTargetFramework>": -9.255377, + "<ResourceCompile>": -9.660843, + "<ResourceNamePolicy>": -10.353990, + "<ResourceType>": -10.353990, + "<Role>": -9.660843, + "<RoleName>": -10.353990, + "<RoleType>": -10.353990, + "<RootNamespace>": -8.562230, + "<Rotation>": -10.353990, + "<SchemaVersion>": -9.255377, + "<Section>": -7.956094, + "<ServiceConfiguration>": -9.255377, + "<ServiceDefinition>": -9.660843, + "<Setting>": -9.255377, + "<ShowByDefault>": -10.353990, + "<SolutionRoot>": -10.353990, + "<SourceFileRebasing>": -10.353990, + "<SpecificVersion>": -10.353990, + "<StackPanel>": -10.353990, + "<StartDevelopmentStorage>": -10.353990, + "<StartupObject>": -10.353990, + "<SubSystem>": -9.660843, + "<SubType>": -9.660843, + "<SupportedFramework>": -10.353990, + "<Switch>": -10.353990, + "<Synthetic>": -7.358257, + "<TEI>": -10.353990, + "<TS>": -9.255377, + "<TableColumn>": -9.255377, + "<TableView>": -10.353990, + "<TabsToSpaces>": -10.353990, + "<Tailcalls>": -9.660843, + "<Target>": -7.645940, + "<TargetFSharpCoreVersion>": -10.353990, + "<TargetFrameworkVersion>": -8.744552, + "<TargetOsAndVersion>": -10.353990, + "<TargetPlatformIdentifier>": -10.353990, + "<TargetPlatformMinVersion>": -10.353990, + "<TargetPlatformVersion>": -10.353990, + "<TemplateContent>": -10.353990, + "<TemplateData>": -10.353990, + "<TemplateID>": -10.353990, + "<Text>": -8.967695, + "<TextInput>": -10.353990, + "<TextStylePolicy>": -10.353990, + "<TopFrameBackground>": -10.353990, + "<TutorialName>": -10.353990, + "<TutorialPage>": -10.353990, + "<TutorialState>": -10.353990, + "<Type>": -7.714932, + "<UniqueIdentifier>": -9.255377, + "<UseDebugLibraries>": -9.660843, + "<UseDotNetNativeToolchain>": -9.255377, + "<UsingTask>": -9.660843, + "<VSTemplate>": -10.353990, + "<VersionInfo>": -10.353990, + "<VersionMajor>": -10.353990, + "<VersionMinor>": -10.353990, + "<VersionPatch>": -10.353990, + "<VersionPreRelease>": -10.353990, + "<VerticalText>": -8.562230, + "<VisualStudioVersion>": -10.353990, + "<WarnFilter>": -10.353990, + "<WarningLevel>": -8.156765, + "<WebConfig>": -10.353990, + "<WebElementEntity>": -10.353990, + "<WebRole>": -10.353990, + "<When>": -10.353990, + "<WhileKeyboardVisible>": -10.353990, + "<WhilePressed>": -10.353990, + "<WhileTrue>": -10.353990, + "<WixTargetsPath>": -10.353990, + "<WizardData>": -10.353990, + "<WizardExtension>": -9.660843, + "<Workflow>": -10.353990, + "<XmlPoke>": -10.353990, + "<Zip>": -10.353990, + "<ZipFiles>": -10.353990, + "<a>": -8.967695, + "<action>": -8.744552, + "<actions>": -10.353990, + "<active>": -6.164335, + "<additionalInput>": -8.967695, + "<alerts>": -10.353990, + "<anchor>": -10.353990, + "<argument>": -8.967695, + "<arguments>": -8.967695, + "<assembly>": -10.353990, + "<assert>": -7.058153, + "<assets>": -10.353990, + "<attDef>": -7.714932, + "<attList>": -8.156765, + "<author>": -10.353990, + "<authors>": -10.353990, + "<autodiscovery>": -8.744552, + "<autoresizingMask>": -10.353990, + "<availability>": -10.353990, + "<background>": -8.744552, + "<backgrounds>": -10.353990, + "<bibliography>": -10.353990, + "<body>": -8.967695, + "<bottom>": -10.353990, + "<br>": -8.744552, + "<buildOutputProvider>": -6.665110, + "<builder>": -9.660843, + "<c>": -10.353990, + "<categories>": -9.660843, + "<category>": -8.744552, + "<ccEmails>": -10.353990, + "<cconfiguration>": -9.660843, + "<center>": -10.353990, + "<characteristic>": -10.353990, + "<characteristics>": -10.353990, + "<children>": -10.353990, + "<choose>": -6.276452, + "<citation>": -10.353990, + "<classRef>": -8.562230, + "<classSpec>": -7.309467, + "<codestring>": -8.744552, + "<color>": -10.353990, + "<columns>": -10.353990, + "<component>": -10.353990, + "<conf>": -9.660843, + "<configuration>": -9.255377, + "<configurations>": -10.353990, + "<connections>": -10.353990, + "<constant>": -6.482789, + "<constants>": -10.353990, + "<constraint>": -8.408080, + "<constraintSpec>": -8.408080, + "<content>": -10.353990, + "<context>": -9.255377, + "<copyright/>": -10.353990, + "<copyright>": -10.353990, + "<cproject>": -10.353990, + "<customObject>": -10.353990, + "<data>": -6.798642, + "<datafile>": -6.952792, + "<datafiles>": -8.562230, + "<date-part>": -5.843130, + "<date>": -6.798642, + "<dc:format>": -10.353990, + "<decimal>": -9.660843, + "<dependencies>": -9.255377, + "<dependency>": -8.744552, + "<dependencyList>": -10.353990, + "<depth>": -10.353990, + "<desc>": -5.865353, + "<description>": -8.408080, + "<descriptor>": -9.255377, + "<descriptorBase>": -9.255377, + "<directory>": -9.660843, + "<disabledValue>": -10.353990, + "<displayName>": -10.353990, + "<div>": -8.156765, + "<dllentry>": -9.660843, + "<dllmap>": -10.353990, + "<doc>": -10.353990, + "<docAuthor>": -9.255377, + "<docDate>": -10.353990, + "<docTitle>": -10.353990, + "<document>": -9.660843, + "<ea:build>": -9.660843, + "<ea:plugin>": -9.660843, + "<ea:property>": -10.353990, + "<echo>": -9.660843, + "<edge>": -7.581401, + "<elementRef>": -6.592790, + "<elementSpec>": -5.617791, + "<else-if>": -7.021785, + "<else>": -6.743072, + "<email>": -10.353990, + "<enabledValue>": -10.353990, + "<entry>": -8.744552, + "<event>": -8.744552, + "<events>": -10.353990, + "<exception>": -10.353990, + "<exclude-output>": -10.353990, + "<exetype>": -8.744552, + "<exif:ColorSpace>": -10.353990, + "<exif:PixelXDimension>": -10.353990, + "<exif:PixelYDimension>": -10.353990, + "<exists>": -6.952792, + "<exportAction>": -6.952792, + "<exportDir>": -6.952792, + "<extension>": -7.869083, + "<extensions>": -9.660843, + "<externalSettings/>": -9.660843, + "<file>": -10.353990, + "<fileDesc>": -10.353990, + "<filename>": -6.952792, + "<files>": -10.353990, + "<filter>": -10.353990, + "<folderInfo>": -9.660843, + "<font>": -7.218496, + "<forceType>": -10.353990, + "<forceTypes/>": -10.353990, + "<forceTypes>": -10.353990, + "<formula>": -10.353990, + "<freeData>": -6.952792, + "<front>": -10.353990, + "<fullName>": -9.660843, + "<functionname>": -8.744552, + "<gameSystem>": -10.353990, + "<gi>": -9.255377, + "<gml:Point>": -9.660843, + "<gml:pos>": -9.660843, + "<group>": -9.660843, + "<head>": -7.869083, + "<help>": -10.353990, + "<hi>": -8.274548, + "<hook>": -10.353990, + "<id>": -8.408080, + "<if>": -6.276452, + "<image>": -6.952792, + "<include>": -9.255377, + "<info>": -9.660843, + "<inputType>": -8.274548, + "<isnot>": -8.744552, + "<isquestion>": -8.744552, + "<item>": -9.660843, + "<ivy-module>": -10.353990, + "<key>": -8.744552, + "<kind>": -8.156765, + "<label>": -8.408080, + "<layout>": -9.660843, + "<let>": -7.789040, + "<libid>": -8.744552, + "<licence>": -9.660843, + "<license>": -10.353990, + "<licenseUrl>": -10.353990, + "<link>": -9.660843, + "<list>": -10.353990, + "<listOptionValue>": -8.967695, + "<locale>": -10.353990, + "<location>": -7.581401, + "<m:ns>": -8.744552, + "<macro>": -7.175936, + "<map>": -10.353990, + "<maskName>": -10.353990, + "<media>": -8.967695, + "<member>": -5.541805, + "<members>": -10.353990, + "<message>": -7.262947, + "<metadata>": -10.353990, + "<mj-all>": -10.353990, + "<mj-attributes>": -10.353990, + "<mj-body>": -9.660843, + "<mj-button>": -7.714932, + "<mj-column>": -6.525348, + "<mj-container>": -9.660843, + "<mj-divider>": -9.660843, + "<mj-font>": -9.660843, + "<mj-head>": -10.353990, + "<mj-image>": -7.021785, + "<mj-inline-links>": -10.353990, + "<mj-link>": -9.255377, + "<mj-navbar>": -10.353990, + "<mj-section>": -7.095893, + "<mj-social>": -10.353990, + "<mj-text>": -6.665110, + "<mj-title>": -10.353990, + "<mjml>": -9.660843, + "<model>": -5.218191, + "<modelSequence>": -8.744552, + "<modifiers/>": -10.353990, + "<module>": -10.353990, + "<moduleRef>": -9.660843, + "<multiple>": -10.353990, + "<name/>": -9.255377, + "<name>": -6.328638, + "<names>": -7.058153, + "<ncl>": -9.255377, + "<node>": -7.218496, + "<ns>": -8.408080, + "<number>": -7.956094, + "<object>": -7.309467, + "<objects>": -8.408080, + "<openAction>": -6.665110, + "<option>": -7.581401, + "<orderEntry>": -9.255377, + "<outlet>": -10.353990, + "<overwrite>": -6.952792, + "<owners>": -10.353990, + "<p>": -6.310938, + "<package>": -7.358257, + "<packages>": -10.353990, + "<param>": -5.865353, + "<parentCategory>": -9.660843, + "<parentName>": -10.353990, + "<parser>": -5.971963, + "<paths>": -10.353990, + "<pattern>": -9.660843, + "<persistent>": -10.353990, + "<phase>": -8.967695, + "<photoshop:ColorMode>": -10.353990, + "<photoshop:ICCProfile>": -10.353990, + "<phpunit>": -10.353990, + "<placeholder>": -9.660843, + "<plugIn>": -9.660843, + "<plugin>": -10.353990, + "<policies>": -10.353990, + "<policy>": -10.353990, + "<policyDefinitionResources>": -10.353990, + "<policyDefinitions>": -10.353990, + "<policyNamespaces>": -10.353990, + "<port>": -9.255377, + "<profile>": -6.665110, + "<profileType>": -10.353990, + "<profileTypes>": -10.353990, + "<project>": -9.660843, + "<projectUrl>": -10.353990, + "<property>": -9.660843, + "<protected>": -10.353990, + "<publicationStmt>": -10.353990, + "<publisher>": -10.353990, + "<rdf:Description>": -10.353990, + "<rdf:RDF>": -10.353990, + "<rdf:Seq>": -10.353990, + "<rdf:li>": -10.353990, + "<rect>": -10.353990, + "<ref>": -10.353990, + "<region>": -9.255377, + "<regionBase>": -9.255377, + "<relative>": -8.744552, + "<removeEnd>": -6.952792, + "<rendition>": -5.719261, + "<report>": -7.581401, + "<requireLicenseAcceptance>": -10.353990, + "<resheader>": -8.408080, + "<resources>": -9.660843, + "<returns>": -6.770471, + "<rights>": -10.353990, + "<room>": -9.660843, + "<rooms>": -10.353990, + "<root>": -10.353990, + "<rtf>": -10.353990, + "<rule>": -8.156765, + "<rules>": -10.353990, + "<runAction>": -6.665110, + "<scannerConfigBuildInfo>": -8.967695, + "<scannerInfoProvider>": -6.665110, + "<scenes/>": -10.353990, + "<schema>": -9.255377, + "<schemaSpec>": -10.353990, + "<script>": -5.984542, + "<scripts>": -7.358257, + "<selectorCollection>": -10.353990, + "<senderType>": -10.353990, + "<shader>": -9.660843, + "<shaders>": -9.660843, + "<single>": -10.353990, + "<size>": -6.952792, + "<solid>": -10.353990, + "<sort>": -10.353990, + "<sound>": -8.967695, + "<sounds>": -10.353990, + "<source>": -7.262947, + "<sourceDesc>": -10.353990, + "<sourceEntries>": -9.660843, + "<sourceFolder>": -9.660843, + "<span>": -9.660843, + "<specGrp>": -8.274548, + "<specGrpRef>": -8.156765, + "<sprite>": -7.789040, + "<spriteName>": -10.353990, + "<sprites>": -9.660843, + "<stEvt:action>": -10.353990, + "<stEvt:instanceID>": -10.353990, + "<stEvt:softwareAgent>": -10.353990, + "<stEvt:when>": -10.353990, + "<storageModule>": -7.714932, + "<store>": -6.952792, + "<string>": -8.408080, + "<stringTable>": -10.353990, + "<strong>": -8.744552, + "<style-options>": -10.353990, + "<style>": -10.353990, + "<substitute>": -8.744552, + "<summary>": -5.525676, + "<supportedOn>": -10.353990, + "<target>": -9.255377, + "<targetPlatform>": -9.660843, + "<teiHeader>": -10.353990, + "<template>": -10.353990, + "<term>": -7.409551, + "<terms>": -10.353990, + "<testsuite>": -10.353990, + "<testsuites>": -10.353990, + "<text>": -4.573246, + "<tiff:Orientation>": -10.353990, + "<tiff:ResolutionUnit>": -10.353990, + "<tiff:XResolution>": -10.353990, + "<tiff:YResolution>": -10.353990, + "<tile>": -6.952792, + "<tileset>": -10.353990, + "<title-short>": -10.353990, + "<title>": -8.744552, + "<titlePage>": -10.353990, + "<titlePart>": -10.353990, + "<titleStmt>": -10.353990, + "<tool>": -7.869083, + "<toolChain>": -9.660843, + "<translation>": -7.262947, + "<triggerType>": -10.353990, + "<type>": -10.353990, + "<typeparam>": -7.869083, + "<updated>": -10.353990, + "<url>": -10.353990, + "<useapplyto>": -8.744552, + "<userelative>": -8.744552, + "<using>": -10.353990, + "<valItem>": -5.935149, + "<valList>": -8.408080, + "<value-of>": -6.770471, + "<value>": -8.274548, + "<vendor>": -10.353990, + "<version>": -10.353990, + "<visible>": -10.353990, + "<whitelist>": -10.353990, + "<whoName>": -8.744552, + "<window>": -10.353990, + "<x:call>": -10.353990, + "<x:description>": -10.353990, + "<x:expect>": -10.353990, + "<x:param>": -10.353990, + "<x:scenario>": -10.353990, + "<x:xmpmeta>": -10.353990, + "<xmp:CreateDate>": -10.353990, + "<xmp:CreatorTool>": -10.353990, + "<xmp:MetadataDate>": -10.353990, + "<xmp:ModifyDate>": -10.353990, + "<xmpMM:DocumentID>": -10.353990, + "<xmpMM:History>": -10.353990, + "<xmpMM:InstanceID>": -10.353990, + "<xmpMM:OriginalDocumentID>": -10.353990, + "<xsd:attribute>": -8.967695, + "<xsd:choice>": -10.353990, + "<xsd:complexType>": -9.255377, + "<xsd:element>": -8.562230, + "<xsd:schema>": -10.353990, + "<xsd:sequence>": -9.660843, + "<xsl:function>": -10.353990, + "<xsl:include>": -10.353990, + "<xsl:param>": -10.353990, + "<xsl:sequence>": -10.353990, + "<xsl:value-of>": -9.255377, + "<xsl:variable>": -10.353990, + "=": -6.402746, + ">": -6.888254, + "?": -10.353990, + "@align": -10.353990, + "A": -6.716404, + "A/": -10.353990, + "AAAAAASUVORK": -10.353990, + "AAAAABJRU": -10.353990, + "AAAAAElFTkSuQmCC": -9.660843, + "AAAAASUVORK": -9.255377, + "AAD": -10.353990, + "AB": -10.353990, + "ABAD": -10.353990, + "ABNZRANiOw": -10.353990, + "ABY": -10.353990, + "AC": -7.956094, + "ACvKyUk": -10.353990, + "AE": -10.353990, + "AFhTiBlAzABCvEUt": -10.353990, + "AH": -6.888254, + "AHOfoP": -10.353990, + "AHTQnuq/EpedjfCjOU": -10.353990, + "AHxIzDcNxSb": -10.353990, + "AINp": -10.353990, + "AJYyUM": -10.353990, + "AKwwNk": -10.353990, + "ALDER": -10.353990, + "ALHjBgFCECH": -10.353990, + "ANDERSON": -10.353990, + "ANOTHER_KEY": -10.353990, + "APFOMI": -10.353990, + "APfnVRznOjVXwmmZl/upfrfNUtVwAOBqFKxVC/c": -10.353990, + "AQ": -9.660843, + "AQMKGDI": -10.353990, + "AQfg/ug": -10.353990, + "ARFaQyrqz": -10.353990, + "ARM": -9.660843, + "AS": -10.353990, + "ASZt": -10.353990, + "ATTLIST": -9.660843, + "ATgvlQ/F": -10.353990, + "AUT": -10.353990, + "AUcp": -10.353990, + "AVlWoqYpVKPv": -10.353990, + "AWem": -10.353990, + "AXRtF": -10.353990, + "AXc": -10.353990, + "AZCSXu": -10.353990, + "AZPLMmQ": -10.353990, + "Aa": -10.353990, + "AbapkqBjVPJSc": -10.353990, + "Abstractness": -10.353990, + "Active=": -9.255377, + "Ad": -10.353990, + "AddRange": -9.660843, + "Adobe": -9.255377, + "AdwmhUhAp": -10.353990, + "Aenean": -8.562230, + "AfUc": -10.353990, + "Afr/": -10.353990, + "Agp": -10.353990, + "AhfFda": -10.353990, + "AiEBMTFTUVFRUVT": -10.353990, + "AiqfqIHZUoznbTfURwYA": -10.353990, + "AjQb": -10.353990, + "AkBgKtYYWHYAEgyENAHiY": -10.353990, + "AkT": -10.353990, + "AkmIky": -10.353990, + "AkqTsdFiKTLAfUvYI": -10.353990, + "Al": -10.353990, + "AlHZSrgwEkFAWFjxSyNe": -10.353990, + "Alert": -9.660843, + "Alice": -8.156765, + "Alignment=": -7.714932, + "Aliquam": -8.744552, + "All": -10.353990, + "AmAaEzqhq": -10.353990, + "An": -7.095893, + "AnYNENO": -10.353990, + "Analysis": -10.353990, + "Anderson": -10.353990, + "Another": -9.255377, + "AnyCPU": -7.262947, + "AoJqPdNrZA": -10.353990, + "ApO": -10.353990, + "AppName=": -10.353990, + "Application": -8.744552, + "Application.Designer.vb": -10.353990, + "Application.Fields": -10.353990, + "Application.myapp": -10.353990, + "ApplicationProject": -9.660843, + "Apr.": -10.353990, + "AqdW": -10.353990, + "Archiver": -9.660843, + "Arial": -8.051405, + "ArtifactsDir": -10.353990, + "Assembler": -9.660843, + "Assemblies": -8.744552, + "AssemblyInfo": -10.353990, + "AssemblyName": -10.353990, + "AssemblyName=": -9.660843, + "Association": -10.353990, + "AsyncGet": -10.353990, + "AtHddI": -10.353990, + "Attempts": -10.353990, + "Attribute": -10.353990, + "Attribution": -9.660843, + "Aug.": -10.353990, + "Author=": -10.353990, + "AwGd": -10.353990, + "AwziG": -10.353990, + "Ay": -10.353990, + "AyDux": -10.353990, + "Ayj": -10.353990, + "AykpfCcbzv": -10.353990, + "Azd": -10.353990, + "Azure": -9.660843, + "B": -8.051405, + "BACKPACK": -9.660843, + "BAQzkc/Yiwa": -10.353990, + "BB": -10.353990, + "BBF": -10.353990, + "BD": -10.353990, + "BE": -10.353990, + "BEERgmhJvAntKLwLtJ": -10.353990, + "BETp": -10.353990, + "BEXKairlYSrFbiL": -10.353990, + "BEYOND": -10.353990, + "BF": -8.967695, + "BFkfl": -10.353990, + "BHQfJdA": -10.353990, + "BHg/": -10.353990, + "BINARY": -9.255377, + "BJB": -10.353990, + "BKeWMTHEAAAAASUVORK": -10.353990, + "BLAKE": -10.353990, + "BNaj": -10.353990, + "BOD": -10.353990, + "BOOLEAN": -9.255377, + "BP": -10.353990, + "BRMHZxrN": -10.353990, + "BSD": -9.660843, + "BT": -9.660843, + "BU": -10.353990, + "BUY": -8.051405, + "BWhS": -10.353990, + "BY": -9.660843, + "BZKTz": -10.353990, + "BZTHTUEApqXA": -10.353990, + "BZbsTlEFENAOUGToAAKuVkF": -10.353990, + "BZwrcT": -10.353990, + "BaV": -10.353990, + "Background": -10.353990, + "Background=": -10.353990, + "Bb": -10.353990, + "BcB": -10.353990, + "BcLIHxOwJwKsGn": -10.353990, + "BeWrUMuH": -10.353990, + "BeZ": -10.353990, + "Beach": -10.353990, + "BfZOgtUvT": -10.353990, + "Bh/MYCpnCu/etFOCtqntXs": -10.353990, + "Binary": -10.353990, + "BindTo": -10.353990, + "Bit": -8.967695, + "BiznjmAJ": -10.353990, + "Bkyx": -10.353990, + "BlD": -10.353990, + "Block": -10.353990, + "Blue": -10.353990, + "BngynDNjR/": -10.353990, + "BorderPane": -9.660843, + "Bot": -9.660843, + "Bowerbird.Website": -10.353990, + "BpMhFh": -10.353990, + "BpjkTw": -10.353990, + "Brian": -10.353990, + "Build": -10.353990, + "BuildFileToCompareWith=": -9.660843, + "BuildMode=": -9.660843, + "BuildNumber": -10.353990, + "Builder": -9.660843, + "But": -10.353990, + "Bv": -10.353990, + "BwZFjJ/": -10.353990, + "ByFBSUsgwTH": -10.353990, + "ByIhoqOjj": -10.353990, + "C": -7.021785, + "C/": -10.353990, + "C/a": -10.353990, + "C3": -10.353990, + "CAMDEN": -10.353990, + "CAP": -10.353990, + "CAiTht": -10.353990, + "CAnQcpC": -10.353990, + "CC": -8.744552, + "CCBV": -10.353990, + "CENTER": -9.660843, + "CFIdOZl/f": -10.353990, + "CGJxYdmTeSQK": -10.353990, + "CHESTERK": -10.353990, + "CHOICE": -10.353990, + "CHhUN": -10.353990, + "CIAGxpAiSIkiKmKhAIBD": -10.353990, + "CIARt": -10.353990, + "CITbW": -10.353990, + "CIaRRWE": -10.353990, + "CIqj": -10.353990, + "CJSyCb": -10.353990, + "CKoMja": -10.353990, + "CKwoXU": -10.353990, + "CMSf": -10.353990, + "CMbdI": -10.353990, + "CMpxMkRTfq": -10.353990, + "COLLECTION": -10.353990, + "COLOR=": -7.218496, + "COWNDkOiwzABEH": -10.353990, + "CPJP": -10.353990, + "CPU": -10.353990, + "CQL": -10.353990, + "CQLBhEhI": -10.353990, + "CQMWKNfN": -10.353990, + "CREATED=": -7.218496, + "CRHgschwPGQwZq": -10.353990, + "CRykv/BD": -10.353990, + "CSharp": -9.660843, + "CTAESWG": -10.353990, + "CTEsEAZI": -10.353990, + "CTwKKPh": -10.353990, + "CURRENCIES": -10.353990, + "CUV/UfX": -10.353990, + "CUi": -10.353990, + "CVI": -10.353990, + "CXSejzLweCFdrHpxwd": -10.353990, + "CXdfLj": -10.353990, + "CYII": -7.789040, + "CZcI": -10.353990, + "Call": -10.353990, + "Case": -9.660843, + "CbXcT": -10.353990, + "CcYDOp": -10.353990, + "Cci": -10.353990, + "CdMl": -10.353990, + "Cdsn": -10.353990, + "Cdsrihynd": -10.353990, + "Cgxy": -10.353990, + "ChDMV": -10.353990, + "Change": -9.660843, + "ChangeTrackingEnabled": -9.660843, + "Changed": -8.967695, + "Changed.": -10.353990, + "Changing": -8.744552, + "Changing/Changed": -10.353990, + "Chv": -10.353990, + "CiZYdOx": -10.353990, + "CkEwP": -10.353990, + "CkrO": -10.353990, + "Class": -10.353990, + "Classes": -10.353990, + "Clc": -10.353990, + "CmtNKszQTkv": -10.353990, + "Collection.Select": -10.353990, + "Color=": -8.274548, + "Colour": -10.353990, + "ColumnCount=": -10.353990, + "Comment=": -10.353990, + "Common": -8.562230, + "Commons": -9.660843, + "Compiler": -8.967695, + "Conceptually": -10.353990, + "Concurrency": -10.353990, + "Condition=": -5.923173, + "Configs": -10.353990, + "Configuration": -7.218496, + "Consider": -9.660843, + "Console": -9.255377, + "Consortium": -9.660843, + "Consortium.": -10.353990, + "Constructor": -9.660843, + "Constructs": -8.967695, + "Converts": -9.660843, + "Cooking": -9.660843, + "Copyright": -10.353990, + "Core": -10.353990, + "Count.": -8.967695, + "Covariant": -10.353990, + "CpBDtlBGMCrepTdSfjCFnZgpIA/": -10.353990, + "CqlmZiaeaKICmChBlCEM": -10.353990, + "Cr": -10.353990, + "Create": -9.660843, + "Created": -9.660843, + "Creates": -9.255377, + "Creative": -9.660843, + "CrkMNJ": -10.353990, + "CsQJANgoSKJosgAdGkFYgKxFcgKlZUnHn": -10.353990, + "CslOmoqiV": -10.353990, + "Culture": -8.967695, + "Culture=": -9.255377, + "Current": -10.353990, + "CurrentBuildDateStamp": -9.660843, + "CurrentBuildDir": -9.255377, + "CurrentProject": -10.353990, + "CurrentUser": -10.353990, + "CxC": -10.353990, + "CyXMw": -10.353990, + "D": -7.409551, + "D.gml": -10.353990, + "DA": -9.660843, + "DBzumGHJAQ": -10.353990, + "DCiF": -10.353990, + "DDY": -10.353990, + "DEBUG": -8.967695, + "DF": -10.353990, + "DGcYROKR": -10.353990, + "DHgTsDrjqEfzWhZz": -10.353990, + "DICTIONARY": -9.255377, + "DISCOVER": -10.353990, + "DInstances.gml": -10.353990, + "DK": -10.353990, + "DLYhwPU": -10.353990, + "DLwIOYb": -10.353990, + "DMBDsp/hHDxQcOFBwwMAgwMDEIKAgoCAgUqBhqH": -10.353990, + "DMTyFYXHyPW/XVDiQt": -10.353990, + "DO": -10.353990, + "DOUBLE": -9.255377, + "DPLsfvqmLbdDuCYTACnMrPzlUKPABgfPBXfeBXvb": -10.353990, + "DPVhouJ": -10.353990, + "DQAw": -10.353990, + "DQQ": -10.353990, + "DS": -10.353990, + "DSound.gml": -9.660843, + "DTes": -10.353990, + "DU": -9.660843, + "DUEMgWEkIGATT": -10.353990, + "DVXz": -10.353990, + "Date=": -10.353990, + "DcefYT": -10.353990, + "DclzSa": -10.353990, + "Debug": -7.175936, + "Dec.": -10.353990, + "Default": -10.353990, + "DefaultTargets=": -7.869083, + "DeferredScheduler": -10.353990, + "Degrees=": -10.353990, + "Delegate": -10.353990, + "Delivered": -10.353990, + "Dependencies": -9.660843, + "Dependency": -10.353990, + "DependsOnTargets=": -9.660843, + "Designer": -8.744552, + "Destination=": -8.562230, + "DestinationFiles=": -9.255377, + "Determins": -9.660843, + "Deus": -9.660843, + "Device": -10.353990, + "DgTM": -10.353990, + "DhckMiKMQW/": -10.353990, + "DhsF": -10.353990, + "DiIOZYTzzEVxFMAk": -10.353990, + "DiNd": -10.353990, + "Directories=": -9.255377, + "Directory": -10.353990, + "Disable": -10.353990, + "DisableFastUpToDateCheck": -10.353990, + "Disabled": -10.353990, + "Discard": -9.660843, + "Dispatcher": -9.255377, + "DispatcherScheduler": -10.353990, + "DisplayList=": -9.660843, + "DisplayName=": -9.660843, + "DisplaySelectionView=": -9.660843, + "DisplayStat=": -9.660843, + "Distance": -10.353990, + "Distributed": -10.353990, + "DjJJwtwLYNMEg": -10.353990, + "DkRaBTPW": -10.353990, + "Dkr": -10.353990, + "Dkw": -10.353990, + "DmOOBORacaakZwjQt": -10.353990, + "DmgAAAABJRU": -10.353990, + "DoJCqsxFsr": -10.353990, + "Dock=": -10.353990, + "Donec": -9.660843, + "DqhhkHITU": -10.353990, + "Drawing": -9.660843, + "DtEqRriJh": -10.353990, + "DuBGdhSCY": -10.353990, + "Duration=": -8.744552, + "During": -10.353990, + "Dvs/yGQU": -10.353990, + "DwN": -10.353990, + "DwohPN": -10.353990, + "DxvyeEhGkL": -10.353990, + "Dyczrd": -10.353990, + "E": -7.218496, + "EAE8E5": -10.353990, + "EAOW": -10.353990, + "EAt": -10.353990, + "EB": -10.353990, + "EBAsrP": -10.353990, + "EBFB": -10.353990, + "EBJxplu": -10.353990, + "EBPJRG": -10.353990, + "ECEq": -10.353990, + "ECNTy": -10.353990, + "EDSCgB": -10.353990, + "EDTVProfile": -10.353990, + "EEBO": -8.744552, + "EED": -10.353990, + "EEDC": -10.353990, + "EF": -10.353990, + "EGa": -10.353990, + "EHI": -10.353990, + "EI": -10.353990, + "EJEtETL": -10.353990, + "EKMZ": -10.353990, + "ELARmTvRa": -10.353990, + "ELacEEAFzuQCqmDMD": -10.353990, + "ELvd": -10.353990, + "ENRICH": -10.353990, + "ENTITY": -8.744552, + "ENVRG": -10.353990, + "EQAMVMZQzANAlQcUfvUpePBlrRgUD": -10.353990, + "EQEC": -10.353990, + "EQPKPgPU": -10.353990, + "EQVR": -8.051405, + "ESfRdb": -10.353990, + "EU": -10.353990, + "EXAMPLE": -10.353990, + "EXPRESS": -10.353990, + "EYRiPlPfdooQhMJ": -10.353990, + "Each": -10.353990, + "Ead": -10.353990, + "EbBnLm": -10.353990, + "Edge": -10.353990, + "EdgeNavigation": -10.353990, + "EdgeNavigator": -10.353990, + "EgDRNmk": -10.353990, + "EgSjaQs": -10.353990, + "EhtMdsFIHujZ": -10.353990, + "EhuEMI": -10.353990, + "Ehul": -10.353990, + "Ei": -10.353990, + "Elements": -10.353990, + "Eli": -10.353990, + "Email": -10.353990, + "EnNR": -10.353990, + "Enabled=": -7.956094, + "Enables": -9.660843, + "Encoding": -9.660843, + "England": -9.255377, + "English": -9.660843, + "EnrjHnjB": -10.353990, + "Enrollment": -8.744552, + "Ensure": -10.353990, + "Entry": -9.660843, + "Eo": -10.353990, + "Epidoc": -10.353990, + "EqhJHfMGbAsYdIgORkLjFUaNXENpCcE": -10.353990, + "ErZYNvvLeEplAU": -10.353990, + "Eric": -10.353990, + "ErkJggg": -8.744552, + "EsFChVpZ": -10.353990, + "EsLye": -10.353990, + "Esc": -9.660843, + "Estate": -10.353990, + "Et": -10.353990, + "Ets": -10.353990, + "EuluS": -10.353990, + "European": -10.353990, + "Evaluates": -10.353990, + "Evi": -10.353990, + "EvzuinJYiBfBty": -10.353990, + "Ex": -10.353990, + "Example": -10.353990, + "Exception": -10.353990, + "Exclude=": -9.660843, + "Exe": -8.967695, + "Expression": -8.408080, + "Ez": -10.353990, + "F": -8.967695, + "F#": -10.353990, + "F44E3C": -9.255377, + "FFFFFF": -7.714932, + "FIXED": -10.353990, + "FLORAL": -10.353990, + "FPI": -10.353990, + "FPSController_alarm": -9.660843, + "FPSController_create": -10.353990, + "FPSController_create.gml": -10.353990, + "FPSController_step": -10.353990, + "FPSController_step.gml": -10.353990, + "FREE": -10.353990, + "FSharp": -9.660843, + "F_Speed.gml": -10.353990, + "Fabric": -8.967695, + "False": -9.660843, + "Feb.": -10.353990, + "Fields": -10.353990, + "FileFormatDefault": -10.353990, + "Files": -8.051405, + "Files=": -9.255377, + "Fires": -7.714932, + "FlEjmDpA": -10.353990, + "Flags=": -10.353990, + "Foakes": -10.353990, + "For": -9.255377, + "FrakturType": -10.353990, + "Framework": -8.408080, + "FreeMedForms": -10.353990, + "FreeMedForms.": -10.353990, + "Freepik": -10.353990, + "FromPath=": -10.353990, + "Functions": -9.255377, + "FxD": -10.353990, + "G": -8.274548, + "G/": -10.353990, + "GBlnZkG": -10.353990, + "GCC": -9.660843, + "GGDLmu/htRhtEBBruGRgqi": -10.353990, + "GMO_colorFilter_shader.shader": -10.353990, + "GMO_disableZBuffer.gml": -10.353990, + "GMO_draw": -10.353990, + "GMO_drawCameraSurface.gml": -10.353990, + "GMO_enableZBuffer.gml": -10.353990, + "GMO_followObject.gml": -10.353990, + "GMO_getCameraAngle.gml": -10.353990, + "GMO_getCameraMode.gml": -10.353990, + "GMO_getCameraSurface.gml": -10.353990, + "GMO_getCameraZFar.gml": -10.353990, + "GMO_getCameraZNear.gml": -10.353990, + "GMO_getIPD": -9.255377, + "GMO_getIPD.gml": -10.353990, + "GMO_getResolutionHeight": -10.353990, + "GMO_getResolutionHeight.gml": -10.353990, + "GMO_getResolutionWidth": -10.353990, + "GMO_getResolutionWidth.gml": -10.353990, + "GMO_getSurface.gml": -10.353990, + "GMO_getUse": -10.353990, + "GMO_getVersion.gml": -10.353990, + "GMO_getVersionString": -10.353990, + "GMO_getVersionString.gml": -10.353990, + "GMO_hmdwarp_shader.shader": -10.353990, + "GMO_init.gml": -10.353990, + "GMO_initCamera.gml": -10.353990, + "GMO_initDefaults.gml": -10.353990, + "GMO_initShaders.gml": -10.353990, + "GMO_initSurfaces.gml": -10.353990, + "GMO_renderAnaglyph.gml": -10.353990, + "GMO_renderCamera.gml": -10.353990, + "GMO_renderOculus.gml": -10.353990, + "GMO_renderRegular.gml": -10.353990, + "GMO_resetSurfaces.gml": -10.353990, + "GMO_setCameraAngle.gml": -10.353990, + "GMO_setCameraMode.gml": -10.353990, + "GMO_setCameraRange.gml": -10.353990, + "GMO_setIPD": -9.660843, + "GMO_setIPD.gml": -10.353990, + "GMO_setResolution.gml": -10.353990, + "GMO_setUse": -10.353990, + "GMO_updateListener.gml": -10.353990, + "GMOculus.dll": -9.660843, + "GPLv": -10.353990, + "GR_cmToPixel.gml": -10.353990, + "GR_init.gml": -10.353990, + "GR_meterToPixel.gml": -10.353990, + "GRlgqeqrk": -10.353990, + "GS": -10.353990, + "GScsqdxXrWUpBWzn": -10.353990, + "GSct": -10.353990, + "GUm": -10.353990, + "GV/W": -10.353990, + "GXD": -10.353990, + "GXSvZQnCKJOu": -10.353990, + "GXj/K": -10.353990, + "GZ": -10.353990, + "GZSWBMscVAJhjDDCTBYjAmOUTQfUysQ": -10.353990, + "Gales": -9.660843, + "GameSystem": -10.353990, + "GbA": -10.353990, + "Gd": -10.353990, + "GetFieldNameForProperty": -10.353990, + "GetFieldNameForPropertyNameFunc.": -10.353990, + "GgI": -10.353990, + "GgyQnqOl": -10.353990, + "GhB/pxvXNxBYq/": -10.353990, + "GhwkVwyFRABvKbEkKvfI": -10.353990, + "GiJXDaNvAXzsD": -10.353990, + "Given": -9.255377, + "GjFhB": -10.353990, + "GktTQOGSHcvMA": -10.353990, + "Gl": -10.353990, + "GlTjly": -10.353990, + "GlbfnRMDgTj": -10.353990, + "GmvtY": -10.353990, + "GoROT": -10.353990, + "God": -9.660843, + "GosOJ": -10.353990, + "Graph": -10.353990, + "Guidelines": -9.255377, + "GwlqLObCpk": -10.353990, + "Gx": -10.353990, + "GxIBDfvxeOE": -10.353990, + "Gy": -10.353990, + "Gyn": -10.353990, + "GzVqDFvljl": -10.353990, + "GzlyWGJcdEnEiIYHS": -10.353990, + "H": -7.645940, + "H/JQyloC/bHK": -10.353990, + "HAS_SENT_TIME_BIT": -9.660843, + "HB": -10.353990, + "HBgohM": -10.353990, + "HBocGoBIpyyoqQnSas": -10.353990, + "HBpLAxpiOZDGy": -10.353990, + "HCEKRIVMDKXuLDaGuOZwCp": -10.353990, + "HCsvaVn": -10.353990, + "HEMIkfvkoy": -10.353990, + "HEoFIoE": -10.353990, + "HFCI": -10.353990, + "HFGT": -10.353990, + "HISmQtElmJrCUnLlWbZsWlwbHiEhAkrCEXREMQJEVsAoKkiE": -10.353990, + "HITSP_C": -10.353990, + "HKWVdDDpKstJB": -10.353990, + "HPe": -10.353990, + "HPeZZtknXG": -10.353990, + "HQiyBoNdi": -10.353990, + "HSSvSkC": -10.353990, + "HTQKkuZByK": -10.353990, + "HVBRKyPmhPKkCCT": -10.353990, + "HWwc": -10.353990, + "HXDYIn": -10.353990, + "HYSkZYnnFjQ": -10.353990, + "HYSl": -10.353990, + "Haq": -10.353990, + "HcY": -10.353990, + "HctIlWNtqQfZM": -10.353990, + "HdWjfNUiYgtxtyiYDb": -10.353990, + "HeadOpts": -9.660843, + "Header": -9.660843, + "Header*": -10.353990, + "Height=": -8.051405, + "Hej": -10.353990, + "Helvetica": -8.051405, + "Hence": -10.353990, + "HgmWU": -10.353990, + "Hh": -9.660843, + "HiJH": -10.353990, + "High": -10.353990, + "HitTestMode=": -10.353990, + "HjH": -10.353990, + "HkSedItDym/ET": -10.353990, + "HlFFVCq": -10.353990, + "HlzMjxaXq": -10.353990, + "Hm": -10.353990, + "Hn": -10.353990, + "HnM": -10.353990, + "HnVVe": -10.353990, + "HoKyU": -10.353990, + "HonlgLg": -10.353990, + "House": -10.353990, + "However": -10.353990, + "HqlUFGq": -10.353990, + "HqqnFP": -10.353990, + "Hss/n": -10.353990, + "HtXHSclggU": -10.353990, + "Hugh": -9.660843, + "HvQfiMy": -10.353990, + "HwRvXDd": -10.353990, + "HwekVMxhzErtHWK": -10.353990, + "HxEp": -10.353990, + "HxtPZUAlk": -10.353990, + "I": -7.789040, + "I/Gk": -10.353990, + "I/KnVZfvMF": -10.353990, + "I/u": -10.353990, + "I18n": -9.255377, + "IACg": -10.353990, + "IAF": -10.353990, + "IAnGoU": -10.353990, + "IBRQ/": -10.353990, + "ICxeva/qqN": -10.353990, + "ID=": -7.218496, + "IDzBS": -10.353990, + "IEC": -10.353990, + "IECgwKDAwYlc": -10.353990, + "IEEwWeBdK": -10.353990, + "IEJxJ": -10.353990, + "IEnableLogger": -10.353990, + "IFAYamrzNvN": -10.353990, + "IFICItUkqgKiKiBSDCo": -10.353990, + "IFe": -10.353990, + "IGbE": -10.353990, + "IHd": -10.353990, + "IHofe": -10.353990, + "IJIDLNkg": -10.353990, + "IMPORTANT": -10.353990, + "IMTtCN": -10.353990, + "IMessageBus": -10.353990, + "IN": -10.353990, + "INCLUDE": -8.274548, + "INTEGER": -9.255377, + "INotifyPropertyChanged": -10.353990, + "INotifyPropertyChanged.": -10.353990, + "IObservedChange": -8.744552, + "IPC": -7.409551, + "IReactiveCollection": -9.255377, + "IReactiveNotifyPropertyChanged": -8.562230, + "IReactiveNotifyPropertyChanged.": -8.967695, + "ITALIC": -10.353990, + "ITCJA": -10.353990, + "ITXSUxwr": -10.353990, + "IVDaj": -10.353990, + "IVoIOZ": -10.353990, + "IXlhQKsuae": -10.353990, + "IYkXcRKiuBBgGvNUGfYF": -10.353990, + "IZC": -10.353990, + "Ib": -9.660843, + "IcLAu": -10.353990, + "Icon": -10.353990, + "Id": -10.353990, + "Id=": -8.967695, + "IdRePf": -10.353990, + "If": -8.156765, + "IfDqAfK": -10.353990, + "IfW": -10.353990, + "IhgrYnu": -10.353990, + "IiD": -10.353990, + "IkakcGplXcRE": -10.353990, + "IlF": -10.353990, + "IlFqxQzwX": -10.353990, + "IlJEoKoiiAksNiJSASimIlIACgwKDAoOB": -10.353990, + "Illegal": -10.353990, + "Illus.": -10.353990, + "Immediate": -10.353990, + "In": -8.051405, + "InUnitTestRunner": -10.353990, + "InapeW": -10.353990, + "Include=": -5.525676, + "Ingl": -9.660843, + "Inglaterra": -9.660843, + "Initiative": -9.660843, + "InsOaWQhGZTI": -10.353990, + "Instability": -10.353990, + "Installed": -10.353990, + "Interface": -10.353990, + "Interview": -10.353990, + "Invalidate": -9.660843, + "IoENAaotyr": -10.353990, + "IoabR": -10.353990, + "IpU": -10.353990, + "Ipsum": -8.274548, + "Iq": -10.353990, + "IqFlo": -10.353990, + "IqWLPcBapaiWiBEtVzTpjsVK": -10.353990, + "Ireland": -9.660843, + "Irlanda": -9.660843, + "Irto": -10.353990, + "IsAotleqCCDcUZ": -10.353990, + "IsCriticalRule=": -9.660843, + "IsDataSet": -10.353990, + "IslQELiLQiEAiFhKxYkTFiBURJ": -10.353990, + "Issues": -10.353990, + "It": -8.744552, + "Item": -8.744552, + "ItemChanged": -9.660843, + "ItemChanging": -9.660843, + "ItemChanging/ItemChanged.": -9.660843, + "ItemType=": -10.353990, + "ItlxjPpCIs": -10.353990, + "ItuenbbXPPueect": -10.353990, + "IuSNAAAAAElFTkSuQmCC": -10.353990, + "Iv": -10.353990, + "IvDERYR/": -10.353990, + "IxD": -10.353990, + "Ixuv": -10.353990, + "Izs": -10.353990, + "J": -7.956094, + "J//RyOiWy": -10.353990, + "J/m": -10.353990, + "JACKET": -10.353990, + "JAIwbIihZRkrAls": -10.353990, + "JCoc": -10.353990, + "JENSEN": -10.353990, + "JEOCIKPXFQGVmbvzI": -10.353990, + "JF": -10.353990, + "JFoH": -10.353990, + "JJKC": -10.353990, + "JK": -10.353990, + "JKM": -10.353990, + "JKoCLCsgkg": -10.353990, + "JLCnrXHAAAAAElFTkSuQmCC": -10.353990, + "JLRoddOBLv": -10.353990, + "JMg": -10.353990, + "JONES": -10.353990, + "JP/K": -10.353990, + "JRCXfeUiu": -10.353990, + "JRJZ": -10.353990, + "JRvClN": -10.353990, + "JSAyfWh": -10.353990, + "JSNJ": -10.353990, + "JUwGIlSd": -10.353990, + "JaRCbhCGhZwGVu": -10.353990, + "Jan.": -10.353990, + "January": -10.353990, + "JbAN": -10.353990, + "JbprAOCdh": -10.353990, + "Jbz": -10.353990, + "JcAAAAASUVORK": -9.660843, + "JcTzCEGH": -10.353990, + "JcaICWWtgAc": -10.353990, + "JdODL/ilx": -10.353990, + "JdWu": -10.353990, + "Je/XWD": -10.353990, + "JeRlbMZMf": -10.353990, + "JgwigMSJ": -10.353990, + "JifI": -10.353990, + "JkwMZqhrS": -10.353990, + "JlYXSJTquTcHmRC/MZVRN": -10.353990, + "JlbodjYZ": -10.353990, + "JnMeH": -10.353990, + "JnaxSV": -10.353990, + "JogLgCFNACM": -10.353990, + "JqHaU": -10.353990, + "JqqKt/O": -10.353990, + "JuNSNhQiPNK": -10.353990, + "July": -10.353990, + "June": -10.353990, + "JustMyCode": -9.660843, + "Jz": -9.255377, + "K": -8.156765, + "K/ZgByVm": -10.353990, + "KAAAAAElFTkSuQmCC": -10.353990, + "KBeJqP": -10.353990, + "KDJ": -10.353990, + "KDiltqllAdnwX": -10.353990, + "KEd": -10.353990, + "KFYzZNkWMNA": -10.353990, + "KFhZI": -10.353990, + "KFu": -10.353990, + "KGgoAAAANSUhEUgAAACAAAAAQCAYAAAB": -6.952792, + "KJGiFTO": -10.353990, + "KK": -10.353990, + "KKnmhjvvi": -10.353990, + "KKsFOrFJZAZdovslLP": -10.353990, + "KN/B": -10.353990, + "KNhtYlUhZKnueAeAC": -10.353990, + "KTAAAAABJRU": -10.353990, + "KWVRzJT/": -10.353990, + "KXJ": -10.353990, + "KXQ": -10.353990, + "KYA": -10.353990, + "KYRNukSmslomP": -10.353990, + "KYeJM": -10.353990, + "KcW": -10.353990, + "KdT/kd/": -10.353990, + "KeepHistoric=": -10.353990, + "KeepXmlFiles=": -10.353990, + "KfGj": -10.353990, + "KgYAZrHGw": -10.353990, + "Kind=": -10.353990, + "Kingdom": -9.660843, + "Kiq": -10.353990, + "Km/": -10.353990, + "KnUfJ": -10.353990, + "KpqydGpBAapTIF": -10.353990, + "KqxEIjHJvNufUpSfIGT": -10.353990, + "KriG": -10.353990, + "Krsi": -10.353990, + "KtV": -10.353990, + "Ktk": -10.353990, + "KtrKzEVlYikVgkshKLZMUmjBmBaAiChIomVJC": -10.353990, + "Ktyw": -10.353990, + "Kw": -10.353990, + "KwCMHNaVe": -10.353990, + "L": -10.353990, + "LABEL": -10.353990, + "LIST": -9.255377, + "LMukLu": -10.353990, + "LSPEtO": -10.353990, + "LaTeX": -10.353990, + "Label=": -7.645940, + "Language": -10.353990, + "Language=": -10.353990, + "LayoutMaster": -10.353990, + "LayoutMaster=": -10.353990, + "Left": -10.353990, + "Level": -8.051405, + "Library": -9.660843, + "LibraryElement": -10.353990, + "License": -9.660843, + "Linker": -8.967695, + "Listen": -8.967695, + "Lite": -9.660843, + "LjjH": -10.353990, + "Log": -9.255377, + "Logs": -10.353990, + "Lorem": -8.156765, + "Low": -10.353990, + "LwbsCqFOnMoaDvKgWEtF": -10.353990, + "M": -8.156765, + "M/fmmY/aZwbXGzMlmtMdWBUWIm": -10.353990, + "M/vRlIM": -10.353990, + "MAEKER": -10.353990, + "MAeQ": -10.353990, + "MAx": -10.353990, + "MD": -10.353990, + "MDM": -8.156765, + "MEIW": -10.353990, + "METHODS": -10.353990, + "MFBn": -10.353990, + "MHQwEKjKjqWgkgpqFSTgoCAAEs": -10.353990, + "MK": -10.353990, + "ML": -10.353990, + "MLA": -9.660843, + "MLHyAKwAAAAAElFTkSuQmCC": -10.353990, + "MMgIsyk/DkSFgiswqYDgDPhFi": -10.353990, + "MODIFIED=": -7.218496, + "MP": -10.353990, + "MPF": -10.353990, + "MPZB": -10.353990, + "MQ": -10.353990, + "MRU": -10.353990, + "MS": -10.353990, + "MSBuildExtensionsPath": -9.255377, + "MSBuildProjectDirectory": -10.353990, + "MT": -10.353990, + "MTpSUI": -10.353990, + "MYEbsRExSMLxf/VTaHLUU": -10.353990, + "MZPoU": -10.353990, + "Macintosh": -9.660843, + "Made": -10.353990, + "MainWindow": -9.660843, + "Make": -9.660843, + "MakeObjectReactiveHelper.": -10.353990, + "ManagedCProj": -10.353990, + "Management": -10.353990, + "Manual": -10.353990, + "Mar.": -10.353990, + "Margin=": -10.353990, + "Martin": -9.660843, + "May": -10.353990, + "Message": -6.986694, + "MessageBus": -9.255377, + "MessageBus.Current.": -10.353990, + "Methods": -10.353990, + "Metric": -10.353990, + "Metrics": -9.255377, + "MfSfR": -10.353990, + "Mg": -10.353990, + "MgPHnCdltM": -10.353990, + "Mh": -10.353990, + "Michigan": -10.353990, + "Microsoft": -7.869083, + "Microsoft.CSharp": -10.353990, + "Microsoft.FSharp.Targets": -9.660843, + "Microsoft.NET": -9.660843, + "Microsoft.Vsix.TemplatesPackage": -10.353990, + "Microsoft.Vsix.TemplatesPackage.VsixWizard": -10.353990, + "Mj": -10.353990, + "MjI": -9.660843, + "MjKyNjKyMjI": -10.353990, + "Mobile": -10.353990, + "Model": -10.353990, + "Modern": -10.353990, + "MrIyMjYyaoSJEepSUWhEoc": -10.353990, + "MtkLkscJA": -10.353990, + "MtplSJz": -10.353990, + "Mueller": -10.353990, + "MulN": -10.353990, + "MvAem": -10.353990, + "MvBeniWG/Ui": -10.353990, + "Mw": -10.353990, + "MxR": -10.353990, + "My": -9.660843, + "My.Resources": -10.353990, + "My.Web": -9.660843, + "MyApplicationCodeGenerator": -10.353990, + "MyCommon": -10.353990, + "MyDef": -9.660843, + "MyqhWwJVIKqL": -10.353990, + "Mz": -10.353990, + "N": -8.274548, + "N//pruzkdyik": -10.353990, + "NAME=": -7.175936, + "NAcdZIcna": -10.353990, + "NAw": -10.353990, + "NB": -10.353990, + "NCL3": -9.660843, + "NCL30EDTV": -10.353990, + "NCTY": -10.353990, + "NCV": -10.353990, + "NDEBUG": -10.353990, + "NDQ": -10.353990, + "NDXrKcjT/fcF": -10.353990, + "NDaysAgo=": -9.660843, + "NDw": -10.353990, + "NET": -10.353990, + "NEoWQQ": -10.353990, + "NJ": -10.353990, + "NJe": -10.353990, + "NKcDAx/": -10.353990, + "NMC": -10.353990, + "NONE": -9.660843, + "NOT": -10.353990, + "NOTE": -10.353990, + "NOW": -7.956094, + "NQuGEUAn": -10.353990, + "NQwMLCy": -10.353990, + "NUaV": -10.353990, + "NWFV/": -10.353990, + "NZAthyg/ppjL": -10.353990, + "NZDhNpDw": -10.353990, + "NZU": -10.353990, + "Name": -7.956094, + "Name=": -5.899642, + "Namespace": -9.660843, + "Namespaces=": -10.353990, + "Nascetur": -9.660843, + "NdoO": -10.353990, + "NeZMZ": -10.353990, + "Nemerle": -8.967695, + "Nemerle.Linq.dll": -10.353990, + "Nemerle.dll": -10.353990, + "NemerleBinPathRoot": -9.660843, + "NemerleVersion": -10.353990, + "Net": -10.353990, + "New": -9.660843, + "New_Case_Created_Email_Alert": -9.660843, + "NgIoOfAdGRyCxQEpX": -10.353990, + "NgeNzJkQSbDcWdT": -10.353990, + "NiHGmWPfleBxKpCWCxOHxN": -10.353990, + "NizM": -10.353990, + "Nj": -10.353990, + "Nln": -10.353990, + "NlvuRbJ": -10.353990, + "NmJsdGokyH": -10.353990, + "NoZtBbcve": -10.353990, + "None": -10.353990, + "Normal": -10.353990, + "Norte": -9.660843, + "Northern": -9.660843, + "Northwestern": -10.353990, + "NotCcDuD": -10.353990, + "Note": -8.274548, + "Nov.": -10.353990, + "November": -10.353990, + "Now.ToString": -9.660843, + "Np": -10.353990, + "NuGet.VisualStudio.Interop": -10.353990, + "NuGet.VisualStudio.TemplateWizard": -10.353990, + "NuHdKd": -10.353990, + "Nullam": -10.353990, + "NuqUcy": -10.353990, + "NvH": -10.353990, + "NvU": -10.353990, + "NxJEHFVf": -10.353990, + "NylER": -10.353990, + "NymBS/R": -10.353990, + "NzPE/POEHIopWbukFiQ/sztybgUHsM": -10.353990, + "NzYPLAPSGAiRI": -10.353990, + "NzmSyXt": -10.353990, + "O": -8.408080, + "O/": -10.353990, + "OAPH": -9.660843, + "OASIS/CALS": -10.353990, + "OAZGut": -10.353990, + "OBU": -10.353990, + "OCaml": -10.353990, + "ODEIFVy": -10.353990, + "ODFpGKJl": -10.353990, + "ODIMygeVCCcppBS": -10.353990, + "OEpZWg": -10.353990, + "OFFER": -10.353990, + "OHBlxVgCd": -10.353990, + "OHEILZyRvb": -10.353990, + "OI": -10.353990, + "OIpVAAAAAElFTkSuQmCC": -10.353990, + "OIz": -10.353990, + "OKHw": -10.353990, + "OKOL": -10.353990, + "OLQGSIvDRArM": -10.353990, + "OM": -10.353990, + "OMfgSSLUIH": -10.353990, + "OMpBdDYVJCqbhJHHdmT": -10.353990, + "ON": -10.353990, + "ONJNwjAbUd": -10.353990, + "OP": -9.660843, + "OPMqWngzO": -10.353990, + "OQBzW": -10.353990, + "OQizxvEvpxI": -10.353990, + "OR": -10.353990, + "ORDER": -10.353990, + "OTLF": -10.353990, + "OUR": -10.353990, + "OVER": -10.353990, + "OVR_Device_getPitch.gml": -10.353990, + "OVR_Device_getRoll.gml": -10.353990, + "OVR_Device_getYaw.gml": -10.353990, + "OVR_Device_init.gml": -10.353990, + "OVR_Init.gml": -10.353990, + "OVR_beginFrame.gml": -10.353990, + "OVR_endFrame.gml": -10.353990, + "OVR_getEyePos.gml": -10.353990, + "OVR_getHMDName.gml": -10.353990, + "OVR_getVersion.gml": -10.353990, + "OVR_linkWindowHandle.gml": -10.353990, + "OW": -10.353990, + "OYmbdKJe": -10.353990, + "OYob": -10.353990, + "OZQUe": -10.353990, + "Oazv": -10.353990, + "Ob": -10.353990, + "Ob/V": -10.353990, + "ObmQpJyEgGKoMqITlXAXssbfYCEQeysztkWMoPcXTniLCxUqz": -10.353990, + "Observable": -6.328638, + "Observable.": -8.562230, + "Observable.Return": -10.353990, + "ObservableAsPropertyHelper": -8.562230, + "ObservableAsyncMRUCache": -9.660843, + "ObservableAsyncMRUCache.": -10.353990, + "ObservableAsyncMRUCache.AsyncGet": -10.353990, + "ObservableForProperty": -7.714932, + "ObservableForProperty.": -10.353990, + "ObservableToProperty": -10.353990, + "Observables": -8.967695, + "Observables.": -9.660843, + "Oc": -10.353990, + "Oct.": -10.353990, + "Off": -10.353990, + "OfwC": -10.353990, + "OhI": -10.353990, + "OmPy": -10.353990, + "On": -9.660843, + "On/JFp": -10.353990, + "OnLpNCe": -10.353990, + "OpenInEditor=": -10.353990, + "Opff": -10.353990, + "OpwVXsQyPycPO": -10.353990, + "Order": -10.353990, + "Ordinal": -8.562230, + "Organization=": -10.353990, + "Other": -8.744552, + "Ou": -10.353990, + "Oue": -10.353990, + "OutputPath": -10.353990, + "Owner": -10.353990, + "Oxford": -9.660843, + "OxoM": -10.353990, + "OyCbdSRlmclBg": -10.353990, + "OzFhiOIpLAC": -10.353990, + "P": -6.592790, + "PAYMENT": -10.353990, + "PBSyB": -10.353990, + "PBnfLX": -10.353990, + "PCDATA": -10.353990, + "PCTkPxwUHFUf": -10.353990, + "PDZD": -10.353990, + "PHA": -10.353990, + "PI": -10.353990, + "PJKO": -10.353990, + "PK": -10.353990, + "PLRHlGMznChKIcwiFTrlnTqxYkLbDG": -10.353990, + "POIOHEBZ": -10.353990, + "POLO": -10.353990, + "POQ": -10.353990, + "POSITION=": -8.967695, + "PP": -10.353990, + "PQ": -10.353990, + "PQJbhwAB": -10.353990, + "PRIORITY_HIGH": -10.353990, + "PRIORITY_LOW": -10.353990, + "PRIORITY_MASK": -9.255377, + "PRIORITY_NORMAL": -10.353990, + "PROMO": -10.353990, + "PRduvdsPiY": -10.353990, + "PS": -10.353990, + "PToi": -10.353990, + "PUMPING_MSGS_BIT": -9.660843, + "PUUhiJf": -10.353990, + "PUwti": -10.353990, + "PVNc": -10.353990, + "PW": -10.353990, + "PXJsisYwgAJAVOAFv": -10.353990, + "PYwXYJI": -10.353990, + "Package": -9.255377, + "Package.ico": -10.353990, + "Page": -10.353990, + "Pal": -10.353990, + "Path=": -10.353990, + "Patient": -10.353990, + "PbJUwiwr/AiHdeYi": -10.353990, + "PcC": -10.353990, + "Pd": -10.353990, + "Pdx": -10.353990, + "Pg": -10.353990, + "Phasellus": -8.744552, + "Phone": -9.255377, + "Photoshop": -9.660843, + "PibMlUYsAJWE": -10.353990, + "PiuJI": -10.353990, + "PjkzzFc": -10.353990, + "Pk/MdlVxTKwEe": -10.353990, + "Pk/f": -10.353990, + "Pl": -10.353990, + "PlRh": -10.353990, + "PlaceholderText=": -10.353990, + "Platform": -7.409551, + "Platform=": -10.353990, + "PmV/TyS": -10.353990, + "Pn": -10.353990, + "Pool": -10.353990, + "Portugu": -9.660843, + "Portuguese": -9.660843, + "PqbvZKpRvueoCGpQFvj": -10.353990, + "Prefer": -9.660843, + "Prefix": -10.353990, + "Prefix=": -10.353990, + "PreprocessorDefinitions": -9.660843, + "Privacy": -10.353990, + "PrmWtxRZ": -10.353990, + "PrmrLStEw": -10.353990, + "ProgramFiles": -10.353990, + "Project": -8.274548, + "Project=": -6.857482, + "ProjectFileToCompareWith=": -9.660843, + "ProjectMode=": -9.660843, + "ProjectName": -10.353990, + "ProjectRoot": -7.956094, + "Projects=": -10.353990, + "Properties": -9.255377, + "Properties=": -10.353990, + "PropertyChangedEventArgs.": -10.353990, + "PropertyGroup": -10.353990, + "Provides": -8.967695, + "PsVyErkvVwe": -10.353990, + "PtRFLZ/m": -10.353990, + "PtUBpnwDAT": -10.353990, + "PublicKeyToken": -8.967695, + "PublicKeyToken=": -9.255377, + "Publisher=": -10.353990, + "Pw": -10.353990, + "PwTrQA": -10.353990, + "PxqETx": -10.353990, + "PxwTkBLD": -10.353990, + "Pytlik": -10.353990, + "Pz": -10.353990, + "Q": -8.156765, + "QB": -10.353990, + "QBhBRDtAHYCkHyAIATRZdO": -10.353990, + "QCUuWaYeS": -10.353990, + "QESF": -10.353990, + "QG": -10.353990, + "QGKvZwEPxCqMBPcvUoQ": -10.353990, + "QK": -10.353990, + "QKCxJClrzD": -10.353990, + "QKEAIOEJSdru": -10.353990, + "QN": -10.353990, + "QNNZCCfG": -10.353990, + "QPQMRgGHJOv": -10.353990, + "QRJJ": -10.353990, + "QSW": -10.353990, + "QUpIiB/WLQilRZXfgXuVziro": -10.353990, + "QUwZ": -10.353990, + "QVAnTTy": -10.353990, + "QWKx": -10.353990, + "QWc": -10.353990, + "QYGAd": -10.353990, + "QYi": -10.353990, + "Qa": -10.353990, + "QgJylT": -10.353990, + "QgQTRGUgk": -10.353990, + "QgVGT": -10.353990, + "QgnopIehCtugaxe": -10.353990, + "QgsKjgLS": -10.353990, + "Qi": -10.353990, + "Qiva": -10.353990, + "QjWyZzfm": -10.353990, + "QjhTvExFIHoWTIFnhEUnMvxmMIqT": -10.353990, + "Qkge/bJpVK": -10.353990, + "QldVvHmkBOGkbGzQrA": -10.353990, + "QmR/": -10.353990, + "QnA": -10.353990, + "QnEkPqKxFdN/": -10.353990, + "QoAdQcZoy": -10.353990, + "Qogdvj": -10.353990, + "Qq": -9.660843, + "QqRd": -10.353990, + "QrWtPhHMADMHf": -10.353990, + "Qth": -10.353990, + "Quality": -10.353990, + "Queen": -9.660843, + "Query=": -10.353990, + "Quisque": -8.408080, + "Qy": -10.353990, + "QzFvE": -10.353990, + "R": -8.274548, + "R/CGHyk": -10.353990, + "RDCG": -10.353990, + "RDfebgWJuWQw": -10.353990, + "REPLY_BIT": -9.660843, + "REPLY_ERROR_BIT": -9.660843, + "RETu": -10.353990, + "REWqhvtok": -10.353990, + "RGOQ": -10.353990, + "RK/chkiq": -10.353990, + "RKala": -10.353990, + "RLlDdJGz": -10.353990, + "RMI": -10.353990, + "ROJq": -10.353990, + "RPB": -10.353990, + "RQVTpIJWChgoKCgYGBgYGNh": -10.353990, + "RQreCCNHw": -10.353990, + "RRQrgix/": -10.353990, + "RRuQAqOmDzkCSjdKy": -10.353990, + "RSkPQMghld": -10.353990, + "RWPln": -10.353990, + "Rahtz": -10.353990, + "Rainha": -9.660843, + "RaiseAndSetIfChanged": -9.660843, + "RaisePropertyChanged": -9.660843, + "RaisePropertyChanging": -9.660843, + "Re": -10.353990, + "ReactiveCollection": -10.353990, + "ReactiveCollection.": -10.353990, + "ReactiveObject": -7.956094, + "ReactiveObject.": -10.353990, + "ReactiveUI": -9.660843, + "Real": -10.353990, + "RealEstate": -10.353990, + "Rec": -9.660843, + "Redistribution": -10.353990, + "Redistributions": -9.660843, + "RefCount": -10.353990, + "RefCountedBase*": -9.660843, + "Reference": -10.353990, + "RegisterMessageSource": -8.967695, + "Registers": -9.255377, + "Reino": -9.660843, + "RelativeNode": -10.353990, + "RelativeNode=": -10.353990, + "RelativeTo": -8.967695, + "RelativeTo=": -8.744552, + "Release": -7.581401, + "ReplaceParameters=": -8.967695, + "Represents": -8.967695, + "ResX": -10.353990, + "ResXResourceReader": -10.353990, + "ResXResourceWriter": -10.353990, + "Resource": -9.255377, + "ResourceEvent": -10.353990, + "ResourceType": -10.353990, + "Resources": -9.255377, + "Resources.Designer.vb": -10.353990, + "Resources.resx": -10.353990, + "Return": -10.353990, + "Returns": -8.744552, + "Rev": -10.353990, + "RfOuPi": -10.353990, + "RgEGCpAZEcUCkFAQYFhgYHDI": -10.353990, + "Rhd": -10.353990, + "RhhAiPhCQB": -10.353990, + "RiftSharpDll.dll": -10.353990, + "RjQmcGdtCAcrLAsxjYTZ": -10.353990, + "RkPgPqaJtCHtPDCryTjYjqnzSxkUFqOn": -10.353990, + "RkR": -10.353990, + "RmwqJjUkQzi": -10.353990, + "RoDyM": -10.353990, + "Roboto": -10.353990, + "Routing": -10.353990, + "Rows=": -10.353990, + "Rpt": -10.353990, + "RqRi/fM": -10.353990, + "RqUJKlgGVUMM/KtnWYh": -10.353990, + "RqrQUFqFD/tvZeWQU": -10.353990, + "RrJA": -10.353990, + "RtXeU/": -10.353990, + "Ru": -9.660843, + "Rudmnx": -10.353990, + "RufAnnobTnbWGdOWvuPWtvrrg": -10.353990, + "Rules": -10.353990, + "Rw": -10.353990, + "RwWfNO": -10.353990, + "Rx.Net.": -10.353990, + "RxApp": -10.353990, + "RxApp.DeferredScheduler": -9.660843, + "RxApp.GetFieldNameForPropertyNameFunc.": -9.660843, + "S": -8.274548, + "S/dQG/dg": -10.353990, + "SBHCNQrrQTYPq/Vdk": -10.353990, + "SBmsxPjtkign": -10.353990, + "SBuso": -10.353990, + "SBwkJwndUxxXZkNwnpAhSp": -10.353990, + "SDKs": -9.660843, + "SDjypBvG": -10.353990, + "SECTION_1002": -10.353990, + "SGxyYP": -10.353990, + "SHIPPING": -9.660843, + "SHIRT": -10.353990, + "SHOES": -10.353990, + "SHOP": -10.353990, + "SHORTS": -10.353990, + "SHORT_PERMALINK": -9.255377, + "SIEIwfBxUn": -10.353990, + "SIZE=": -7.218496, + "SIZkpCZxRxbxVdDd": -10.353990, + "SJf": -10.353990, + "SKETCH": -10.353990, + "SL": -10.353990, + "SLEzaxjYSe": -10.353990, + "SM": -10.353990, + "SMFYj": -10.353990, + "SNYLivgNkYgAsHArkkwBpHBT": -10.353990, + "SO": -10.353990, + "SOTBV": -10.353990, + "SPIFK": -10.353990, + "SPRING": -10.353990, + "SQRL": -10.353990, + "SSCd": -10.353990, + "STRING": -9.255377, + "STYLE=": -7.581401, + "SUMMER": -10.353990, + "SUZGw": -10.353990, + "SWEATER": -10.353990, + "SXmMY": -10.353990, + "SYAAAAASUVORK": -10.353990, + "SYNC_BIT": -9.660843, + "SYSTEM": -7.463618, + "SZdfWA": -10.353990, + "SaixVQjzQCkmQMsdOY": -10.353990, + "Sample": -9.660843, + "Say": -10.353990, + "SbCeuPmne/oRDlC": -10.353990, + "Schema": -10.353990, + "Schematron": -10.353990, + "Scotland": -9.660843, + "Sebastian": -10.353990, + "SectionsEnabled=": -10.353990, + "Select": -9.255377, + "SelectMany": -9.660843, + "SelectMany.": -10.353990, + "Selector": -10.353990, + "Semperin": -10.353990, + "SendMessage.": -9.660843, + "Sender.": -10.353990, + "Sends": -9.660843, + "Sept.": -10.353990, + "Server.": -10.353990, + "Set": -9.255377, + "SetValueToProperty": -10.353990, + "Setter": -9.660843, + "Setters": -10.353990, + "Settings": -9.660843, + "Settings.Designer.vb": -10.353990, + "Settings.settings": -10.353990, + "SettingsSingleFileGenerator": -10.353990, + "Setup.Bypass__c.Workflow_Rules__c": -10.353990, + "Sf": -10.353990, + "ShareAlike": -9.660843, + "ShdpNJvx": -10.353990, + "ShownInReport=": -10.353990, + "Silverlight": -8.744552, + "Simple": -7.869083, + "Simple.": -10.353990, + "Since": -10.353990, + "SjJIz": -10.353990, + "SjNhcF": -10.353990, + "Slztu": -10.353990, + "SmhEajokBBDFpIqgtKzUa": -10.353990, + "SnMo": -10.353990, + "SolutionRoot": -9.660843, + "Some": -10.353990, + "Source": -8.562230, + "Source=": -8.562230, + "SourceFiles=": -9.255377, + "Specifying": -9.660843, + "SqdznMxWvigVE": -10.353990, + "SrRYx": -10.353990, + "SrbEczr": -10.353990, + "Src": -10.353990, + "SsdeZ/DNic": -10.353990, + "St": -10.353990, + "Standard=": -10.353990, + "Studio": -8.744552, + "Style": -10.353990, + "SubType=": -10.353990, + "Summary": -10.353990, + "SutsnJtPHX/ShhxPN": -10.353990, + "Sweater": -10.353990, + "SwonQdMVhCejkTF": -10.353990, + "SyRaTAnB": -10.353990, + "System": -9.255377, + "System.ComponentModel.TypeConverter": -10.353990, + "System.Core": -10.353990, + "System.Data": -10.353990, + "System.DateTime": -9.660843, + "System.Design": -10.353990, + "System.Drawing": -10.353990, + "System.Resources.ResXResourceReader": -9.660843, + "System.Resources.ResXResourceWriter": -9.660843, + "System.Runtime.Serialization.Formatters.Soap.SoapFormatter": -10.353990, + "System.Serialization.Formatters.Binary.BinaryFormatter": -10.353990, + "System.Windows.Forms": -8.744552, + "System.Xml": -10.353990, + "T": -7.581401, + "T/WnU": -10.353990, + "TANK": -10.353990, + "TASK": -10.353990, + "TBRb": -10.353990, + "TBxVBHdOqJJM": -10.353990, + "TBzSYxyF": -10.353990, + "TC": -10.353990, + "TCP": -9.660843, + "TEI": -6.888254, + "TEST": -10.353990, + "TEXT=": -7.218496, + "TF": -10.353990, + "TFJjORUJEZndI": -10.353990, + "TGOjU": -10.353990, + "TIUgaS": -10.353990, + "TJeTK": -10.353990, + "TKCYX": -10.353990, + "TL": -10.353990, + "TNqJl/tMG": -10.353990, + "TOGYkha": -10.353990, + "TOPAZ": -10.353990, + "TOemd": -10.353990, + "TP": -10.353990, + "TPL": -10.353990, + "TPvpCL": -10.353990, + "TQOEJyP": -10.353990, + "TQPJnDQTpnv": -10.353990, + "TQfgF": -10.353990, + "TR": -10.353990, + "TRACE": -8.408080, + "TREBLIoJLT": -10.353990, + "TRzSfE": -10.353990, + "TS": -9.255377, + "TSdWCgibYA": -10.353990, + "TSender": -10.353990, + "TTbNpibpyNT/N": -10.353990, + "TWO": -10.353990, + "TX": -10.353990, + "TYWuVrjA/UAfx": -10.353990, + "TZjcj": -10.353990, + "Tag": -10.353990, + "TaggJD/xuvM": -10.353990, + "Target": -8.744552, + "Target=": -8.967695, + "TargetFileName=": -8.967695, + "Targets": -10.353990, + "Targets=": -8.408080, + "Task": -10.353990, + "TaskName=": -9.660843, + "TaskpoolScheduler": -9.660843, + "Tb/tTknO": -10.353990, + "TckrBE": -10.353990, + "TeX": -10.353990, + "Test": -9.255377, + "Text": -9.660843, + "Text=": -8.408080, + "TextColor=": -10.353990, + "Tf": -10.353990, + "TfAYhtJtgqMAHewWqhqrwJXu": -10.353990, + "TgQO": -10.353990, + "TgYrohX": -10.353990, + "ThENTdax": -10.353990, + "The": -5.789642, + "Theme=": -9.660843, + "There": -10.353990, + "This": -6.920003, + "This.GetValue": -10.353990, + "ThlApvdRyYBal": -10.353990, + "Threadpool": -10.353990, + "Time": -8.744552, + "Timer.": -9.660843, + "Tite": -10.353990, + "TjxN": -10.353990, + "Tk": -10.353990, + "TlGeEqTfgbhhMEeXXwoEVa": -10.353990, + "TmR": -10.353990, + "Tn": -10.353990, + "To": -8.156765, + "ToPath=": -10.353990, + "ToProperty": -9.660843, + "ToZBI": -10.353990, + "Tools": -9.660843, + "ToolsVersion=": -7.789040, + "TpVluyCUtcah": -10.353990, + "TqU": -10.353990, + "TrQ": -10.353990, + "Tracking": -9.660843, + "Trans": -10.353990, + "Transcription": -10.353990, + "Transform": -9.255377, + "TransformOrigin=": -10.353990, + "Treemap": -10.353990, + "TrtDMlIheowMUF": -10.353990, + "True": -7.581401, + "True.": -9.660843, + "Tt": -9.255377, + "TtQtKq/WtlUnie": -10.353990, + "TtUYACIBHFcywHrGFsqssaY": -10.353990, + "Tu": -10.353990, + "TuJdIIYAklsK": -10.353990, + "Tukg": -10.353990, + "TuuKQaxHU": -10.353990, + "TwIyvtAAAAAElFTkSuQmCC": -10.353990, + "TxlEWM": -10.353990, + "Ty": -10.353990, + "Type": -7.956094, + "Type.": -9.660843, + "Type=": -8.562230, + "TypeConverter": -9.660843, + "Types": -9.660843, + "U": -9.660843, + "UAP": -10.353990, + "UDyeCdp": -10.353990, + "UFnZ": -10.353990, + "UI": -9.660843, + "UMlFKRaAVhUwUOvFgExMVT": -10.353990, + "UNBLOCK_BIT": -9.660843, + "UQfDVVlDtcBOo": -10.353990, + "URI": -9.660843, + "URL": -9.660843, + "US": -10.353990, + "UVdKcK": -10.353990, + "Uk": -10.353990, + "UmV": -10.353990, + "UncoverableAttribute=": -10.353990, + "Unicode": -9.660843, + "Unido": -9.660843, + "Unit": -10.353990, + "United": -9.660843, + "Unported": -10.353990, + "Unrecognized": -9.660843, + "Unsubscribe": -10.353990, + "UoVxGUMYaJAZaaofzvgvAG": -10.353990, + "Uri=": -10.353990, + "Use": -7.645940, + "Using": -10.353990, + "Uvqvv": -10.353990, + "UzLqFMzGDa": -10.353990, + "V": -8.562230, + "VBC": -10.353990, + "VClBDk": -10.353990, + "VCpKmOmTnYk": -10.353990, + "VCtPmbNY": -10.353990, + "VD": -10.353990, + "VERDANT": -10.353990, + "VEoibbPUMWapEXQvG": -10.353990, + "VFunpfeTl": -10.353990, + "VGSM": -10.353990, + "VGwjqbKMKkLugBXotSictylIXQHEu": -10.353990, + "VIY/iYBTkZ": -10.353990, + "VIg": -10.353990, + "VJVr": -10.353990, + "VKwoyMBvjVAYDzetFCrglkU": -10.353990, + "VLOSco": -10.353990, + "VLvPb": -10.353990, + "VMkD": -10.353990, + "VRpuX": -10.353990, + "VSIX": -10.353990, + "VSPackage.cs": -10.353990, + "VSPackage.ico": -10.353990, + "VSPackage.resx": -10.353990, + "VV": -10.353990, + "VVP": -10.353990, + "VVaIe": -10.353990, + "VWBM": -10.353990, + "VWV": -10.353990, + "VZSEKfNIEnpAxyuW": -10.353990, + "Value": -8.967695, + "Value=": -8.051405, + "ValueIfNotDefault": -10.353990, + "VbMyResourcesResXFileCodeGenerator": -10.353990, + "VcfFcWRVVSMbQfv": -10.353990, + "VcnJOx": -10.353990, + "Version": -8.408080, + "Version.Major": -10.353990, + "Version=": -8.051405, + "VersionNumberMajor": -10.353990, + "VersionNumberMinor": -10.353990, + "VerticalText": -10.353990, + "Vg": -10.353990, + "VgYzoAAAAASUVORK": -10.353990, + "VhAv": -10.353990, + "View": -10.353990, + "ViewModel": -8.274548, + "ViewModels": -9.255377, + "Villa": -10.353990, + "Violated": -10.353990, + "Visual": -8.967695, + "VisualStudio": -9.255377, + "VisualStudioVersion": -9.660843, + "VkX": -10.353990, + "Vkbqeng": -10.353990, + "VoVk": -10.353990, + "Vols": -10.353990, + "Vq//XHvG": -10.353990, + "VsPkg.cs": -10.353990, + "VsixVSPackageCSharp": -10.353990, + "Vsyclt": -10.353990, + "Vt": -10.353990, + "VvJtwd": -10.353990, + "VwaXa": -10.353990, + "VxPG": -10.353990, + "VzUzUXlgzyPYvFWriKVbgWsERdevxXqAI/COVELiam": -10.353990, + "VzWHGSqO": -10.353990, + "VzqyoucsdIP": -10.353990, + "W": -7.956094, + "W/DzcYBXyyAAAAAElFTkSuQmCC": -10.353990, + "WABmSHSTqSqlwoENUgGZ": -10.353990, + "WBH": -10.353990, + "WBWyaW": -10.353990, + "WE": -10.353990, + "WFhYGBoYGBg": -10.353990, + "WGf": -10.353990, + "WHURsGDNJSTHu": -10.353990, + "WIDTH=": -7.581401, + "WIN": -9.660843, + "WIVQcXLFGU": -10.353990, + "WKTbPUoQv": -10.353990, + "WL/qL": -10.353990, + "WLKmZ": -10.353990, + "WNmsl": -10.353990, + "WODyzjKOBjFdESBxIqEzqayMaESoEXxX": -10.353990, + "WP": -10.353990, + "WPF": -10.353990, + "WPfCSjqK": -10.353990, + "WQlFgnuzSAQhCCagGgCgqQIklYgKhAVExUTFc": -10.353990, + "WQqS": -10.353990, + "WUkFkPrSljAMvS": -10.353990, + "WUtULud/OpHtcyb": -10.353990, + "WVigKWGIkrLZJgU": -10.353990, + "WVm": -10.353990, + "WVwNnnFsrkc": -10.353990, + "Wales": -9.660843, + "WdoiV/TjBHmPEE": -10.353990, + "We": -9.255377, + "Web": -10.353990, + "Web.config": -10.353990, + "WebRequest": -10.353990, + "When": -8.408080, + "WhenAny": -7.869083, + "WiX": -10.353990, + "Width=": -7.520776, + "Win": -9.660843, + "Window": -10.353990, + "Windows": -8.744552, + "With": -10.353990, + "Wix.targets": -10.353990, + "WixProject": -10.353990, + "WixTargetsPath": -10.353990, + "Wjgyc": -10.353990, + "WkHeCbXfDV": -10.353990, + "WkbmpjCK": -10.353990, + "Wl/yULCD/b": -10.353990, + "WlB": -10.353990, + "Wm": -10.353990, + "Wo": -10.353990, + "WorkingDirectory=": -10.353990, + "Works": -9.660843, + "Wp": -10.353990, + "WqB": -10.353990, + "WtfZz": -10.353990, + "Wu": -10.353990, + "WunpQzOkL": -10.353990, + "WvQRc": -10.353990, + "WvfJ": -10.353990, + "WwrmR": -10.353990, + "WyvO": -10.353990, + "X": -8.562230, + "X/Cb": -10.353990, + "X/SAJyeSaxOPY": -10.353990, + "X/hvO": -10.353990, + "X=": -10.353990, + "XEBo": -10.353990, + "XEUmVQgoxCe": -10.353990, + "XF": -10.353990, + "XFzFVBVAjcW": -10.353990, + "XHTML": -8.408080, + "XI": -10.353990, + "XJPGUG": -10.353990, + "XMA/": -10.353990, + "XML": -8.967695, + "XMLSchema": -8.562230, + "XMP": -10.353990, + "XN": -10.353990, + "XO": -10.353990, + "XPPOffm": -10.353990, + "XPe": -10.353990, + "XQJZCbuXp/": -10.353990, + "XQZMm": -10.353990, + "XRAuP": -10.353990, + "XRrxHT": -10.353990, + "XS": -10.353990, + "XSL": -8.967695, + "XUDYaMagwfWXhCilMsZ": -10.353990, + "XUSbY": -10.353990, + "XUYjEmebBXSeTYePjIdVj": -10.353990, + "XUg": -10.353990, + "XV/Kn": -10.353990, + "XVzdQ": -10.353990, + "XWVlZW": -10.353990, + "XX": -10.353990, + "XbJ/rU/pX": -10.353990, + "Xc": -10.353990, + "XdUtg": -10.353990, + "XgNc": -10.353990, + "XhyfIWbCOQCHEM": -10.353990, + "Xj": -10.353990, + "XjrDXRGWjIBO": -10.353990, + "Xkkp": -10.353990, + "XmMvAppMUb": -10.353990, + "XmlInputPath=": -10.353990, + "XnxIBIdrEnf": -10.353990, + "Xs": -10.353990, + "XslPath=": -10.353990, + "Xu": -10.353990, + "XuXBkUyOx": -10.353990, + "Xw": -10.353990, + "Xy": -10.353990, + "Y": -8.408080, + "Y=": -8.744552, + "YAAAAASUVORK": -10.353990, + "YAunhIkT": -10.353990, + "YBGRDGARACIGfU": -10.353990, + "YCRCH": -10.353990, + "YGJF": -10.353990, + "YKgHgbWYoKEUD": -10.353990, + "YMCgwKDAYKD": -10.353990, + "YMYy/": -10.353990, + "YMrPObHy/u": -10.353990, + "YN": -10.353990, + "YOQ": -10.353990, + "YTtcYqSwuW": -10.353990, + "YVkPUqssYU": -10.353990, + "YWiFAKaHTokI": -10.353990, + "YZy": -10.353990, + "Ye": -10.353990, + "Yfvq": -10.353990, + "YgZZvx": -10.353990, + "Ygc": -10.353990, + "YhAF": -10.353990, + "YhYJEm/": -10.353990, + "YhfYAwnQzulBQdc": -10.353990, + "YhuunCcp": -10.353990, + "Yi": -10.353990, + "YiK": -10.353990, + "YiqMcT": -10.353990, + "Yj": -10.353990, + "YjprkLcJOo": -10.353990, + "Yk": -10.353990, + "YkTFmrP": -10.353990, + "YnpN": -10.353990, + "YnrUMzAFTMz": -10.353990, + "YoJMahcQVQHBbOfAmrDsgC": -10.353990, + "You": -10.353990, + "YpQsF": -10.353990, + "YpsYKz": -10.353990, + "YrrTNcV": -10.353990, + "Yrs": -10.353990, + "YsQKBqFjBvzA": -10.353990, + "YtI": -10.353990, + "YwGS": -10.353990, + "YwkPPx": -10.353990, + "Yx": -10.353990, + "Yy": -10.353990, + "Yz": -10.353990, + "Yzb": -10.353990, + "Z": -8.408080, + "Z/HrKPYnEj": -10.353990, + "ZAAAAF": -9.660843, + "ZAAAAhklEQVR": -10.353990, + "ZAAAB/": -10.353990, + "ZAAAB/klEQVR": -10.353990, + "ZAAABYklEQVR": -10.353990, + "ZAAABfElEQVR": -10.353990, + "ZAAABjklEQVR": -10.353990, + "ZAAABvklEQVR": -10.353990, + "ZAAACIUlEQVR": -10.353990, + "ZAAACK": -10.353990, + "ZAAACMUlEQVR": -10.353990, + "ZAAACN": -10.353990, + "ZAAACNElEQVR": -10.353990, + "ZAAACO": -10.353990, + "ZAAACOElEQVR": -10.353990, + "ZAAACOUlEQVR": -10.353990, + "ZAAACP": -10.353990, + "ZAAACPUlEQVR": -10.353990, + "ZAAACQ": -10.353990, + "ZAAACQklEQVR": -10.353990, + "ZAAACS": -10.353990, + "ZAAACSElEQVR": -10.353990, + "ZAAACSUlEQVR": -10.353990, + "ZAAACTElEQVR": -10.353990, + "ZAAACUElEQVR": -10.353990, + "ZAAACUklEQVR": -10.353990, + "ZAAACV": -10.353990, + "ZAAACYUlEQVR": -10.353990, + "ZAAACjElEQVR": -10.353990, + "ZAuuu": -10.353990, + "ZAvLtuTd": -10.353990, + "ZC": -10.353990, + "ZCVwdsiun": -10.353990, + "ZChWhmJN/hlcTERrXVWcq": -10.353990, + "ZEb": -10.353990, + "ZFJSQJk": -10.353990, + "ZFPXviIWIJAHJ/S": -10.353990, + "ZGA": -10.353990, + "ZH": -10.353990, + "ZHv": -10.353990, + "ZJhH": -10.353990, + "ZLbbmL": -10.353990, + "ZLeVIwGFst": -10.353990, + "ZPyUmZ": -10.353990, + "ZQ": -10.353990, + "ZQwAAAABJRU": -10.353990, + "ZR": -10.353990, + "ZRiESZ": -10.353990, + "ZSO": -10.353990, + "ZSrk/g": -10.353990, + "ZTC": -10.353990, + "ZUaiksejgA": -10.353990, + "ZUlFIRaEShEYVUFFJREVExomLEidjv": -10.353990, + "ZWc": -10.353990, + "ZWoicWMkECgqQIklY": -10.353990, + "ZX": -10.353990, + "ZZ": -10.353990, + "Zbi": -10.353990, + "Zcp": -10.353990, + "ZdmLWwHIv": -10.353990, + "Zdvx": -10.353990, + "Ze": -10.353990, + "ZeTMM": -10.353990, + "Zecy": -10.353990, + "Zeubr": -10.353990, + "Zf": -10.353990, + "ZfiRIzkvYGna": -10.353990, + "Zfo": -10.353990, + "Zg": -10.353990, + "ZgST": -10.353990, + "ZhjPPElRYMEMrNItgjA": -10.353990, + "Zho": -10.353990, + "ZiScdCWe": -10.353990, + "Zillig": -10.353990, + "ZipFileName=": -10.353990, + "ZipLevel=": -10.353990, + "ZkVz": -10.353990, + "ZkcyxTSC": -10.353990, + "ZnFYxOhOUeqc/vGlLPpUrAKwnFDSstPPJu/": -10.353990, + "ZnYzGv": -10.353990, + "ZrnvSuGlIb": -10.353990, + "ZvDb": -10.353990, + "ZvLB/eOxTAAAAAElFTkSuQmCC": -10.353990, + "ZwJqBAPZrquXujKbP": -10.353990, + "Zy": -10.353990, + "Zzeuq": -10.353990, + "ZziW": -10.353990, + "[": -7.789040, + "\\": -5.086132, + "]": -6.798642, + "_DEBUG": -10.353990, + "_PlatformToolsetFriendlyNameFor_v": -10.353990, + "_PlatformToolsetShortNameFor_v": -10.353990, + "_bench.d": -10.353990, + "_bench.png": -10.353990, + "_scd": -8.744552, + "_woodstack.d": -10.353990, + "a": -5.030980, + "a.SourceDecls.Select": -10.353990, + "a.SourceFileDeclAvailable": -10.353990, + "aDGF": -10.353990, + "aGUraCBBU": -10.353990, + "aKBOADiMiarVAVEK": -10.353990, + "aNIckLMnQyPIh": -10.353990, + "aQUduSsanKjnVDe": -10.353990, + "aRgrIw/ghE": -10.353990, + "aSbNw": -10.353990, + "aT": -10.353990, + "aUk": -10.353990, + "aWpGxYTnvvMN/STd": -10.353990, + "aX": -10.353990, + "aXzwZFkJzLh": -10.353990, + "aYOiBj": -10.353990, + "aa": -10.353990, + "ab": -9.660843, + "abbr": -9.660843, + "able": -9.255377, + "about": -8.408080, + "above": -9.660843, + "ac": -10.353990, + "acVEBeIEomICe": -10.353990, + "accept": -10.353990, + "access": -9.255377, + "accommodate": -10.353990, + "accordingly": -10.353990, + "achieve": -10.353990, + "across": -9.660843, + "act": -9.660843, + "action": -9.255377, + "action_end_game": -10.353990, + "actual": -8.744552, + "add": -8.156765, + "added": -8.408080, + "added.": -8.744552, + "added/removed": -10.353990, + "adding": -9.255377, + "addition": -8.967695, + "additional": -9.255377, + "additionnal": -10.353990, + "adds": -9.660843, + "adipiscing": -10.353990, + "ado": -10.353990, + "adobe": -8.408080, + "adopting": -10.353990, + "advised": -10.353990, + "ae": -9.255377, + "af": -10.353990, + "after": -9.660843, + "agn": -10.353990, + "ahhUl": -10.353990, + "ahnYcXg": -10.353990, + "aims": -9.660843, + "akWxuWYJxV": -10.353990, + "al": -6.569800, + "algorithmic": -10.353990, + "align": -7.135114, + "align=": -6.077324, + "aligned": -10.353990, + "alignment": -9.660843, + "alignment=": -10.353990, + "aliquam": -10.353990, + "all": -7.956094, + "allcaps": -10.353990, + "allow": -9.660843, + "allowed.": -10.353990, + "allowing": -10.353990, + "allows": -7.581401, + "almost": -9.660843, + "alongside": -10.353990, + "alpVmc": -10.353990, + "alpha=": -10.353990, + "already": -10.353990, + "also": -7.463618, + "alt=": -7.021785, + "always": -6.888254, + "amet": -10.353990, + "amp": -7.581401, + "an": -5.821390, + "anQ": -10.353990, + "analysis.": -10.353990, + "analyze": -10.353990, + "ancestor": -8.408080, + "and": -5.471188, + "and/or": -10.353990, + "and=": -7.409551, + "annotation": -10.353990, + "another": -8.967695, + "ant": -10.353990, + "ante": -8.562230, + "antlib": -9.660843, + "any": -7.463618, + "anything": -9.660843, + "aoqjman": -10.353990, + "aoxqZoF": -10.353990, + "apache": -9.660843, + "application": -9.255377, + "application/vnd.adobe.photoshop": -10.353990, + "application/x": -8.967695, + "applications": -9.660843, + "applies": -10.353990, + "apply": -9.255377, + "approach": -10.353990, + "appropriate": -9.255377, + "arbitrarily": -9.660843, + "architecture": -10.353990, + "architecture.": -10.353990, + "archive": -10.353990, + "are": -7.021785, + "area": -9.660843, + "areas": -10.353990, + "arguments=": -6.665110, + "arising": -10.353990, + "armHYZ": -10.353990, + "array": -9.660843, + "article": -8.967695, + "artifact": -10.353990, + "artifactName=": -9.660843, + "as": -6.422164, + "as=": -9.660843, + "asJhp": -10.353990, + "asTSqV": -10.353990, + "asm": -10.353990, + "asmSourceFilesPaths": -9.660843, + "asmx": -10.353990, + "assigned": -9.660843, + "associated": -10.353990, + "associates": -10.353990, + "association": -10.353990, + "assumption": -8.967695, + "async": -9.255377, + "asynchronous": -8.967695, + "asyncronous": -10.353990, + "at": -8.562230, + "attached.": -10.353990, + "attaching": -10.353990, + "attclasses": -10.353990, + "attempt": -10.353990, + "attempts": -10.353990, + "attlist": -8.967695, + "attrib": -7.956094, + "attribute": -9.660843, + "author": -9.255377, + "automatically": -9.255377, + "available": -9.660843, + "available.": -10.353990, + "avoid": -9.660843, + "awesome": -10.353990, + "axOHLu": -10.353990, + "ay": -10.353990, + "ayJ": -10.353990, + "b": -7.520776, + "b/sYwCsPDinSuun": -10.353990, + "bAwq": -10.353990, + "bCXZhMq": -10.353990, + "bD": -10.353990, + "bDR": -10.353990, + "bEiw": -10.353990, + "bEjCJmbCxieBe": -10.353990, + "bKOH": -10.353990, + "bLWClmtuQ": -10.353990, + "bLjdJXkp/dow": -10.353990, + "bLm": -10.353990, + "bLvC": -10.353990, + "bNPFqtBz": -10.353990, + "bNWqLwvMVhEOo/hu": -10.353990, + "bOpVcmp/UqGS": -10.353990, + "bPRp": -10.353990, + "bQSY": -10.353990, + "bRl": -10.353990, + "bSjE": -10.353990, + "bTVkkLBijuc": -10.353990, + "bU": -10.353990, + "bVBXwdgbukndLA": -10.353990, + "bVDWta": -10.353990, + "bW": -10.353990, + "bZ": -10.353990, + "bZRIPzDfFuj": -10.353990, + "backed": -10.353990, + "background": -6.383698, + "backing": -8.156765, + "backpack": -9.660843, + "bak_soldier": -10.353990, + "banned": -10.353990, + "bark.png": -10.353990, + "base": -7.520776, + "base.dll": -8.744552, + "based": -8.051405, + "basic": -10.353990, + "basis": -10.353990, + "bat": -10.353990, + "battleScribeVersion=": -10.353990, + "bbwzGcGAtrhU": -10.353990, + "bc": -10.353990, + "bc8a": -9.660843, + "bcHvSFn/gW": -10.353990, + "bccc": -10.353990, + "bd": -10.353990, + "bdD": -10.353990, + "bdjDRn": -10.353990, + "be": -5.984542, + "beae": -10.353990, + "because": -9.660843, + "become": -10.353990, + "been": -8.408080, + "before": -8.156765, + "behN": -10.353990, + "behaviour=": -5.218191, + "being": -9.255377, + "bel": -9.660843, + "believe": -10.353990, + "below": -8.744552, + "below.": -10.353990, + "benefit": -10.353990, + "between": -7.645940, + "beyond": -10.353990, + "bff": -8.967695, + "bh": -10.353990, + "bibl": -9.660843, + "biblFull": -9.255377, + "biblStruct": -9.660843, + "bin": -7.645940, + "binary": -9.660843, + "binary_value_": -9.660843, + "binding.": -10.353990, + "bindings": -7.714932, + "bkLrxZWDtoyX": -10.353990, + "bl": -10.353990, + "blKxZvZlbWYOs": -10.353990, + "black": -10.353990, + "blackLetter": -10.353990, + "blackletter": -10.353990, + "blackletterType": -10.353990, + "blank_spr": -10.353990, + "bllzG": -10.353990, + "block": -9.255377, + "blog": -10.353990, + "blue=": -10.353990, + "bmp": -10.353990, + "bnQIqNlXwVynYbSzL": -10.353990, + "bo": -9.255377, + "body": -8.156765, + "bol": -10.353990, + "bold": -7.645940, + "bon": -10.353990, + "book": -8.744552, + "books": -9.255377, + "bool_value_": -9.660843, + "bootstrap=": -10.353990, + "border": -7.175936, + "border=": -7.135114, + "bot": -9.255377, + "both": -8.967695, + "bottom": -6.119883, + "bottom=": -10.353990, + "bottombraced": -10.353990, + "boxed": -10.353990, + "bpDp": -10.353990, + "bq": -10.353990, + "bqeDju": -10.353990, + "br": -9.660843, + "braced": -10.353990, + "bring": -10.353990, + "brings": -10.353990, + "brm": -10.353990, + "broadcast": -9.660843, + "bt": -10.353990, + "btEztdVhytfg": -10.353990, + "btjcrb": -10.353990, + "build": -8.408080, + "buildArtefactType=": -9.660843, + "buildPath=": -9.660843, + "buildProperties=": -9.660843, + "buildSystemId=": -9.660843, + "built": -10.353990, + "builtIn=": -8.967695, + "bus.": -10.353990, + "business": -10.353990, + "but": -8.051405, + "bv": -10.353990, + "bvsxXDBStU": -10.353990, + "bwUbNW": -10.353990, + "by": -7.021785, + "byte": -9.660843, + "c": -6.920003, + "c/AW": -10.353990, + "c006": -10.353990, + "cCk": -10.353990, + "cCkDERKQaWGBBhEVUGkBVRywCQHRDqDAIOAAwUHCgxG": -10.353990, + "cDKe": -10.353990, + "cDPN": -10.353990, + "cDTYCjcwjYW": -10.353990, + "cEG": -10.353990, + "cEhhoaGpoGBgYamhoaWgOTFeaCSS": -10.353990, + "cEikAlzOTMh": -10.353990, + "cH": -10.353990, + "cIzL": -10.353990, + "cJ": -10.353990, + "cJIxYisgHEatA": -10.353990, + "cKov": -10.353990, + "cL/wB": -10.353990, + "cLbf": -10.353990, + "cMz": -10.353990, + "cOJLfDPsmGFNUL": -10.353990, + "cPugAAAABJRU": -10.353990, + "cQUrnXhXBSui": -10.353990, + "cRoQcROJDYJYmHklxUBoMDcxUyAZVUg": -10.353990, + "cSpyS": -10.353990, + "cVcqlf/": -10.353990, + "cVwZgpTAGA/WRiAYSrLwXf": -10.353990, + "c_gray": -10.353990, + "caI/i": -10.353990, + "cache": -7.714932, + "cache.": -8.744552, + "cached": -9.660843, + "caches": -9.660843, + "calculation": -8.274548, + "calculationFunc": -9.660843, + "call": -8.744552, + "called": -8.744552, + "called.": -10.353990, + "calls.": -9.660843, + "can": -7.520776, + "cannot": -10.353990, + "cap": -10.353990, + "capacity_after_header_": -10.353990, + "capitalize": -6.422164, + "caps": -10.353990, + "case": -6.036502, + "castable": -8.967695, + "casting": -10.353990, + "caused": -10.353990, + "cb": -9.660843, + "cc": -9.660843, + "ccx": -10.353990, + "cd": -9.660843, + "cda": -10.353990, + "cell": -8.744552, + "center": -9.255377, + "centre": -10.353990, + "centric": -10.353990, + "cfa": -10.353990, + "cgksgxBnPhfaPERJZhX": -10.353990, + "chained": -9.660843, + "change": -7.095893, + "change.": -7.869083, + "changed": -7.463618, + "changed.": -8.156765, + "changes": -7.789040, + "changes.": -9.660843, + "char": -7.789040, + "char*": -10.353990, + "character": -10.353990, + "characters": -9.660843, + "charoff": -9.255377, + "checks.": -10.353990, + "chen": -9.660843, + "child": -8.967695, + "choice": -10.353990, + "choices": -9.255377, + "ciABPZvAbNl": -10.353990, + "cia": -9.660843, + "cifuR/Z": -10.353990, + "ciibcwPvF": -10.353990, + "citation": -10.353990, + "clVdZLL": -10.353990, + "clarification": -10.353990, + "class": -7.869083, + "class=": -9.660843, + "classdef=": -10.353990, + "classes": -8.967695, + "classes.": -9.660843, + "classification": -10.353990, + "clean": -10.353990, + "cleanCommand=": -9.660843, + "clear": -9.660843, + "clearsContextBeforeDrawing=": -10.353990, + "client.": -9.660843, + "clu": -10.353990, + "cmpE": -10.353990, + "co": -10.353990, + "coarse": -10.353990, + "code": -8.562230, + "collection": -7.058153, + "collection.": -8.562230, + "collections": -10.353990, + "colname": -9.255377, + "colnum": -10.353990, + "color": -6.462169, + "color=": -6.640418, + "colorSpace=": -10.353990, + "colors=": -10.353990, + "colour.": -10.353990, + "cols": -7.789040, + "colspec": -7.714932, + "column": -8.967695, + "colwidth": -8.274548, + "com": -7.645940, + "combination": -9.660843, + "come": -10.353990, + "command=": -6.665110, + "commercial": -10.353990, + "common": -10.353990, + "communicate": -9.660843, + "community.": -10.353990, + "compare": -10.353990, + "compatVersion=": -10.353990, + "compatible": -10.353990, + "compilation": -10.353990, + "compile": -10.353990, + "compiler": -10.353990, + "complete": -9.255377, + "completes": -8.967695, + "component=": -9.255377, + "compute": -10.353990, + "computer": -10.353990, + "concat": -9.660843, + "concurrent": -8.744552, + "concurrently": -9.660843, + "conditions": -9.255377, + "conf": -10.353990, + "conf=": -9.660843, + "conference": -10.353990, + "config": -10.353990, + "configure": -10.353990, + "configured": -10.353990, + "consectetur": -10.353990, + "consequential": -10.353990, + "consistently": -10.353990, + "constrain": -10.353990, + "constrained": -8.562230, + "constructors": -7.869083, + "contact": -10.353990, + "contain": -10.353990, + "contains": -9.660843, + "content": -8.051405, + "contentMode=": -10.353990, + "contents": -9.255377, + "context=": -8.156765, + "contract": -10.353990, + "contract.": -9.660843, + "contrast": -10.353990, + "contributors": -9.660843, + "control": -10.353990, + "convenient.": -10.353990, + "convention": -9.660843, + "conversion": -10.353990, + "convert": -9.660843, + "copyright": -8.967695, + "core": -10.353990, + "corpus": -9.660843, + "corr": -9.255377, + "corresp": -10.353990, + "corresponding": -9.660843, + "corresponds": -10.353990, + "cost": -9.660843, + "could": -9.660843, + "count": -7.956094, + "count=": -9.660843, + "countTowardsParentMaxPercentage=": -9.660843, + "countTowardsParentMaxPoints=": -9.660843, + "countTowardsParentMaxSelections=": -9.660843, + "countTowardsParentMinPercentage=": -9.660843, + "countTowardsParentMinPoints=": -9.660843, + "countTowardsParentMinSelections=": -9.660843, + "coupled": -9.660843, + "cover": -9.660843, + "cpjPnFcT": -10.353990, + "cpp": -7.956094, + "cq": -10.353990, + "created": -8.744552, + "creating": -8.967695, + "cref=": -10.353990, + "csa": -10.353990, + "csproj": -9.255377, + "csproj_sample": -10.353990, + "cu": -10.353990, + "cuWH": -10.353990, + "cur": -10.353990, + "currencies": -10.353990, + "current": -7.645940, + "currently": -9.255377, + "cursive": -9.255377, + "custom": -8.967695, + "customClass=": -9.660843, + "customization": -8.967695, + "customizations": -9.660843, + "customizations.": -10.353990, + "customize": -10.353990, + "cx/": -10.353990, + "cxx": -10.353990, + "czYrC": -10.353990, + "d": -6.365006, + "d.gml": -8.967695, + "d/": -10.353990, + "d6dde5": -10.353990, + "dABowIYXxg": -10.353990, + "dBHjwHIgsdaSSmA": -10.353990, + "dBU": -10.353990, + "dCLvBpPcHsf": -10.353990, + "dD": -6.798642, + "dEOfKsfPeh": -10.353990, + "dETRQBmoVHnv": -10.353990, + "dGr": -10.353990, + "dIH": -10.353990, + "dJZEgAgX": -10.353990, + "dKuHpm": -10.353990, + "dLMMUHSiSXMEDJBGgRJESRFkBRB": -10.353990, + "dNIsPeWcD/": -10.353990, + "dQ": -10.353990, + "dR": -10.353990, + "dTFte": -10.353990, + "dUSennNZLmI": -10.353990, + "dUWcSgrpv": -10.353990, + "dV": -10.353990, + "dVLhTI": -10.353990, + "dVTfJWDtzwwgByQWEcJucRTE": -10.353990, + "dWcXXEhjUkQXf": -10.353990, + "dWkYceL": -10.353990, + "dX/": -10.353990, + "dZKgOSGzpBQIvsQZhbx": -10.353990, + "d_parent": -10.353990, + "d_particle": -10.353990, + "d_set_projection_simple.gml": -10.353990, + "dabap": -10.353990, + "damage.": -10.353990, + "damages": -10.353990, + "dapibus": -8.562230, + "dashed": -10.353990, + "data": -7.789040, + "datatype": -9.660843, + "date": -10.353990, + "daunting": -10.353990, + "dbeb": -8.967695, + "dbkNzCebm": -10.353990, + "dc": -9.660843, + "ddMhYfHp": -10.353990, + "dda": -8.967695, + "de": -9.660843, + "deMuHU": -10.353990, + "deRZMRiGRsZymKJdcSlukFTey": -10.353990, + "declare": -9.660843, + "declared": -10.353990, + "decorInit": -10.353990, + "decoration": -8.274548, + "deep": -9.660843, + "def": -10.353990, + "default": -7.956094, + "default.": -9.660843, + "defaultValue=": -9.660843, + "defaults": -10.353990, + "define": -10.353990, + "defined": -9.660843, + "deg": -8.967695, + "degree": -10.353990, + "delay": -9.660843, + "delay.": -9.660843, + "delete": -9.660843, + "delimiter": -7.021785, + "delimiter=": -6.616320, + "dellorus.": -10.353990, + "delta_": -8.408080, + "demexp": -10.353990, + "demote": -10.353990, + "departure": -10.353990, + "dependencies": -10.353990, + "dependency": -10.353990, + "depending": -10.353990, + "depends": -10.353990, + "depersist": -10.353990, + "derive": -10.353990, + "describe": -10.353990, + "describes": -10.353990, + "description": -10.353990, + "description=": -8.967695, + "descriptive": -10.353990, + "descriptor=": -9.255377, + "design": -9.660843, + "designed": -10.353990, + "designer": -10.353990, + "desirable": -10.353990, + "destination=": -10.353990, + "detail_particle.d": -10.353990, + "details": -9.660843, + "determine": -10.353990, + "determined": -10.353990, + "developed": -10.353990, + "developer": -9.660843, + "dfd": -10.353990, + "dgkZWVtUjkZGVt": -10.353990, + "dict_": -9.660843, + "dictate": -10.353990, + "dictionaries": -10.353990, + "dictionary": -10.353990, + "dictum": -10.353990, + "difference": -10.353990, + "differently": -10.353990, + "differing": -10.353990, + "digital": -9.255377, + "digitized": -10.353990, + "diplomatic": -10.353990, + "diqYCduhNy": -10.353990, + "dir": -7.869083, + "direct": -10.353990, + "directly": -10.353990, + "disable": -10.353990, + "disableLights.gml": -10.353990, + "disabled": -10.353990, + "disambiguate": -10.353990, + "disambiguate=": -10.353990, + "discarded.": -8.967695, + "disciplines": -10.353990, + "disclaimed.": -10.353990, + "disclaimer": -10.353990, + "disclaimer.": -10.353990, + "disconnects": -10.353990, + "disk": -10.353990, + "display": -8.562230, + "display=": -10.353990, + "displayName=": -9.660843, + "displaying": -10.353990, + "disposed": -8.967695, + "disposed.": -9.255377, + "distinct": -10.353990, + "distinguish": -7.869083, + "distribution.": -10.353990, + "diversity": -10.353990, + "dj": -10.353990, + "dk": -10.353990, + "dkqq": -10.353990, + "dlg": -10.353990, + "dll=": -9.255377, + "dm/syEuBnIZ/FJk": -10.353990, + "dnHxXz": -10.353990, + "dnZnMhGdDb": -10.353990, + "do": -8.744552, + "doZ": -10.353990, + "document": -10.353990, + "documentation": -10.353990, + "documentation.": -10.353990, + "documents": -10.353990, + "does": -9.660843, + "doesn": -9.660843, + "dolor": -10.353990, + "domain": -9.660843, + "don": -9.660843, + "done": -9.255377, + "dotnet": -10.353990, + "dotted": -9.255377, + "double": -9.660843, + "double_value_": -9.660843, + "doublestrikethrough": -10.353990, + "doubleunderline": -10.353990, + "down": -10.353990, + "download": -10.353990, + "dq": -10.353990, + "dqSxtvv": -10.353990, + "drIyMrY/oOTFScrKioqKioiwhFxcBWFVhQaU": -10.353990, + "draw_set_color": -10.353990, + "draw_text": -10.353990, + "drawing": -10.353990, + "driver": -10.353990, + "dropcap": -10.353990, + "dropping": -10.353990, + "dsSnFfZPDYYbh": -10.353990, + "dt": -10.353990, + "dtOi": -10.353990, + "dtd": -10.353990, + "dtfd": -10.353990, + "dtsp": -10.353990, + "du/WLA": -10.353990, + "dummy": -10.353990, + "duplicate": -9.660843, + "during": -10.353990, + "dvzljzpEHqTINVaFlVVvFtDutIx": -10.353990, + "dw": -10.353990, + "dxto": -10.353990, + "dyLaqz": -10.353990, + "dzOBEHSD": -10.353990, + "dzvgD": -10.353990, + "e": -7.463618, + "e/": -10.353990, + "e/V": -10.353990, + "eAHR": -10.353990, + "eAraFFxrUh": -10.353990, + "eCk": -10.353990, + "eDQwMDDQNDIwKqqisBZbOINKZRJGBZRlY": -10.353990, + "eFK": -10.353990, + "eHFnSwy": -10.353990, + "eHLDuBZ": -10.353990, + "eHlbMe": -10.353990, + "eIyc": -10.353990, + "eJs": -10.353990, + "eMO": -10.353990, + "eMcMZP": -10.353990, + "ePtGvg": -10.353990, + "eSpGDNDAiPZFJmK": -10.353990, + "eTP/inB": -10.353990, + "eVHmVP": -10.353990, + "eWXzeRuTy": -10.353990, + "eXsNb": -10.353990, + "eYZKz": -10.353990, + "eZsl": -10.353990, + "ea": -8.967695, + "each": -8.408080, + "early": -10.353990, + "easier": -10.353990, + "easily": -9.660843, + "easyant": -8.408080, + "ec": -10.353990, + "ecVYf": -10.353990, + "ed": -10.353990, + "edgXgYdwvQAJsbrFvdGUDu/QQYZOXPwj": -10.353990, + "edition": -10.353990, + "editions": -10.353990, + "editor": -10.353990, + "eds": -10.353990, + "edy": -10.353990, + "ee": -10.353990, + "efNeLi": -10.353990, + "efffa": -10.353990, + "efqk": -10.353990, + "ei": -10.353990, + "either": -9.660843, + "ejt": -10.353990, + "el": -10.353990, + "element": -8.967695, + "elements": -8.274548, + "elit": -10.353990, + "else": -8.744552, + "em": -8.562230, + "empty": -8.967695, + "en": -8.156765, + "enable": -10.353990, + "enableLights.gml": -10.353990, + "enabled": -8.051405, + "enabled.": -10.353990, + "enabled=": -5.525676, + "encoded": -8.408080, + "encoders": -10.353990, + "encoding": -9.255377, + "encoding.": -9.255377, + "encoding=": -6.049925, + "encountered": -10.353990, + "encyclopedia": -9.660843, + "endeavor.": -10.353990, + "engine": -10.353990, + "enormous": -10.353990, + "enough": -10.353990, + "enough.": -10.353990, + "enrich": -10.353990, + "enrollments.": -10.353990, + "ensure": -9.255377, + "ensuring": -9.660843, + "ent": -6.422164, + "enter": -9.660843, + "entire": -10.353990, + "entity": -10.353990, + "entries": -9.660843, + "entry": -7.956094, + "enumb=": -8.744552, + "environment": -10.353990, + "environment.": -10.353990, + "eoC": -10.353990, + "eogWeP": -10.353990, + "epigraphic": -10.353990, + "eq": -9.660843, + "eqWLuUbZ": -10.353990, + "eqdlq": -10.353990, + "equal": -9.660843, + "equivalent": -9.255377, + "equivalently": -10.353990, + "eschewing": -10.353990, + "especially": -10.353990, + "et": -6.569800, + "eu": -10.353990, + "ev": -10.353990, + "evaluate": -10.353990, + "evaluated": -10.353990, + "even": -10.353990, + "event": -10.353990, + "events.": -9.660843, + "eventtype=": -8.744552, + "everybody": -10.353990, + "evicted": -9.660843, + "ewJhR/D": -10.353990, + "examining": -10.353990, + "example": -9.255377, + "exbix": -10.353990, + "except": -10.353990, + "exchanged.": -10.353990, + "execution": -10.353990, + "exemplary": -10.353990, + "exif": -9.660843, + "exist": -8.744552, + "existing": -8.967695, + "exists": -7.869083, + "expan": -8.967695, + "expected": -10.353990, + "expensive": -9.660843, + "explainText=": -10.353990, + "explicit": -10.353990, + "explicitly": -10.353990, + "exposes": -10.353990, + "express": -10.353990, + "expression": -9.255377, + "expression.": -10.353990, + "expressive": -10.353990, + "extended": -10.353990, + "extensible.": -10.353990, + "extension": -8.408080, + "extensionOf=": -10.353990, + "extensive": -10.353990, + "extraordinary": -10.353990, + "extremely": -10.353990, + "eyk": -10.353990, + "ezLnBQLMkkgNWR": -10.353990, + "ezdlQvVNUrCJS": -10.353990, + "f": -9.660843, + "f.HasAttribute": -10.353990, + "f.Name": -10.353990, + "f.ParentType.DeriveFrom": -10.353990, + "fa8739": -7.714932, + "facebook": -10.353990, + "facilitates": -10.353990, + "facsimile": -10.353990, + "fail.": -10.353990, + "fake": -8.967695, + "faking": -8.967695, + "false": -7.309467, + "family": -7.645940, + "fantasy": -10.353990, + "far": -9.660843, + "fashion.": -10.353990, + "faster": -9.660843, + "features": -10.353990, + "feel": -10.353990, + "felis": -9.255377, + "fern.d": -10.353990, + "fern.png": -10.353990, + "fetch": -10.353990, + "feugiat": -8.744552, + "few": -10.353990, + "fff": -8.744552, + "ffffff": -10.353990, + "field": -8.051405, + "field.": -10.353990, + "field=": -10.353990, + "file": -8.408080, + "file.": -10.353990, + "filePath": -9.660843, + "filePath.ToString": -10.353990, + "filePath=": -6.665110, + "filePathLower": -10.353990, + "filePathLower.Contains": -10.353990, + "filePathLower.EndsWithAny": -10.353990, + "filename=": -7.581401, + "files": -9.660843, + "filled": -10.353990, + "filters": -10.353990, + "find_height.gml": -10.353990, + "finishes.": -10.353990, + "fire": -7.956094, + "fire.d": -10.353990, + "fire_": -10.353990, + "firehay.d": -10.353990, + "fires": -8.562230, + "firewood": -10.353990, + "firewood.d": -10.353990, + "firewood.png": -10.353990, + "first": -5.971963, + "fitness": -10.353990, + "five": -10.353990, + "fixed": -10.353990, + "flOQo": -10.353990, + "flags=": -9.660843, + "flat": -10.353990, + "flattened": -9.660843, + "flexibility": -10.353990, + "flexibleMaxX=": -10.353990, + "flexibleMaxY=": -10.353990, + "flight": -9.660843, + "float": -9.255377, + "floral": -9.660843, + "flying_fuzzy.png": -10.353990, + "focusIndex=": -10.353990, + "focuses": -10.353990, + "focusing": -10.353990, + "folder": -10.353990, + "follow": -10.353990, + "followed": -10.353990, + "following": -8.744552, + "font": -5.583305, + "foot": -10.353990, + "for": -5.832201, + "forTests=": -10.353990, + "form": -9.255377, + "form=": -6.179602, + "formally": -10.353990, + "format": -8.967695, + "format=": -6.952792, + "formats": -10.353990, + "forms": -9.660843, + "found.": -10.353990, + "fps": -10.353990, + "framework": -10.353990, + "framework.": -10.353990, + "free": -9.660843, + "friendlier": -10.353990, + "from": -7.095893, + "frustum_culling.gml": -10.353990, + "frustum_culling_init.gml": -10.353990, + "fsproj": -10.353990, + "fsproj_sample": -9.660843, + "fsproj_sample.XML": -9.660843, + "full": -8.408080, + "fully": -9.255377, + "function": -7.714932, + "function.": -8.562230, + "function=": -10.353990, + "functx": -9.660843, + "furniture": -9.660843, + "further": -9.660843, + "future": -9.660843, + "fx": -9.660843, + "fxml": -10.353990, + "g": -7.789040, + "g/qcELLFPuOG": -10.353990, + "gAQRbCyADx": -10.353990, + "gBeWvCOlJdQ": -10.353990, + "gJ": -10.353990, + "gJR": -10.353990, + "gJsOyi": -10.353990, + "gJvgXzjufU": -10.353990, + "gK": -10.353990, + "gKAc": -10.353990, + "gKBTs": -10.353990, + "gLcIvGtBr/Efr": -10.353990, + "gLk": -10.353990, + "gNggJuQQknMFqXFLyCF": -10.353990, + "gOQNdCby": -10.353990, + "gORHHCSD": -10.353990, + "gOcj/M": -10.353990, + "gOo": -10.353990, + "gSQ": -10.353990, + "gStr": -10.353990, + "gTXyLisFvzcgoNjXY": -10.353990, + "gUOxSHbKs": -10.353990, + "gVQZRpeBiuro": -10.353990, + "gXyTF": -10.353990, + "gXzwynIh": -10.353990, + "gYOC": -10.353990, + "gYRdjGR": -10.353990, + "gaGhqaGgYGGpoaBgaGBvbASSmpTgVRFWCpAZFiYMkGkRxgsKDAIGBBgMGRd": -10.353990, + "gaq": -10.353990, + "gbcNHPLET": -10.353990, + "gbdoHLh": -10.353990, + "gcc": -8.051405, + "geAlGBmEBM": -10.353990, + "generally": -9.660843, + "generate": -10.353990, + "generated": -9.660843, + "generation": -9.660843, + "generic": -9.255377, + "genre": -10.353990, + "geography": -10.353990, + "geometry": -10.353990, + "getEffectTexture.gml": -10.353990, + "getEffectTextureAlpha.gml": -10.353990, + "getLightId.gml": -10.353990, + "getTexture.gml": -10.353990, + "gets": -10.353990, + "gfLYisADEpQE": -10.353990, + "ghRM/wHEaAExgRusPml": -10.353990, + "ghyJjzac": -10.353990, + "gif": -10.353990, + "give": -10.353990, + "given": -7.714932, + "givenname": -10.353990, + "gkG": -10.353990, + "glPrxXEmtGXYjdvOL": -10.353990, + "global": -10.353990, + "global._GMO_DEVICE_NAME": -10.353990, + "global._GMO_DLL_VERSION": -10.353990, + "gm": -10.353990, + "gml": -8.408080, + "gnHe": -10.353990, + "gnZO": -10.353990, + "gnkuXAgMcajhSEjMht": -10.353990, + "go": -9.660843, + "goals": -10.353990, + "going": -8.967695, + "goods": -10.353990, + "google": -9.660843, + "gothic": -10.353990, + "gp": -10.353990, + "gprp": -10.353990, + "gq": -10.353990, + "gr": -10.353990, + "grantshubsupport@cabinetoffice.gov.uk": -10.353990, + "graphic": -10.353990, + "grass_hires.png": -10.353990, + "gray": -8.967695, + "green=": -10.353990, + "gro": -10.353990, + "gt": -7.218496, + "gtOv/": -10.353990, + "gtZoVnT/": -10.353990, + "guarantees": -8.562230, + "gwx": -10.353990, + "gxKCI": -10.353990, + "gxyexwkSNtnJ": -10.353990, + "h": -8.274548, + "hACgcdUQb": -10.353990, + "hBB": -10.353990, + "hBW": -10.353990, + "hCNtmwyOzKnII": -10.353990, + "hCnKggEuMlAkjovmDtMrIRKfK": -10.353990, + "hEYpGVSCwSOYmsPVnZTF": -10.353990, + "hF": -10.353990, + "hFEgzV": -10.353990, + "hFiLCTqEUBzj": -10.353990, + "hGdRf/Az": -10.353990, + "hGjpmujN": -10.353990, + "hH": -10.353990, + "hHGEmDrXJaJlrQ": -10.353990, + "hLiKvQo/x": -10.353990, + "hMProfnAk": -10.353990, + "hNubMGfZkgAZq": -10.353990, + "hOxDNDqIZ": -10.353990, + "hPXfsJpR": -10.353990, + "hQiRqPNEe/sbLvX": -10.353990, + "hR": -10.353990, + "hRmHuDNJL/fsgNr": -10.353990, + "hXRNJg/FVLrj/G": -10.353990, + "hZDHBNEJqHKM": -10.353990, + "hamburger=": -10.353990, + "hanging": -10.353990, + "has": -7.309467, + "hasellus": -10.353990, + "have": -7.262947, + "having": -10.353990, + "hay.png": -10.353990, + "hbbA": -10.353990, + "hbhwSJi": -10.353990, + "hbt": -10.353990, + "hd": -10.353990, + "hdHYkpjrbGPOzk": -10.353990, + "head": -8.156765, + "header": -8.562230, + "header=": -10.353990, + "header_": -9.660843, + "header_size_": -9.660843, + "headers": -10.353990, + "height": -7.714932, + "height=": -8.967695, + "height_": -10.353990, + "hello": -10.353990, + "help": -10.353990, + "help.rtf": -10.353990, + "helper": -8.744552, + "helps": -10.353990, + "here": -9.660843, + "here.": -9.660843, + "heuristically": -10.353990, + "hfhTm": -10.353990, + "hgXx": -10.353990, + "hgfezwvcR": -10.353990, + "hh": -10.353990, + "hhsTlIFkLQgjIHkd": -10.353990, + "high": -10.353990, + "highly": -10.353990, + "hjAKkjOFLt": -10.353990, + "hkn": -10.353990, + "hl7": -10.353990, + "hlCCPFfN": -10.353990, + "hm": -10.353990, + "hmUvNVOD": -10.353990, + "hmZ": -10.353990, + "hoCt": -10.353990, + "holder": -10.353990, + "holders": -10.353990, + "holobloc": -10.353990, + "home": -10.353990, + "hood": -10.353990, + "how": -9.660843, + "however": -9.255377, + "hpj": -10.353990, + "hpp": -10.353990, + "hqq": -10.353990, + "hr": -10.353990, + "href": -9.255377, + "href=": -7.021785, + "hs": -10.353990, + "ht": -10.353990, + "html": -8.156765, + "http": -6.770471, + "https": -9.660843, + "hufc": -10.353990, + "human": -9.660843, + "humanities": -10.353990, + "hundreds": -9.660843, + "hwL": -10.353990, + "hxx": -10.353990, + "hyLOKh": -10.353990, + "hyphen": -10.353990, + "i": -8.051405, + "i.e.": -7.218496, + "i/": -10.353990, + "i//": -10.353990, + "iAj": -10.353990, + "iBSDSDaw": -10.353990, + "iD": -10.353990, + "iEENEMEziIPMoooJHsGkSiMEHwCUpHgPRBGnQlcpcglY": -10.353990, + "iFiFSoMoG": -10.353990, + "iHZ": -10.353990, + "iIdIYMGkvktSDLM": -10.353990, + "iIfguA": -10.353990, + "iIqCZl": -10.353990, + "iJ": -10.353990, + "iJc": -10.353990, + "iKKUUG": -10.353990, + "iKqBHSaNNuW": -10.353990, + "iLcrZVmI": -10.353990, + "iOSBSAiI": -10.353990, + "iP": -10.353990, + "iQIqkBiYXIM": -10.353990, + "iRNV": -10.353990, + "iRx/T": -10.353990, + "iTOQFMzsMROMAcKSU": -10.353990, + "iUyWRK": -10.353990, + "iVBORw": -6.952792, + "iVyA": -10.353990, + "iWAqN": -10.353990, + "iXMGkVaTOh": -10.353990, + "iYCQ/Wz": -10.353990, + "iYPD//rVZ/GsiszWS": -10.353990, + "ia": -10.353990, + "ici": -10.353990, + "ico": -9.660843, + "id": -6.482789, + "id=": -4.933455, + "ideas": -10.353990, + "ident=": -4.873351, + "identical": -7.956094, + "identifier=": -9.660843, + "idl": -10.353990, + "ie": -10.353990, + "ies": -10.353990, + "if": -6.888254, + "ifXrUnXAoBo/RePsBmbc": -10.353990, + "ignored.": -10.353990, + "igpN": -10.353990, + "iiyP": -10.353990, + "ijs": -10.353990, + "ikO": -10.353990, + "ilGQmBabYvf": -10.353990, + "image": -10.353990, + "img": -9.660843, + "immediately": -9.255377, + "impaYVg": -10.353990, + "imperdiet": -10.353990, + "imperdiet.": -8.744552, + "impl_.body_": -8.967695, + "implement": -8.744552, + "implementing": -9.660843, + "implements": -8.274548, + "implied": -9.660843, + "important": -8.562230, + "imr": -10.353990, + "in": -5.789642, + "inCamera.gml": -10.353990, + "inc": -10.353990, + "incidental": -10.353990, + "include": -10.353990, + "including": -8.967695, + "incorrectly": -10.353990, + "indent": -10.353990, + "indicates": -10.353990, + "indirect": -10.353990, + "information": -10.353990, + "infrastructure": -10.353990, + "inherit": -9.660843, + "inheritsScope=": -10.353990, + "inheritsSet=": -10.353990, + "init": -9.660843, + "initLights.gml": -10.353990, + "initial": -7.021785, + "initialize": -9.255377, + "initialize=": -9.660843, + "initialized": -9.660843, + "initio": -10.353990, + "inl": -10.353990, + "inline": -9.660843, + "input": -9.660843, + "inside": -8.744552, + "instance": -8.562230, + "instanceId=": -8.967695, + "instead": -9.660843, + "int": -8.744552, + "int_value_": -9.660843, + "integer": -9.255377, + "integration.": -10.353990, + "intend": -10.353990, + "intended": -8.562230, + "intends": -10.353990, + "interface": -8.744552, + "internal": -10.353990, + "interoperability": -10.353990, + "interoperability.": -10.353990, + "interruption": -10.353990, + "interview": -10.353990, + "into": -8.744552, + "introductory": -10.353990, + "invoke": -8.967695, + "io": -10.353990, + "ipb": -10.353990, + "ipsum": -10.353990, + "irrelevant.": -10.353990, + "is": -5.317037, + "isTestSource=": -9.660843, + "isVZQ": -10.353990, + "issue": -9.660843, + "it": -6.920003, + "it.": -10.353990, + "itEsskgrxDVPRILeAXFl": -10.353990, + "itFzpEPXkhjb": -10.353990, + "itIs": -10.353990, + "ital": -10.353990, + "italic": -6.743072, + "italics": -10.353990, + "itbfhQCPbC": -10.353990, + "item": -7.409551, + "item.": -9.255377, + "items": -7.058153, + "its": -8.408080, + "itself": -9.660843, + "ixsxVCR": -10.353990, + "izFhgopAVMdnttHcq": -10.353990, + "izGTLxFiBZOWR": -10.353990, + "j": -7.714932, + "j/INJbGZFfSy": -10.353990, + "jABzF": -10.353990, + "jCfI": -10.353990, + "jCm": -10.353990, + "jCnpwduAPZMvaCz": -10.353990, + "jEOxvx": -10.353990, + "jFMAiKb": -10.353990, + "jFmrGFBMPDk": -10.353990, + "jKdWQEqB": -10.353990, + "jNsBJyAhCyh": -10.353990, + "jO": -9.660843, + "jOL": -10.353990, + "jPwzYlj": -10.353990, + "jQBDtp": -10.353990, + "jQyOTuLcaiNO": -10.353990, + "jTUTu": -10.353990, + "jUBDsJwQGmhoaGpoWBhoGhgYGGp": -10.353990, + "jVZuqtJtW": -10.353990, + "jVrBa": -10.353990, + "jW": -10.353990, + "jWCZK": -10.353990, + "jWqnhRT": -10.353990, + "jYEIVdvQc": -10.353990, + "jYWUxHS": -10.353990, + "jZNiMqJJWVyt": -10.353990, + "janmPczUK": -10.353990, + "java": -9.660843, + "javafx": -8.967695, + "jbXuQNvAXFLFpzAmJ": -10.353990, + "jcI": -10.353990, + "jdwPuATYmXfuUh": -10.353990, + "jeJgqoygWaekkQxbQOKOpnV": -10.353990, + "jenitennison": -10.353990, + "jfRvPET/": -10.353990, + "jg": -10.353990, + "jiW": -10.353990, + "jj": -10.353990, + "jjtmQvepmgE": -10.353990, + "jkDPNdf": -10.353990, + "jkMRwPARx": -10.353990, + "jki": -10.353990, + "jl": -10.353990, + "jlC": -10.353990, + "jlGoXmA": -10.353990, + "jn": -10.353990, + "join": -10.353990, + "journal": -10.353990, + "jpe": -10.353990, + "jpeg": -10.353990, + "jpg": -10.353990, + "jpgok": -10.353990, + "jqLqOZUABlFViZ": -10.353990, + "jtWtWAWSBwWmVBG": -10.353990, + "juL": -10.353990, + "jupMo": -10.353990, + "just": -10.353990, + "jvJWBrlVQSHWaIv": -10.353990, + "jvTWkt": -10.353990, + "jw/": -10.353990, + "jyk": -10.353990, + "jzlQTFRN": -10.353990, + "k": -8.051405, + "kAzhuUeg": -10.353990, + "kBsBRznisUr": -10.353990, + "kCiHfm/": -10.353990, + "kDBmaOqczXoXgTz": -10.353990, + "kES": -10.353990, + "kFNlUBAQKQaRHBDJBpEcELDggMGBBQELSqbvza": -10.353990, + "kFovYp": -10.353990, + "kHrNL": -10.353990, + "kHxtHdYFCrvY": -10.353990, + "kKSw/ufSTdWakwceU": -10.353990, + "kL": -10.353990, + "kLJV": -10.353990, + "kMicrosecondsPerDay": -10.353990, + "kMicrosecondsPerHour": -10.353990, + "kMicrosecondsPerMillisecond": -10.353990, + "kMicrosecondsPerMinute": -10.353990, + "kMicrosecondsPerSecond": -10.353990, + "kN": -10.353990, + "kNAhVXLyYRIk": -10.353990, + "kOKvzMRmPhiRYF": -10.353990, + "kQ": -9.660843, + "kQM": -10.353990, + "kSvJGSvgTNN": -10.353990, + "kSyvA": -10.353990, + "kU": -10.353990, + "kXQWWLZmS": -10.353990, + "kXhXBjGP": -10.353990, + "kY": -10.353990, + "kYkIJ": -10.353990, + "kZ": -10.353990, + "kZOzF": -10.353990, + "kbexcB/AEhbiVW/ps": -10.353990, + "kc": -10.353990, + "kcO": -10.353990, + "kdBaoozyqKfnc": -10.353990, + "keep": -10.353990, + "keepEnvironmentInBuildfile=": -9.660843, + "key": -7.463618, + "key=": -6.346657, + "keyboard": -10.353990, + "keyboard_check_direct": -9.660843, + "keyword.": -9.660843, + "kghGyBgpzbVujW": -10.353990, + "kgqc": -10.353990, + "kijXbzIc": -10.353990, + "kimU": -10.353990, + "kind=": -8.562230, + "kinds": -10.353990, + "kirTZ": -10.353990, + "kj": -10.353990, + "kjvNgDwAErjxuj": -10.353990, + "kkqzhHnBjSmbROKYEbGWGEeado": -10.353990, + "kl": -10.353990, + "kmQEcgoTXRedObsY": -10.353990, + "knnkBYSnEADRwKS": -10.353990, + "koXabRrOTvvN": -10.353990, + "kq": -10.353990, + "kqvhICCph": -10.353990, + "krCRZCQXDiY": -10.353990, + "ksEB": -10.353990, + "ksWFrFIgWEcixhHAVXq": -10.353990, + "kt/": -10.353990, + "ktlH": -10.353990, + "kuYZVSOcdF": -10.353990, + "kvFNwPai": -10.353990, + "kvFTSSvIGnsQjiqTSIN": -10.353990, + "kxyKQEDqPERwBiPs/qvBZzU/tqaTmqNUUvNge": -10.353990, + "kyz": -10.353990, + "l": -10.353990, + "lEI": -10.353990, + "lFpSTpWMx": -10.353990, + "lIoAAAAASUVORK": -10.353990, + "label": -8.562230, + "label=": -9.660843, + "lang": -9.255377, + "language": -9.660843, + "language=": -9.660843, + "laoreet.": -8.408080, + "large": -10.353990, + "largely": -10.353990, + "larger": -9.660843, + "last": -7.463618, + "layout": -10.353990, + "layoutMaster": -10.353990, + "leak": -9.660843, + "learned": -10.353990, + "leave": -8.051405, + "leaves.png": -10.353990, + "left": -6.592790, + "left=": -10.353990, + "leftbraced": -10.353990, + "legal_case": -10.353990, + "legislation": -10.353990, + "lengthdir_all_": -10.353990, + "lengthdir_x_": -10.353990, + "lengthdir_y_": -10.353990, + "lengthdir_z_": -10.353990, + "lengthdr": -10.353990, + "lessons": -10.353990, + "let": -9.255377, + "letter": -10.353990, + "letterspace": -10.353990, + "level": -9.255377, + "level=": -10.353990, + "liability": -9.660843, + "liable": -10.353990, + "liberty": -10.353990, + "licence": -9.660843, + "licences.": -10.353990, + "license=": -10.353990, + "licensed": -9.660843, + "life": -10.353990, + "like": -8.967695, + "limit": -8.744552, + "limited": -8.967695, + "line": -7.520776, + "line=": -7.581401, + "line_col.gml": -10.353990, + "linguistic": -9.660843, + "lining": -10.353990, + "lining.": -10.353990, + "list": -8.967695, + "list.": -9.660843, + "list_": -9.660843, + "listed": -10.353990, + "listen": -8.562230, + "lists": -10.353990, + "literature": -10.353990, + "loadModels.gml": -10.353990, + "loadTextures.gml": -10.353990, + "loadable": -10.353990, + "loaded": -9.255377, + "loader/saver": -10.353990, + "log": -9.660843, + "logger": -9.660843, + "logo": -9.660843, + "long": -9.660843, + "loosely": -9.660843, + "lorem": -8.408080, + "loss": -10.353990, + "love": -10.353990, + "low": -10.353990, + "ls": -10.353990, + "lsCisjMp": -10.353990, + "lt": -8.408080, + "m": -6.770471, + "m.HasAttribute": -10.353990, + "m.NbLinesOfCode": -10.353990, + "m.SourceDecls.First": -10.353990, + "m.SourceFileDeclAvailable": -10.353990, + "m/dYWSjAjmMqP": -10.353990, + "mCBQ": -10.353990, + "mDcvV": -10.353990, + "mDsBLacCLfUeY": -10.353990, + "mF": -10.353990, + "mHASIhbAb": -10.353990, + "mIs": -10.353990, + "mLhXm": -10.353990, + "mLlW": -10.353990, + "mMmt": -10.353990, + "mNOAqbTRv": -10.353990, + "mNgGAWjYBSMglEwCkbBSAcACBAAAb": -9.660843, + "mNgGKpgztI": -10.353990, + "mOrGkCBIUIROEIEiKICmCpAiSTiAqJhAT/Rfevu/BwUZGlv": -10.353990, + "mPFFyvT": -10.353990, + "mPJmBxKwbv/Wf": -10.353990, + "mQpkOVaxjNFzLdEXjiAtYtylP": -10.353990, + "mRVjMZW": -10.353990, + "mRcVUPgpoAiK": -10.353990, + "mRjuDIAwYKcvUALAHhK": -10.353990, + "mTjRczSuoEKunY": -10.353990, + "mUjltWl": -10.353990, + "mVEhkMuWYdVeZGQTrtCZTDqz": -10.353990, + "mVq": -10.353990, + "mWvkr": -10.353990, + "mXe": -10.353990, + "mYsgC": -10.353990, + "mYsgFDzUcpODGN": -10.353990, + "mZw": -10.353990, + "machine": -10.353990, + "macro=": -5.377256, + "made": -9.660843, + "magazine": -10.353990, + "maintain": -10.353990, + "maintained": -10.353990, + "major": -10.353990, + "majors": -10.353990, + "make": -8.967695, + "making": -9.255377, + "manage": -10.353990, + "managed": -10.353990, + "managedBuildOn=": -9.660843, + "manipulating": -10.353990, + "manually": -8.967695, + "manuscript": -9.660843, + "many": -8.967695, + "mapping": -10.353990, + "maps": -10.353990, + "maqdQg": -10.353990, + "marg1": -10.353990, + "marg2": -10.353990, + "marg4": -10.353990, + "margin": -9.660843, + "markup": -10.353990, + "martin@refme.com": -10.353990, + "master": -10.353990, + "match=": -5.911339, + "matches": -10.353990, + "material": -10.353990, + "materials": -10.353990, + "mathematical": -9.660843, + "maxConcurrent": -10.353990, + "maxHeight=": -10.353990, + "maxOccurs=": -10.353990, + "maxPercentage=": -9.660843, + "maxPoints=": -9.660843, + "maxSelections=": -9.660843, + "maxWidth=": -10.353990, + "maximum": -9.660843, + "may": -8.967695, + "mbQdVV": -10.353990, + "mcaB": -10.353990, + "me": -9.660843, + "mean": -10.353990, + "means": -10.353990, + "media": -10.353990, + "meeting": -10.353990, + "meets": -10.353990, + "memoization": -9.660843, + "memoized": -10.353990, + "memoizes": -9.660843, + "memoizing": -9.660843, + "merchantability": -10.353990, + "message": -6.952792, + "message.": -10.353990, + "messages": -7.262947, + "met": -10.353990, + "meta": -10.353990, + "method": -6.827629, + "method.": -9.660843, + "methods.": -9.660843, + "metus": -8.408080, + "mf": -10.353990, + "mfE": -10.353990, + "mfcribbon": -10.353990, + "mfmtmVPvDj": -10.353990, + "microsoft": -9.255377, + "microsoft.net.object.binary.base": -9.660843, + "microsoft.net.object.bytearray.base": -10.353990, + "microsoft.net.object.soap.base": -10.353990, + "middle": -8.562230, + "mime": -9.660843, + "mimetype": -8.562230, + "mimetype.": -10.353990, + "mimetype=": -9.660843, + "min": -7.645940, + "minHeight=": -10.353990, + "minOccurs=": -9.255377, + "minPercentage=": -9.660843, + "minPoints=": -9.660843, + "minRequiredRevision=": -10.353990, + "minSelections=": -9.660843, + "minWidth=": -9.660843, + "mirror": -10.353990, + "misassigned": -10.353990, + "mix": -9.255377, + "mjYCSq": -10.353990, + "mjml": -10.353990, + "mk": -8.744552, + "mk/Ju/": -10.353990, + "mm": -10.353990, + "mmEup": -10.353990, + "mml": -10.353990, + "mnemonicParsing=": -10.353990, + "mock": -8.967695, + "mod_to_triList.gml": -10.353990, + "mode": -9.255377, + "mode=": -5.278816, + "model": -10.353990, + "modelclasses": -10.353990, + "modern": -9.255377, + "modes": -10.353990, + "modification": -10.353990, + "modifications": -10.353990, + "modify": -8.562230, + "module": -9.255377, + "module.": -10.353990, + "module.ant": -10.353990, + "module.ivy": -10.353990, + "module=": -8.744552, + "moduleId=": -7.714932, + "modules": -9.660843, + "monitor": -10.353990, + "monospace": -10.353990, + "morNcfuQpOwP": -10.353990, + "more": -7.463618, + "mostly": -10.353990, + "motion_picture": -8.967695, + "move": -10.353990, + "ms": -10.353990, + "msdata": -8.156765, + "mt": -10.353990, + "mtpvCfXPqb": -10.353990, + "mulberrytech": -9.660843, + "multiple": -8.562230, + "mus.": -9.660843, + "must": -8.156765, + "mvJ": -10.353990, + "mvudofkgCyIzxffiNrPw": -10.353990, + "mwStcxoPbkVQwvqsc": -10.353990, + "mxGwTR": -10.353990, + "mxfN": -10.353990, + "my": -9.255377, + "myapp": -10.353990, + "myzJZL": -10.353990, + "n": -7.463618, + "nASOA": -10.353990, + "nDJzCqtxgXfltp": -10.353990, + "nDe": -10.353990, + "nDl": -10.353990, + "nE": -10.353990, + "nFZK": -10.353990, + "nHk": -10.353990, + "nIoLz": -10.353990, + "nJtAuozQTDSFBnYc/EmgEBAyoxJnjITbn": -10.353990, + "nLsCvvBvYXPk": -10.353990, + "nOHLwO": -10.353990, + "nOptV": -10.353990, + "nOqG": -10.353990, + "nPgJu": -10.353990, + "nQv": -10.353990, + "nUNqOwhmGBOLoAQP": -10.353990, + "nVFIRWFrikloiwVhVQUuqLQioWuOBGxIuLE/gvfve": -10.353990, + "nVqbQf": -10.353990, + "nW": -10.353990, + "nXLgCAQzfoSKInurCvZLpJ": -10.353990, + "nYx": -10.353990, + "nZLn": -10.353990, + "nZqvYeuJG": -10.353990, + "name": -7.095893, + "name.": -10.353990, + "name/value": -10.353990, + "name=": -3.965428, + "named": -9.255377, + "nameend": -9.660843, + "namespace": -8.051405, + "namespace=": -9.660843, + "namest": -9.255377, + "naming": -10.353990, + "nbX": -10.353990, + "ncSFFESoQkcuSdbZyv": -10.353990, + "ncl": -9.660843, + "nd": -10.353990, + "ndNa": -10.353990, + "ne": -10.353990, + "nec": -10.353990, + "necessary": -10.353990, + "need": -7.714932, + "needed": -10.353990, + "needs": -9.660843, + "negligence": -10.353990, + "neither": -9.255377, + "net": -8.967695, + "netcore": -10.353990, + "netstandardapp": -10.353990, + "neutral": -8.967695, + "never": -8.744552, + "new": -7.789040, + "newLayoutMaster": -9.660843, + "newly": -9.660843, + "newsletter": -10.353990, + "newspaper": -10.353990, + "next": -10.353990, + "nimus": -9.660843, + "nivBN": -10.353990, + "nkL": -10.353990, + "nlRFQJAPW": -10.353990, + "nnKeQb": -10.353990, + "nnSFhgzOAZLqOZ": -10.353990, + "no": -8.156765, + "node_modules": -10.353990, + "noeNhfo": -10.353990, + "non": -9.660843, + "none": -9.255377, + "noon": -10.353990, + "nor": -9.255377, + "normal": -8.051405, + "normalize": -8.967695, + "normally": -8.562230, + "normalstyle": -10.353990, + "normalweight": -10.353990, + "not": -6.952792, + "notation": -10.353990, + "nothing": -10.353990, + "notice": -9.660843, + "notification": -8.562230, + "notification.": -9.660843, + "notifications": -7.262947, + "notifications.": -8.744552, + "notify": -9.255377, + "notmycode": -9.660843, + "np": -10.353990, + "nproj": -10.353990, + "nproj_sample": -9.660843, + "nr/CmVZNk": -10.353990, + "nrcV": -10.353990, + "ns": -7.520776, + "nsJd": -10.353990, + "nu": -10.353990, + "nuget": -10.353990, + "null": -8.408080, + "null.": -8.051405, + "nulla": -8.562230, + "number": -7.869083, + "number=": -8.408080, + "nvfB": -10.353990, + "nvzEiH": -10.353990, + "nvza": -10.353990, + "nx": -10.353990, + "nxGn": -10.353990, + "nzebg": -10.353990, + "o": -7.409551, + "oButj": -10.353990, + "oC": -10.353990, + "oDDQNLDQMDTQMDDQNDAyqogOVUlApB": -10.353990, + "oKM": -10.353990, + "oMEiFNNw": -10.353990, + "oMI": -10.353990, + "oNPYWvn": -10.353990, + "oQtb": -10.353990, + "oS": -10.353990, + "oT": -10.353990, + "oUPCRb": -10.353990, + "oYNQKb": -10.353990, + "oYnWJOEgKAR": -10.353990, + "oasis": -10.353990, + "obj": -9.255377, + "obj_": -9.660843, + "obj_bench": -10.353990, + "obj_camera": -10.353990, + "obj_camera.pitch": -10.353990, + "obj_camera.roll": -10.353990, + "obj_camera.x": -10.353990, + "obj_camera.y": -10.353990, + "obj_camera.yaw": -10.353990, + "obj_control": -10.353990, + "obj_fern": -10.353990, + "obj_fire": -10.353990, + "obj_fire_particle_emitter": -10.353990, + "obj_fuzzies": -10.353990, + "obj_game_init": -10.353990, + "obj_grass": -10.353990, + "obj_house": -10.353990, + "obj_lantern": -10.353990, + "obj_master_outside_night": -10.353990, + "obj_player": -10.353990, + "obj_player_eyes": -10.353990, + "obj_sky": -10.353990, + "obj_soldier": -10.353990, + "obj_tree": -10.353990, + "obj_woodstack": -10.353990, + "object": -6.503842, + "object.": -8.967695, + "objects": -7.095893, + "obmGePC": -10.353990, + "observe": -7.869083, + "observed": -10.353990, + "odl": -10.353990, + "of": -5.377256, + "offer": -9.660843, + "often": -9.255377, + "og": -10.353990, + "ogDWLJADAxmxSbCKVlXsZlUFh": -10.353990, + "ogO": -10.353990, + "oi": -10.353990, + "oi/aMR": -10.353990, + "ojuXnrUFOKwHgOG": -10.353990, + "okay": -8.744552, + "okkRiCdGPIF": -10.353990, + "oknEE": -10.353990, + "okyrolgPYAAAAASUVORK": -10.353990, + "old": -10.353990, + "on": -6.616320, + "on.": -8.562230, + "onChanged": -9.660843, + "onCreateOnly": -10.353990, + "onRelease": -10.353990, + "once": -8.967695, + "one": -6.888254, + "one.": -10.353990, + "ones": -9.660843, + "only": -7.358257, + "only.": -10.353990, + "onto": -10.353990, + "ontologies": -10.353990, + "ooEPB": -10.353990, + "op": -10.353990, + "opaque=": -10.353990, + "opengis": -9.660843, + "operation": -9.660843, + "operation.": -10.353990, + "operations": -8.562230, + "optional": -9.660843, + "optionally": -9.660843, + "optionnal": -10.353990, + "options": -9.660843, + "or": -5.899642, + "ord": -9.660843, + "order": -7.714932, + "org": -7.463618, + "org=": -9.660843, + "organisation=": -8.744552, + "orig": -9.255377, + "origin.": -10.353990, + "origin_.x_": -10.353990, + "origin_.y_": -10.353990, + "os=": -10.353990, + "other": -7.645940, + "others": -10.353990, + "otherwise": -9.660843, + "our": -9.660843, + "out": -8.744552, + "out.": -10.353990, + "outer": -10.353990, + "outgrow": -10.353990, + "output": -9.660843, + "output=": -8.562230, + "outsourcing": -10.353990, + "over": -9.255377, + "overload": -9.660843, + "override": -10.353990, + "own": -9.255377, + "ox": -10.353990, + "oxford": -10.353990, + "oxim": -10.353990, + "oxojqHlnvBCWCN": -10.353990, + "oz": -10.353990, + "p": -7.175936, + "pAAAAAElFTkSuQmCC": -10.353990, + "pAeStjNjzDxip/KFyX": -10.353990, + "pD": -10.353990, + "pDH": -10.353990, + "pE": -10.353990, + "pFxff": -10.353990, + "pGRKyPXVlZWHeXEQc": -10.353990, + "pJXV": -10.353990, + "pKfJtL": -10.353990, + "pKq": -10.353990, + "pMNwZakBJHEq": -10.353990, + "pOgkpBo": -10.353990, + "pPEPJlUSZDMMBp": -10.353990, + "pRm": -10.353990, + "pTEPjObefdhf": -10.353990, + "pVgHNQxaMqHATdvm": -10.353990, + "pVp": -10.353990, + "pWbLT": -10.353990, + "pYM": -10.353990, + "pYb": -10.353990, + "package": -9.660843, + "packageName": -9.660843, + "padding": -5.086132, + "padding=": -6.441967, + "page": -10.353990, + "pageTop": -10.353990, + "pairs.": -10.353990, + "pamphlet": -9.660843, + "paper": -10.353990, + "parameter": -8.562230, + "parameter.": -10.353990, + "parameters": -10.353990, + "parameters.": -10.353990, + "parent": -8.408080, + "parent=": -9.660843, + "parseType": -10.353990, + "parsing": -10.353990, + "part": -9.660843, + "particle": -10.353990, + "particular": -8.744552, + "pass": -9.660843, + "passed": -10.353990, + "path": -10.353990, + "path.": -9.660843, + "paths": -8.744552, + "paths=": -8.967695, + "pattern=": -6.179602, + "pay": -10.353990, + "payments": -10.353990, + "pbH": -10.353990, + "pdbonly": -9.255377, + "pdtNd": -10.353990, + "pecQs": -10.353990, + "pede": -10.353990, + "per": -9.255377, + "performance": -10.353990, + "performs": -10.353990, + "permit": -9.660843, + "permitted": -10.353990, + "personal_communication": -9.660843, + "phase": -10.353990, + "phases": -10.353990, + "philosophy": -10.353990, + "photoshop": -9.660843, + "pifiGWz": -10.353990, + "pjHcxeJ/": -10.353990, + "place": -9.255377, + "placed": -10.353990, + "placeholderIdentifier=": -9.660843, + "places": -10.353990, + "playerMouselook.gml": -10.353990, + "playerMovement.gml": -10.353990, + "please": -10.353990, + "plug": -10.353990, + "plugin_state_location": -6.798642, + "pn/": -10.353990, + "png": -8.274548, + "pockets": -10.353990, + "point": -10.353990, + "point=": -7.869083, + "points": -8.744552, + "policy": -8.744552, + "politics": -10.353990, + "polo": -10.353990, + "populate": -10.353990, + "populated": -8.967695, + "port=": -10.353990, + "possibility": -10.353990, + "possible": -9.255377, + "post": -9.660843, + "posted": -9.255377, + "potential": -9.660843, + "potentially": -9.660843, + "pre": -10.353990, + "precedes": -7.021785, + "preceding": -8.967695, + "predicate=": -6.091310, + "prefHeight=": -9.660843, + "prefWidth=": -8.562230, + "prefix": -8.274548, + "prefix=": -5.600400, + "prefixes": -8.967695, + "prescriptive": -9.255377, + "present": -9.660843, + "preserve": -10.353990, + "previous": -9.660843, + "primarily": -10.353990, + "primary": -10.353990, + "print": -10.353990, + "printed": -10.353990, + "private": -10.353990, + "problemReportingEnabled=": -8.744552, + "process": -8.744552, + "processes": -10.353990, + "processing": -9.660843, + "processing.": -10.353990, + "procurement": -10.353990, + "produce": -10.353990, + "production": -10.353990, + "profile": -8.967695, + "profiles": -10.353990, + "profits": -10.353990, + "programmer": -10.353990, + "programmers": -10.353990, + "progress": -10.353990, + "project": -8.274548, + "project.": -10.353990, + "projectType=": -10.353990, + "project_name": -8.744552, + "projects": -9.660843, + "projects.": -10.353990, + "promise": -10.353990, + "prompt": -8.744552, + "properties": -6.986694, + "properties/methods": -10.353990, + "property": -6.049925, + "property.": -7.869083, + "property=": -10.353990, + "propertyAccessControl=": -9.660843, + "props": -8.408080, + "prosopography": -10.353990, + "protocol=": -10.353990, + "prototype": -10.353990, + "provide": -9.255377, + "provided": -7.520776, + "provided.": -8.744552, + "provider": -10.353990, + "provides": -8.562230, + "providing": -7.358257, + "psWgUGHq": -10.353990, + "psgvkDGLIBYgAGKogIwjrm": -10.353990, + "pt": -7.956094, + "ptr_": -8.967695, + "public": -10.353990, + "public/New_Case_Create_Email_Alert": -10.353990, + "published": -10.353990, + "publisher": -10.353990, + "punctuation": -10.353990, + "purl": -10.353990, + "purpose": -7.956094, + "purposes": -10.353990, + "put": -9.660843, + "pvIx": -10.353990, + "pvvueV": -10.353990, + "pw": -10.353990, + "pwBJykGyBj": -10.353990, + "px": -10.353990, + "pxomsm": -10.353990, + "q": -8.274548, + "qA/EgvMogJryB": -10.353990, + "qAHAOigBoAFXio/": -10.353990, + "qEJ": -10.353990, + "qFBf": -10.353990, + "qG": -10.353990, + "qGb": -10.353990, + "qGlLDYdBlTUVYjKtKKAqUAEhpPko/": -10.353990, + "qH": -10.353990, + "qJyq": -10.353990, + "qLzudCOhJjaxX": -10.353990, + "qO": -10.353990, + "qOAAPvZJcvAoJlHnRz": -10.353990, + "qPSlq": -10.353990, + "qPi": -10.353990, + "qS": -10.353990, + "qT": -9.660843, + "qYVUvpmci": -10.353990, + "qYo": -10.353990, + "qbV": -10.353990, + "qck": -10.353990, + "qeJjZrFRUij/yfo//WhArI/vaKDhxbbRqqdgsSzyntmKGsoCgUjLVe": -10.353990, + "qgyvPZIgmA": -10.353990, + "qkr": -10.353990, + "qnAcPbLZlMU": -10.353990, + "qname": -7.645940, + "qoUMoHQL": -10.353990, + "quNAw": -10.353990, + "quam": -9.660843, + "queried": -10.353990, + "query": -8.967695, + "query=": -10.353990, + "queryBinding=": -9.660843, + "querying": -10.353990, + "queued": -10.353990, + "queues": -9.660843, + "quis": -8.744552, + "quite": -9.660843, + "quot": -6.952792, + "quote": -10.353990, + "quotes=": -7.789040, + "qw": -10.353990, + "qwHDYutqtRtrqSnkim": -10.353990, + "qwl": -10.353990, + "qySPGyjyEAhXMzBiHy": -10.353990, + "qznsmlVeCKxv": -10.353990, + "r": -7.789040, + "r/kEfQ": -10.353990, + "rAczoRMDBZ": -10.353990, + "rBgCuDrl": -10.353990, + "rCN": -10.353990, + "rEB/F": -10.353990, + "rEsbvcrETybvIJ": -10.353990, + "rGKA": -10.353990, + "rGlvf": -10.353990, + "rIIABjc": -10.353990, + "rLUQxX": -10.353990, + "rQS": -10.353990, + "rRWAMJ": -10.353990, + "rTYa": -10.353990, + "rTcj": -10.353990, + "rUv": -10.353990, + "rWWlUHFVjgjXbPN": -10.353990, + "rXB": -10.353990, + "rYZ": -10.353990, + "rZb": -10.353990, + "raKlM": -10.353990, + "raTSFuB": -10.353990, + "raWbyOOyl": -10.353990, + "radius": -7.714932, + "raise": -9.660843, + "raiseAndSetIfChanged": -10.353990, + "raisePropertyChanging": -8.967695, + "raised": -10.353990, + "range": -9.255377, + "rather": -10.353990, + "ray_coll.gml": -10.353990, + "rbS/gvtaNtGV": -10.353990, + "rc": -9.660843, + "rct": -10.353990, + "rdf": -8.967695, + "rdp": -10.353990, + "re": -10.353990, + "reWzJOQKiAxGKlVMKNauZ": -10.353990, + "reached": -9.660843, + "read": -8.967695, + "readable": -10.353990, + "reader": -10.353990, + "realestate": -9.660843, + "reason": -10.353990, + "reasons": -10.353990, + "rebroadcast": -9.660843, + "receives": -10.353990, + "recently": -9.255377, + "recipe": -10.353990, + "recommending": -10.353990, + "rect1": -10.353990, + "rect2": -10.353990, + "rect3": -10.353990, + "rect4": -9.660843, + "rect5": -10.353990, + "red": -9.660843, + "red=": -10.353990, + "reenables": -9.255377, + "ref=": -9.255377, + "ref_count_": -8.967695, + "reflection": -10.353990, + "reg": -8.967695, + "regardless": -9.660843, + "region=": -9.255377, + "registered": -10.353990, + "registered.": -9.660843, + "rel=": -9.660843, + "relativeNode": -9.660843, + "relatively": -10.353990, + "reliably.": -10.353990, + "religion": -10.353990, + "remotely": -10.353990, + "removed": -8.967695, + "removed.": -8.967695, + "rend=": -8.408080, + "rendered": -10.353990, + "rendition": -8.967695, + "repeat": -8.967695, + "replace": -10.353990, + "replaces": -10.353990, + "report": -10.353990, + "repository=": -10.353990, + "repositoryId=": -10.353990, + "representation": -9.660843, + "representing": -7.309467, + "represents": -8.967695, + "reproduce": -10.353990, + "request": -9.255377, + "requested": -10.353990, + "requests": -8.967695, + "requests.": -9.660843, + "required": -9.660843, + "reserved.": -10.353990, + "resheader": -10.353990, + "resourcePath=": -9.660843, + "respective": -10.353990, + "response": -9.660843, + "rest.": -9.660843, + "result": -9.255377, + "result.": -9.660843, + "resulting": -10.353990, + "results": -8.156765, + "resx": -8.967695, + "retain": -10.353990, + "retrieve": -9.255377, + "return": -7.463618, + "returned": -9.660843, + "returned.": -9.660843, + "returning": -10.353990, + "returns": -8.744552, + "rev=": -9.660843, + "review": -8.744552, + "revision": -10.353990, + "revision=": -8.274548, + "rf": -9.660843, + "rgb": -8.156765, + "rgs": -10.353990, + "rh": -10.353990, + "riTUQIzNntZzjlMxxzn": -10.353990, + "richness": -10.353990, + "ridiculus": -9.660843, + "rifoq": -10.353990, + "right": -6.569800, + "right=": -10.353990, + "rightbraced": -10.353990, + "rights": -10.353990, + "riwFzpHDi": -10.353990, + "rj": -10.353990, + "rjos": -10.353990, + "rmPg": -10.353990, + "rm_fps": -10.353990, + "rnD/NFCxuaQAv": -10.353990, + "ro": -10.353990, + "role=": -7.869083, + "roman": -9.255377, + "roof.d": -10.353990, + "roof.png": -10.353990, + "room_menu": -10.353990, + "rooms": -9.660843, + "rotate": -8.967695, + "rotateClockwise": -10.353990, + "rotateCounterclockwise": -10.353990, + "rotateleft": -10.353990, + "rotateright": -10.353990, + "routing": -9.660843, + "row": -8.156765, + "rowno": -10.353990, + "rows": -10.353990, + "rq": -10.353990, + "rqO": -10.353990, + "rqR": -10.353990, + "rrVW/pWaoZNrLcjfGqhC": -10.353990, + "rtg": -10.353990, + "rtsQ": -10.353990, + "ru": -10.353990, + "rule": -10.353990, + "rule.": -10.353990, + "rules": -10.353990, + "run": -8.408080, + "running": -8.967695, + "running.": -10.353990, + "rutrum": -10.353990, + "rutrum.": -8.562230, + "rvAL": -10.353990, + "rwmFqUu": -10.353990, + "rwxuMP": -10.353990, + "rxEc": -10.353990, + "rz": -9.660843, + "s": -7.218496, + "s.SourceFile.FilePath": -10.353990, + "s/TIlQWbYgA": -10.353990, + "sD": -10.353990, + "sDed": -10.353990, + "sE/E": -10.353990, + "sF": -10.353990, + "sGc": -10.353990, + "sHc": -10.353990, + "sIDZ": -10.353990, + "sLT": -10.353990, + "sN": -10.353990, + "sNWxBKP": -10.353990, + "sO": -10.353990, + "sRGB": -10.353990, + "sRLV/ty": -10.353990, + "sType": -10.353990, + "sYcUR": -10.353990, + "salve": -9.660843, + "same": -8.274548, + "sample": -8.562230, + "sample.xml": -9.660843, + "sans": -8.051405, + "satisfies": -8.744552, + "save": -9.255377, + "say": -10.353990, + "sc": -10.353990, + "scenarios": -8.967695, + "scene": -9.660843, + "schedule": -9.660843, + "scheduler": -7.956094, + "schema": -8.744552, + "schemaLocation": -10.353990, + "schemaVersion=": -9.660843, + "schemas": -9.255377, + "schematypens=": -10.353990, + "scheme=": -8.408080, + "science": -10.353990, + "scope": -9.660843, + "scope=": -7.058153, + "scripts": -5.984542, + "sdESBxYyAQhH": -10.353990, + "sdk": -10.353990, + "sdkextension": -10.353990, + "section": -10.353990, + "see": -8.744552, + "seems": -10.353990, + "select": -9.255377, + "select=": -6.616320, + "selectedProfileId=": -8.744552, + "selector": -8.562230, + "selector.": -9.660843, + "selectors": -9.660843, + "self": -8.744552, + "semantically": -9.255377, + "send": -9.255377, + "send.": -8.967695, + "sending": -9.660843, + "sense": -10.353990, + "sense.": -10.353990, + "sent": -9.660843, + "ser": -10.353990, + "serialized": -8.562230, + "serif": -8.051405, + "server": -9.660843, + "server.": -9.660843, + "service": -10.353990, + "serviceName=": -9.660843, + "services": -9.255377, + "set": -6.422164, + "set.": -8.967695, + "setGeneralLight.gml": -10.353990, + "setting": -8.967695, + "settings": -10.353990, + "setup.": -7.869083, + "several": -10.353990, + "sfTQAIYjwupvXUhvRjOBwEXY": -10.353990, + "sg": -10.353990, + "sgL": -10.353990, + "sgM": -10.353990, + "sgatIDAFhaSXctxLkRoKjfV": -10.353990, + "shN": -10.353990, + "shaders": -9.660843, + "shall": -10.353990, + "share": -9.660843, + "shipping": -10.353990, + "shirt": -10.353990, + "shoes": -10.353990, + "shorts": -10.353990, + "should": -7.714932, + "show": -10.353990, + "sibling": -8.967695, + "sic": -9.660843, + "side": -10.353990, + "similar": -8.274548, + "similarly": -10.353990, + "simple": -8.274548, + "simplechanges": -10.353990, + "simpleelementspm": -10.353990, + "simpler": -10.353990, + "simplify": -10.353990, + "single": -9.255377, + "sit": -9.660843, + "size": -6.462169, + "size_.height_": -10.353990, + "size_.width_": -10.353990, + "skos": -9.660843, + "sleSGS": -10.353990, + "slot": -10.353990, + "small": -9.255377, + "smallCap": -10.353990, + "smallcaps": -10.353990, + "smaller": -8.744552, + "smoke_": -10.353990, + "snd_birds": -10.353990, + "snd_crickets": -10.353990, + "snd_fire": -10.353990, + "snd_rain": -10.353990, + "so": -9.660843, + "so.": -10.353990, + "software": -9.255377, + "soldier_wip.d": -9.660843, + "solid": -10.353990, + "some": -8.744552, + "song": -10.353990, + "sort": -7.789040, + "sound": -8.967695, + "source": -7.175936, + "source.extension.vsixmanifest": -10.353990, + "sourceFilesPathsToDiscard": -10.353990, + "sourceFilesPathsToDiscard.Contains": -10.353990, + "sourcedoc": -10.353990, + "spAyr": -10.353990, + "space": -8.744552, + "space_.data_": -9.660843, + "spaceletter": -10.353990, + "spacing": -10.353990, + "spacing=": -10.353990, + "spamming": -9.660843, + "spec_": -10.353990, + "special": -10.353990, + "specialist": -10.353990, + "specific": -7.956094, + "specified": -8.408080, + "specifies": -10.353990, + "specify": -10.353990, + "specs": -7.358257, + "specs_file": -7.645940, + "speech": -9.660843, + "spr_angle": -10.353990, + "spr_cam": -10.353990, + "spr_fern": -10.353990, + "spr_fireicon": -10.353990, + "spr_house": -10.353990, + "spr_lantern": -10.353990, + "spr_logo": -10.353990, + "spr_master_outside_night": -10.353990, + "spr_player": -10.353990, + "spr_rectangle": -10.353990, + "spr_tallgrass": -10.353990, + "spr_tree": -10.353990, + "sprites": -7.789040, + "srKyticWeuJga": -10.353990, + "src": -10.353990, + "src=": -6.888254, + "srsName=": -9.660843, + "sryoWq": -10.353990, + "ssxBx": -10.353990, + "stEvt": -10.353990, + "standalone=": -8.744552, + "standard": -10.353990, + "standardized": -10.353990, + "start": -9.660843, + "start=": -10.353990, + "starts": -8.744552, + "startup.": -10.353990, + "status": -10.353990, + "status=": -10.353990, + "step": -10.353990, + "steps": -10.353990, + "still": -9.660843, + "storage": -10.353990, + "storage_.value_": -10.353990, + "storage_type_id=": -10.353990, + "store": -10.353990, + "stored": -10.353990, + "stream": -8.408080, + "stream.": -9.255377, + "strict": -10.353990, + "strikethrough": -10.353990, + "string": -6.952792, + "string_value_": -9.660843, + "strong": -10.353990, + "structure": -10.353990, + "style": -6.547327, + "style=": -7.135114, + "stylesheets": -10.353990, + "su": -10.353990, + "sub": -10.353990, + "subscribed": -9.660843, + "subscribing": -10.353990, + "subscript": -10.353990, + "subsequent": -9.255377, + "subset": -9.255377, + "substitute": -9.255377, + "substring": -9.255377, + "subtle": -9.660843, + "success": -10.353990, + "successful": -10.353990, + "such": -8.408080, + "suffice.": -10.353990, + "suffix=": -4.465112, + "suit": -10.353990, + "suited": -10.353990, + "sum": -9.660843, + "sup": -10.353990, + "super": -9.660843, + "superClass=": -6.616320, + "superscript": -10.353990, + "support": -9.255377, + "supralinear": -10.353990, + "svGZRjkHFBSejevtuU": -10.353990, + "svenhaustein.de": -10.353990, + "swIs": -10.353990, + "sx": -10.353990, + "sxAMnoPtuMYiCAiSQQlCCdpPaTIKLxXxOSIdr": -10.353990, + "symbols": -8.967695, + "synchronous": -10.353990, + "syntax": -10.353990, + "systemVersion=": -9.660843, + "szGJbCfSALeJCRjSKmgOQncAKL": -10.353990, + "t": -7.358257, + "t/mx": -10.353990, + "tAAAAAElFTkSuQmCC": -10.353990, + "tBpzgrJ": -10.353990, + "tBynmiZI": -10.353990, + "tEi": -10.353990, + "tGftufJlD": -10.353990, + "tIiqseI": -10.353990, + "tK": -10.353990, + "tKDIYkMMwBY": -10.353990, + "tLQbjMAAAAASUVORK": -10.353990, + "tMC": -10.353990, + "tMq": -10.353990, + "tN": -10.353990, + "tQi": -10.353990, + "tRBmAil": -10.353990, + "tRSe/qqWflbLuzXu": -10.353990, + "tTHdUJew": -10.353990, + "tUf": -10.353990, + "tUmk": -10.353990, + "tVUr": -9.255377, + "tVVLU/DUBTlp": -10.353990, + "tVVLW/CUBRFIpGVWGRlZW": -10.353990, + "tVVLW/jQBTsT": -10.353990, + "tVVLY/iUBSdn": -10.353990, + "tVVLYvDQBBduTJy": -10.353990, + "tVVoW": -9.255377, + "tVVq": -10.353990, + "tVVr": -9.255377, + "tVVrW/bQBTvnzBYGDpoaBgaaGhoaHrw": -10.353990, + "tVVsWrDMBDNp": -10.353990, + "tVdvPg": -10.353990, + "tVlSJgNd": -10.353990, + "tWVoW/qUBjF": -10.353990, + "tWVr": -8.967695, + "tWVrW/bUBTF": -10.353990, + "tWVrW/jQBDFCwsPFi": -10.353990, + "tWVrY/bQBDF": -10.353990, + "tWVrY/bQBTEAwMNDU": -10.353990, + "tWft": -10.353990, + "tWx": -10.353990, + "tX": -10.353990, + "tYnGU": -10.353990, + "table": -9.255377, + "tablefoot": -10.353990, + "tagged": -10.353990, + "tagging": -10.353990, + "take": -9.255377, + "taken": -10.353990, + "takes": -10.353990, + "tank": -10.353990, + "target": -8.274548, + "target.": -10.353990, + "target.property": -10.353990, + "target=": -7.581401, + "targetRuntime=": -9.660843, + "targets": -7.520776, + "task": -8.562230, + "tcygiDPzeuBDCuR": -10.353990, + "technology": -10.353990, + "tei": -7.789040, + "teiCorpus": -10.353990, + "tells": -10.353990, + "tellus": -10.353990, + "tellus.": -8.967695, + "temp": -10.353990, + "templates": -7.520776, + "temporary": -10.353990, + "term=": -8.156765, + "test": -8.274548, + "test=": -6.592790, + "tests": -10.353990, + "tests.": -10.353990, + "tex_arrow": -10.353990, + "tex_sky": -10.353990, + "tex_sky_day": -10.353990, + "tex_test": -10.353990, + "text": -5.789642, + "text.": -10.353990, + "text/microsoft": -9.660843, + "text/value": -10.353990, + "text=": -8.967695, + "texts": -8.274548, + "texts.": -10.353990, + "tgroup": -7.869083, + "th": -9.255377, + "thGodg": -10.353990, + "than": -8.562230, + "that": -5.635491, + "the": -4.504665, + "their": -9.660843, + "them": -9.255377, + "then": -7.869083, + "theory": -10.353990, + "there": -9.660843, + "therein": -10.353990, + "these": -9.660843, + "they": -8.967695, + "think": -9.660843, + "this": -5.810695, + "those": -9.660843, + "thread.": -9.255377, + "through": -8.408080, + "thrown": -10.353990, + "tif": -10.353990, + "tiff": -9.255377, + "time": -8.967695, + "times.": -8.967695, + "title": -6.798642, + "tj": -10.353990, + "tjNvuvr": -10.353990, + "tkzEghoAYPYjElZX": -10.353990, + "tmZ": -10.353990, + "tnyQ/qufk": -10.353990, + "to": -5.021271, + "to.": -8.408080, + "tokenize": -9.255377, + "tomorrow": -10.353990, + "too": -10.353990, + "toolsVersion=": -9.660843, + "top": -6.243116, + "top=": -9.660843, + "topbraced": -10.353990, + "tort": -10.353990, + "total": -9.660843, + "tp": -10.353990, + "tpGAR": -10.353990, + "tpKi/TV": -10.353990, + "tpl": -9.660843, + "traditional": -9.255377, + "trans.": -10.353990, + "transcr": -10.353990, + "transcription": -10.353990, + "transcriptional": -10.353990, + "transform": -8.744552, + "translator": -10.353990, + "travelling": -10.353990, + "traversal": -9.660843, + "treat": -10.353990, + "tree_leaves.d": -10.353990, + "tree_trunk.d": -10.353990, + "true": -6.592790, + "tu": -10.353990, + "tuhTTjf": -10.353990, + "tutorial": -10.353990, + "tv": -10.353990, + "twitter": -9.660843, + "two": -9.660843, + "tx": -10.353990, + "tyF": -10.353990, + "type": -7.095893, + "type.": -9.255377, + "type=": -5.923173, + "type_": -10.353990, + "typed": -9.660843, + "types": -7.869083, + "typewriter": -10.353990, + "typically": -10.353990, + "u": -9.660843, + "uCGWWFMx": -10.353990, + "uDQqZH": -10.353990, + "uOdBctgHB": -10.353990, + "uc": -10.353990, + "ultricies": -9.660843, + "uncomment": -8.744552, + "undeclared": -10.353990, + "undefined": -9.255377, + "under": -9.255377, + "underline": -8.967695, + "understood": -10.353990, + "undertaken": -10.353990, + "unenroll": -10.353990, + "unfiled": -10.353990, + "unique": -7.869083, + "unit": -8.274548, + "unless": -10.353990, + "unlike": -7.789040, + "unpredictable.": -10.353990, + "unprefixed": -10.353990, + "until": -8.408080, + "up": -7.135114, + "updateAudioListener.gml": -10.353990, + "updated": -10.353990, + "updated.": -10.353990, + "upon": -10.353990, + "upper": -10.353990, + "uppercase": -10.353990, + "uri": -8.744552, + "uri=": -7.789040, + "url": -8.967695, + "url=": -9.255377, + "urn": -9.660843, + "usUygMoCw": -10.353990, + "usage": -10.353990, + "usages": -10.353990, + "use": -7.058153, + "use=": -10.353990, + "useAutolayout=": -9.660843, + "useDefault=": -6.665110, + "useSourceRendition=": -8.051405, + "useTraitCollections=": -9.660843, + "used": -7.262947, + "useful": -9.660843, + "user": -8.967695, + "userLabel=": -9.660843, + "users": -9.255377, + "users.": -9.660843, + "uses": -9.660843, + "using": -7.869083, + "usually": -10.353990, + "ut": -8.408080, + "util": -9.660843, + "uuid": -9.660843, + "ux": -8.156765, + "v": -6.293547, + "v/": -9.660843, + "v/WeP": -10.353990, + "v3": -10.353990, + "v4": -10.353990, + "vA": -10.353990, + "vAXxPEe": -10.353990, + "vAwaQJ": -10.353990, + "vCbChH": -10.353990, + "vGNxeEilWMVSVSM": -10.353990, + "vGTAulhguppjof": -10.353990, + "vH": -10.353990, + "vHlxrq": -10.353990, + "vI": -10.353990, + "vIEt/cM": -10.353990, + "vIwLBI": -10.353990, + "vKYSA": -10.353990, + "vM": -10.353990, + "vMYWA/O": -10.353990, + "vMsUnNiwaZQ": -10.353990, + "vOu": -10.353990, + "vPMkEZ": -10.353990, + "vRtiqctC": -10.353990, + "vT": -10.353990, + "vUsDiKsHQjCCQga": -10.353990, + "vVSsiZ": -10.353990, + "vXfz": -10.353990, + "vXzZjkiQhkvGhPBQHKZwAMwKAHg": -10.353990, + "vZ": -10.353990, + "vZYgeYJJhHW": -10.353990, + "val": -8.967695, + "validation": -10.353990, + "value": -6.441967, + "value.": -9.255377, + "value=": -6.716404, + "valueName=": -10.353990, + "valueType=": -7.869083, + "values": -8.967695, + "varables": -10.353990, + "variable=": -4.697998, + "variant": -10.353990, + "variation": -10.353990, + "various": -9.660843, + "varius": -8.408080, + "vb": -8.967695, + "vbproj": -9.255377, + "vbproj_sample": -10.353990, + "vbproj_sample.Module": -10.353990, + "vc": -10.353990, + "vc/": -10.353990, + "vcK": -10.353990, + "vcxprojsample": -10.353990, + "veP": -10.353990, + "veTEzXm": -10.353990, + "vector_rotate.gml": -10.353990, + "vendors": -10.353990, + "version": -8.408080, + "version=": -5.865353, + "versions": -9.255377, + "vertical": -7.645940, + "very": -8.967695, + "vfFznwktzPqsavY": -10.353990, + "vfd": -10.353990, + "vfiHRCyjB": -10.353990, + "vgmY": -10.353990, + "vhkEq": -10.353990, + "via": -8.274548, + "view": -9.255377, + "viewed": -10.353990, + "vinFLQX": -10.353990, + "virtue": -10.353990, + "visibility=": -9.660843, + "viverra": -7.869083, + "vjQBReWVkZGRsZGRlbWVkZOXY": -10.353990, + "vjQBTePyV": -10.353990, + "vjQBjdPyU": -10.353990, + "vlm": -10.353990, + "vmsD": -10.353990, + "vn": -10.353990, + "void*": -9.660843, + "vols": -8.967695, + "vote": -9.660843, + "votes": -9.660843, + "voting": -10.353990, + "voypwiHgurVx": -10.353990, + "vpCG": -10.353990, + "vpREjLn": -10.353990, + "vqg": -10.353990, + "vr": -9.660843, + "vrUBSenKyMjI": -10.353990, + "vs.": -10.353990, + "vsArRsRicf": -10.353990, + "vsmuestt": -10.353990, + "vss": -10.353990, + "vstemplate": -10.353990, + "vsx": -10.353990, + "vuoyvzmGMiOOz": -10.353990, + "vv": -10.353990, + "vw": -10.353990, + "vyLgwIGCgIAAEwMD": -10.353990, + "vydxC": -10.353990, + "vzheDplJC": -10.353990, + "w": -8.274548, + "w3": -7.956094, + "wASqnIuKNk": -10.353990, + "wAr": -10.353990, + "wBMXUFQeC": -10.353990, + "wDlGEwr": -10.353990, + "wGPIJOT": -10.353990, + "wHlq": -10.353990, + "wJ/ZSrfUYvujCO": -10.353990, + "wL": -10.353990, + "wLbjO": -10.353990, + "wLhpRvLWN": -10.353990, + "wMyHwZuLyPqNiEdDgktJh": -10.353990, + "wNVjJjsNvLuLpXxIpX": -10.353990, + "wP/xAiRtD": -10.353990, + "wQdaKa": -10.353990, + "wR": -10.353990, + "wSmTBDT": -10.353990, + "wV": -10.353990, + "wWoVRVrgzoehU": -10.353990, + "wXmwjz": -10.353990, + "waUQPvZL": -10.353990, + "wait": -9.255377, + "want": -9.660843, + "warranties": -9.660843, + "was": -8.562230, + "wav": -10.353990, + "wavy": -10.353990, + "wavyunderline": -10.353990, + "way": -8.967695, + "way.": -9.660843, + "ways": -10.353990, + "wbIj/bkvASQnoLQIZTzzZTiFAjgDjHGOMey": -10.353990, + "wbtdSCr": -10.353990, + "wcjoHkb": -10.353990, + "wcksN": -10.353990, + "wdX": -10.353990, + "we": -9.255377, + "web": -8.408080, + "webkit": -9.660843, + "webpage": -9.660843, + "weight": -7.645940, + "well": -9.660843, + "weoXiCRUQ": -10.353990, + "were": -10.353990, + "what": -10.353990, + "when": -6.665110, + "whenever": -7.463618, + "where": -8.051405, + "whether": -9.660843, + "which": -7.409551, + "who": -9.660843, + "whom": -10.353990, + "whose": -8.408080, + "wide": -9.660843, + "width": -8.562230, + "width=": -6.365006, + "width_": -10.353990, + "will": -5.984542, + "with": -6.383698, + "withDelay": -9.660843, + "without": -9.660843, + "wkFxqMdK/qYrQJdEzVlJHIWYpyAkqnRovnaKkMWL": -10.353990, + "wmnu/": -10.353990, + "wn": -10.353990, + "wnrz": -10.353990, + "woodstack.png": -10.353990, + "word": -10.353990, + "work": -8.562230, + "working": -10.353990, + "works": -9.660843, + "would": -9.255377, + "wpa": -10.353990, + "wqJsqBJm": -10.353990, + "write": -9.660843, + "writing": -10.353990, + "www": -7.358257, + "www.flaticon.com": -10.353990, + "wxGQ": -10.353990, + "wxLE": -10.353990, + "wyZk/WnQnrvJ": -10.353990, + "wyubKS": -10.353990, + "wzi": -10.353990, + "x": -7.058153, + "x.Foo.Bar.Baz": -10.353990, + "x.SomeProperty": -10.353990, + "x86": -9.660843, + "x=": -8.744552, + "xBmNE": -10.353990, + "xD": -10.353990, + "xGWMbJUgLfsodkbX": -10.353990, + "xGhLjKOYPiWT": -10.353990, + "xHyBC": -10.353990, + "xIIomuHUb": -10.353990, + "xISBEglOD": -10.353990, + "xJVS": -10.353990, + "xLMYEksMbfC/HuP": -10.353990, + "xNUz": -10.353990, + "xNgu": -10.353990, + "xPzSg": -10.353990, + "xRMIPrgFxpHk": -10.353990, + "xSiCcE": -10.353990, + "xTS": -10.353990, + "xVr": -10.353990, + "xZ": -10.353990, + "xZ/": -10.353990, + "xZwEifOrBKU": -10.353990, + "x_": -10.353990, + "xap": -9.255377, + "xeqPPgT": -10.353990, + "xg": -10.353990, + "xgvRzNqvLuaUQ": -10.353990, + "xiMlp": -10.353990, + "xj": -10.353990, + "xlQ": -10.353990, + "xldbWJQhHy": -10.353990, + "xml": -6.422164, + "xmlns": -6.770471, + "xmlns=": -6.482789, + "xmp": -10.353990, + "xmp.did": -9.660843, + "xmp.iid": -9.660843, + "xmpMM": -10.353990, + "xmptk": -10.353990, + "xnodpQZVmmKBq": -10.353990, + "xo": -10.353990, + "xq": -10.353990, + "xq/Wgox": -10.353990, + "xquery": -10.353990, + "xrHUo": -10.353990, + "xs": -8.744552, + "xsd": -8.744552, + "xsi": -8.967695, + "xsl": -9.660843, + "xslt": -9.255377, + "xspec": -10.353990, + "y": -7.789040, + "y=": -8.744552, + "yBOS": -10.353990, + "yBR": -10.353990, + "yD": -10.353990, + "yDfywLBX": -10.353990, + "yEDAJpH": -10.353990, + "yEomdRCKRtVUvVUsz": -10.353990, + "yGYC": -10.353990, + "yHCCvg": -10.353990, + "yHX": -10.353990, + "yHezIeUfUZx": -10.353990, + "yHfvHFPtdiuZliL": -10.353990, + "yI": -10.353990, + "yIzwQKVJgErfUmsakwnM": -10.353990, + "yJ": -10.353990, + "yLg": -10.353990, + "yMbo": -10.353990, + "yNYO": -10.353990, + "yPI": -10.353990, + "yR": -10.353990, + "yRxC": -10.353990, + "yTIZ": -10.353990, + "yWRMvTUGcg": -10.353990, + "yWv": -10.353990, + "yXTlE": -10.353990, + "yZPga": -10.353990, + "yZjEUwInD": -10.353990, + "y_": -10.353990, + "yajiP": -10.353990, + "ycGd": -10.353990, + "ycMBoYaFgaGBhoGGoYaGgZN": -10.353990, + "yczOTDKT": -10.353990, + "ydCZeUukbYtNWDnituXUrrwjcUZOB": -10.353990, + "ye": -10.353990, + "years": -9.660843, + "yfb": -10.353990, + "ylcC": -10.353990, + "ym": -10.353990, + "ymQrynjqSXeLQCOCG/bpR": -10.353990, + "yoBcGAg": -10.353990, + "you": -7.095893, + "your": -7.409551, + "ypvKVMnI": -10.353990, + "yr": -10.353990, + "ysrURWYpFIJBKLRJJTVZsUQcKKTajZEAQhCBIqmrSCpAiSIhCfQFQgKk": -10.353990, + "yt": -10.353990, + "yufHKmkiiheTIUMnEk": -10.353990, + "ywkAgRd": -10.353990, + "yx": -9.660843, + "yzo": -10.353990, + "z": -8.156765, + "zA": -10.353990, + "zC": -10.353990, + "zD": -10.353990, + "zIdGX": -10.353990, + "zIndex=": -10.353990, + "zLfjfXMXUipklk": -10.353990, + "zLuxyR": -10.353990, + "zMV/": -10.353990, + "zQN": -10.353990, + "zQxmED": -10.353990, + "zUyM": -10.353990, + "zV": -10.353990, + "zVATM": -10.353990, + "zWlZb": -10.353990, + "zZPRfOJagN": -10.353990, + "zaTX": -10.353990, + "zauhiEvMOy": -10.353990, + "zcDuhpOynFWhwP": -10.353990, + "zcUTqrSK": -10.353990, + "zdAcqI": -10.353990, + "zdbBVnXZDb": -10.353990, + "zeaE": -10.353990, + "zfTnvfO/cMErAQxjpINkbUKd": -10.353990, + "zh": -10.353990, + "zi": -10.353990, + "zip": -10.353990, + "zkw": -10.353990, + "zl": -10.353990, + "zmJmgFn/": -10.353990, + "zmkIb": -10.353990, + "zn": -10.353990, + "zoTPLVy": -10.353990, + "zpC": -10.353990, + "zq": -10.353990, + "zqRfBsr": -10.353990, + "zstcuAu": -10.353990, + "zszOzL": -10.353990, + "zt": -10.353990, + "zvmeJKzcDAxRqoRSK": -10.353990, + "zwh": -10.353990, + "zwr": -10.353990, + "zyBe": -10.353990, + "zytUAlydFzDXJeIGGBsgbByC": -10.353990, + "zyv": -10.353990, + "{": -6.328638, + "||": -9.255377, + "}": -6.328638, + "ê": -8.967695, + "ó": -9.660843, + "ö": -9.660843, + "ü": -9.660843, + "–": -8.967695, + "‘": -9.255377, + "’": -9.255377, + "“": -10.353990, + "”": -10.353990, + "⚊": -10.353990, + "\ufeff": -7.956094, }, "XML Property List": map[string]float64{ "\x1b": -7.228388, @@ -185670,6 +184892,61 @@ var TokensLogProbabilities = map[string]map[string]float64{ "total": -5.685279, "true": -3.813477, }, + "Xonsh": map[string]float64{ + "$": -2.067465, + "(": -2.627081, + ")": -2.627081, + "+": -5.111988, + ",": -2.116256, + ".split": -4.013375, + ":": -4.013375, + "=": -1.893112, + "ACTIVITIES": -5.111988, + "APPIMAGE_PYTHON_VERSION": -5.111988, + "AUTHORS_FILENAME": -5.111988, + "CHANGELOG_FILENAME": -5.111988, + "CHANGELOG_TEMPLATE": -5.111988, + "DOCKER_APT_DEPS": -5.111988, + "DOCKER_CONDA_DEPS": -5.111988, + "DOCKER_GIT_EMAIL": -5.111988, + "DOCKER_GIT_NAME": -5.111988, + "DOCKER_INSTALL_COMMAND": -5.111988, + "False": -5.111988, + "GHPAGES_REPO": -5.111988, + "GHRELEASE_ASSETS": -5.111988, + "GITHUB_ORG": -5.111988, + "GITHUB_REPO": -5.111988, + "PROJECT": -5.111988, + "PYPI_SIGN": -5.111988, + "PYTEST_COMMAND": -5.111988, + "TAG_REMOTE": -5.111988, + "TAG_TARGET": -5.111988, + "VERSION_BUMP_PATTERNS": -5.111988, + "WEBSITE_URL": -5.111988, + "[": -3.502550, + "]": -3.502550, + "as": -4.418841, + "conda_deps": -3.320228, + "conda_deps.discard": -5.111988, + "d": -5.111988, + "d.lower": -5.111988, + "delimiter": -4.418841, + "f": -4.418841, + "f.read": -4.418841, + "for": -4.418841, + "from": -5.111988, + "git_archive_asset": -4.418841, + "import": -5.111988, + "in": -4.418841, + "open": -4.418841, + "r": -5.111988, + "rever.activities.ghrelease": -5.111988, + "sorted": -5.111988, + "with": -4.418841, + "{": -4.418841, + "|": -5.111988, + "}": -4.418841, + }, "Xtend": map[string]float64{ "!": -5.953243, "(": -2.239671, @@ -188079,6 +187356,234 @@ var TokensLogProbabilities = map[string]map[string]float64{ "|": -5.668155, "~": -6.361302, }, + "jq": map[string]float64{ + "!": -5.859519, + "#######################################################################": -8.056744, + "$": -2.527315, + "(": -2.503784, + ")": -2.515480, + "+": -4.560236, + ",": -4.760907, + "-": -5.112305, + ".": -3.166395, + ".captures": -6.447306, + ".e": -7.363597, + ".key": -8.056744, + ".length": -7.363597, + ".name": -6.264984, + ".offset": -6.958131, + ".string": -6.447306, + ".x": -8.056744, + "/": -8.056744, + ":": -3.086930, + ";": -2.686106, + "<": -5.658849, + "=": -3.303154, + ">": -5.417686, + "?": -6.958131, + "IN": -7.363597, + "INDEX": -6.958131, + "JOIN": -6.958131, + "[": -3.100917, + "\\": -8.056744, + "]": -3.100917, + "_assign": -8.056744, + "_flatten": -6.670449, + "_group_by_impl": -8.056744, + "_match_impl": -7.363597, + "_max_by_impl": -8.056744, + "_min_by_impl": -8.056744, + "_modify": -8.056744, + "_nwise": -6.447306, + "_repeat": -6.958131, + "_sort_by_impl": -8.056744, + "_strindices": -8.056744, + "_until": -6.958131, + "_while": -6.958131, + "a": -5.223530, + "abc": -7.363597, + "add": -8.056744, + "all": -6.447306, + "and": -5.417686, + "any": -6.110834, + "array_in_object": -8.056744, + "arrays": -8.056744, + "as": -4.144721, + "as_array_obj_var": -8.056744, + "as_array_var": -8.056744, + "as_obj_array_var": -8.056744, + "as_obj_var": -8.056744, + "ascii_upcase": -7.363597, + "b": -6.958131, + "booleans": -8.056744, + "break": -6.958131, + "bsearch": -8.056744, + "by": -6.447306, + "c": -8.056744, + "capture": -6.447306, + "catch": -8.056744, + "combinations": -6.670449, + "cond": -6.264984, + "condition": -5.977302, + "contains": -8.056744, + "def": -3.269252, + "del": -8.056744, + "delpaths": -7.363597, + "dot": -6.670449, + "e": -8.056744, + "edit": -6.958131, + "edit.offset": -8.056744, + "elif": -5.348694, + "else": -4.445826, + "empty": -5.571837, + "end": -4.473225, + "error": -5.977302, + "exp": -6.447306, + "explode": -7.363597, + "f": -4.622757, + "false": -6.958131, + "finites": -8.056744, + "first": -6.958131, + "fla": -6.670449, + "flags": -5.859519, + "flatten": -7.363597, + "floor": -8.056744, + "foreach": -7.363597, + "from_entries": -7.363597, + "fromdate": -8.056744, + "fromdateiso": -7.363597, + "fromstream": -8.056744, + "g": -5.977302, + "generator": -6.670449, + "getpath": -6.958131, + "group_by": -6.958131, + "gs": -6.447306, + "gsub": -7.363597, + "halt_error": -7.363597, + "has": -8.056744, + "i": -4.760907, + "idx": -6.264984, + "idx_expr": -5.754159, + "if": -4.445826, + "implode": -7.363597, + "in": -5.284155, + "index": -7.363597, + "indices": -6.958131, + "init": -6.264984, + "input": -6.958131, + "inputs": -8.056744, + "inside": -8.056744, + "isempty": -6.958131, + "isfinite": -7.363597, + "isinfinite": -8.056744, + "isnormal": -8.056744, + "item": -6.670449, + "iterables": -8.056744, + "j": -7.363597, + "join": -8.056744, + "join_expr": -7.363597, + "k": -6.958131, + "key": -6.670449, + "keys_unsorted": -7.363597, + "label": -6.958131, + "last": -6.958131, + "leaf_paths": -8.056744, + "len": -7.363597, + "length": -4.760907, + "limit": -7.363597, + "map": -5.571837, + "map_values": -8.056744, + "match": -5.754159, + "max": -6.958131, + "max_by": -8.056744, + "mid": -6.447306, + "min_by": -8.056744, + "mktime": -8.056744, + "mode": -6.670449, + "mods": -7.363597, + "monkey": -6.958131, + "msg": -7.363597, + "mysub": -6.958131, + "n": -5.012221, + "nested": -8.056744, + "next": -7.363597, + "node_filter": -7.363597, + "normals": -8.056744, + "not": -7.363597, + "nothing": -8.056744, + "nth": -7.363597, + "null": -5.012221, + "nulls": -8.056744, + "numbers": -8.056744, + "objects": -8.056744, + "or": -6.670449, + "out": -6.264984, + "p": -5.571837, + "pair": -6.264984, + "path": -6.264984, + "paths": -5.977302, + "q": -7.363597, + "r": -5.658849, + "r.length": -8.056744, + "r.offset": -7.363597, + "range": -6.110834, + "re": -4.965701, + "recurse": -6.264984, + "recurse_down": -8.056744, + "reduce": -5.417686, + "repeat": -7.363597, + "reverse": -8.056744, + "rindex": -8.056744, + "row": -6.958131, + "s": -5.348694, + "scalars": -7.363597, + "scan": -8.056744, + "select": -5.112305, + "setpath": -6.264984, + "sort_by": -8.056744, + "split": -8.056744, + "splits": -6.670449, + "src": -7.363597, + "stream": -5.977302, + "strftime": -8.056744, + "strings": -8.056744, + "strptime": -8.056744, + "sub": -6.264984, + "subg": -7.363597, + "target": -6.264984, + "test": -6.447306, + "test_interpolate": -8.056744, + "then": -4.105500, + "to_entries": -7.363597, + "todate": -8.056744, + "todateiso": -7.363597, + "tostream": -8.056744, + "tostring": -7.363597, + "transpose": -8.056744, + "true": -7.363597, + "truncate_stream": -8.056744, + "try": -8.056744, + "type": -4.965701, + "unique": -8.056744, + "unique_by": -8.056744, + "until": -7.363597, + "update": -6.670449, + "upto": -6.958131, + "val": -4.878690, + "value": -6.958131, + "values": -8.056744, + "var": -7.363597, + "vt": -5.348694, + "walk": -6.958131, + "while": -6.958131, + "with_entries": -8.056744, + "x": -5.112305, + "xs": -6.670449, + "y": -7.363597, + "{": -5.112305, + "|": -3.059532, + "}": -5.166372, + }, "mIRC Script": map[string]float64{ "\x02": -6.414502, "\x03": -4.972945, @@ -190365,6 +189870,25 @@ var TokensLogProbabilities = map[string]map[string]float64{ "{": -7.406711, "}": -7.406711, }, + "robots.txt": map[string]float64{ + "*": -3.637586, + "-": -2.028148, + "/": -2.944439, + "//www.example.com/sitemap.xml": -3.637586, + "/search": -3.637586, + ":": -1.335001, + "Allow": -3.637586, + "Bingbot": -3.637586, + "Cache": -3.637586, + "Disallow": -2.944439, + "Duckduckbot": -3.637586, + "Googlebot": -3.637586, + "Sitemap": -3.637586, + "User": -2.251292, + "agent": -2.251292, + "control": -3.637586, + "https": -3.637586, + }, "sed": map[string]float64{ "!": -6.003887, "$": -5.598422, @@ -191161,4 +190685,4 @@ var TokensLogProbabilities = map[string]map[string]float64{ }, } -var TokensTotal = 2052449.000000 +var TokensTotal = 2052476.000000 diff --git a/vendor/github.com/go-enry/go-enry/v2/data/groups.go b/vendor/github.com/go-enry/go-enry/v2/data/groups.go index cadcee5b7a..4da9676afc 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/groups.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/groups.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data @@ -23,7 +23,6 @@ var LanguagesGroup = map[string]string{ "Git Attributes": "INI", "Git Config": "INI", "Groovy Server Pages": "Groovy", - "HTML+Django": "HTML", "HTML+ECR": "HTML", "HTML+EEX": "HTML", "HTML+ERB": "HTML", @@ -37,12 +36,12 @@ var LanguagesGroup = map[string]string{ "JavaScript+ERB": "JavaScript", "Jison": "Yacc", "Jison Lex": "Lex", - "Lark": "EBNF", "Literate Agda": "Agda", "Literate CoffeeScript": "CoffeeScript", "Literate Haskell": "Haskell", "M4Sugar": "M4", "MUF": "Forth", + "Maven POM": "XML", "Motorola 68K Assembly": "Assembly", "NPM Config": "INI", "NumPy": "Python", diff --git a/vendor/github.com/go-enry/go-enry/v2/data/id.go b/vendor/github.com/go-enry/go-enry/v2/data/id.go index 3b623b3c3e..0e4d7b9a76 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/id.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/id.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data @@ -42,11 +42,13 @@ var IDByLanguage = map[string]int{ "AutoIt": 27, "Avro IDL": 785497837, "Awk": 28, + "BASIC": 28923963, "Ballerina": 720859680, "Batchfile": 29, "Beef": 545626333, "Befunge": 30, "BibTeX": 982188347, + "Bicep": 321200902, "Bison": 31, "BitBake": 32, "Blade": 33, @@ -66,6 +68,7 @@ var IDByLanguage = map[string]int{ "CLIPS": 46, "CMake": 47, "COBOL": 48, + "CODEOWNERS": 321684729, "COLLADA": 49, "CSON": 424, "CSS": 50, @@ -153,6 +156,7 @@ var IDByLanguage = map[string]int{ "Forth": 114, "Fortran": 107, "Fortran Free Form": 761352333, + "FreeBasic": 472896659, "FreeMarker": 115, "Frege": 116, "Futhark": 97358117, @@ -167,6 +171,7 @@ var IDByLanguage = map[string]int{ "GLSL": 124, "GN": 302957008, "Game Maker Language": 125, + "Gemfile.lock": 907065713, "Genie": 792408528, "Genshi": 126, "Gentoo Ebuild": 127, @@ -194,7 +199,6 @@ var IDByLanguage = map[string]int{ "HCL": 144, "HLSL": 145, "HTML": 146, - "HTML+Django": 147, "HTML+ECR": 148, "HTML+EEX": 149, "HTML+ERB": 150, @@ -238,6 +242,7 @@ var IDByLanguage = map[string]int{ "Java Server Pages": 182, "JavaScript": 183, "JavaScript+ERB": 914318960, + "Jinja": 147, "Jison": 284531423, "Jison Lex": 406395330, "Jolie": 998078858, @@ -251,6 +256,7 @@ var IDByLanguage = map[string]int{ "KiCad Schematic": 622447435, "Kit": 188, "Kotlin": 189, + "Kusto": 225697190, "LFE": 190, "LLVM": 191, "LOLCODE": 192, @@ -301,6 +307,7 @@ var IDByLanguage = map[string]int{ "Meson": 799141244, "Metal": 230, "Microsoft Developer Studio Project": 800983837, + "Microsoft Visual Studio Solution": 849523096, "MiniD": 231, "Mirah": 232, "Modelica": 233, @@ -428,6 +435,7 @@ var IDByLanguage = map[string]int{ "Record Jar": 865765202, "Red": 320, "Redcode": 321, + "Redirect Rules": 1020148948, "Regular Expression": 363378884, "Ren'Py": 322, "RenderScript": 323, @@ -465,6 +473,7 @@ var IDByLanguage = map[string]int{ "ShellSession": 347, "Shen": 348, "Sieve": 208976687, + "Singularity": 987024632, "Slash": 349, "Slice": 894641667, "Slim": 350, @@ -480,6 +489,7 @@ var IDByLanguage = map[string]int{ "Standard ML": 357, "Starlark": 960266174, "Stata": 358, + "StringTemplate": 89855901, "Stylus": 359, "SubRip Text": 360, "SugarSS": 826404698, @@ -551,6 +561,7 @@ var IDByLanguage = map[string]int{ "XS": 403, "XSLT": 404, "Xojo": 405, + "Xonsh": 614078284, "Xtend": 406, "YAML": 407, "YANG": 408, @@ -570,6 +581,7 @@ var IDByLanguage = map[string]int{ "eC": 413, "edn": 414, "fish": 415, + "jq": 905371884, "mIRC Script": 517654727, "mcfunction": 462488745, "mupad": 416, @@ -578,6 +590,7 @@ var IDByLanguage = map[string]int{ "ooc": 418, "q": 970539067, "reStructuredText": 419, + "robots.txt": 674736065, "sed": 847830017, "wdl": 374521672, "wisp": 420, diff --git a/vendor/github.com/go-enry/go-enry/v2/data/interpreter.go b/vendor/github.com/go-enry/go-enry/v2/data/interpreter.go index 844b44c3d4..792c72a2fe 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/interpreter.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/interpreter.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data diff --git a/vendor/github.com/go-enry/go-enry/v2/data/mimeType.go b/vendor/github.com/go-enry/go-enry/v2/data/mimeType.go index e3e86de671..72817d48a3 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/mimeType.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/mimeType.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data @@ -63,6 +63,7 @@ var LanguagesMime = map[string]string{ "Forth": "text/x-forth", "Fortran": "text/x-fortran", "Fortran Free Form": "text/x-fortran", + "FreeBasic": "text/x-vb", "GCC Machine Description": "text/x-common-lisp", "GN": "text/x-python", "Game Maker Language": "text/x-c++src", @@ -78,7 +79,6 @@ var LanguagesMime = map[string]string{ "Groovy Server Pages": "application/x-jsp", "HCL": "text/x-ruby", "HTML": "text/html", - "HTML+Django": "text/x-django", "HTML+ECR": "text/html", "HTML+EEX": "text/html", "HTML+ERB": "application/x-erb", @@ -104,6 +104,7 @@ var LanguagesMime = map[string]string{ "Java Server Pages": "application/x-jsp", "JavaScript": "text/javascript", "JavaScript+ERB": "application/javascript", + "Jinja": "text/x-django", "Julia": "text/x-julia", "Jupyter Notebook": "application/json", "Kaitai Struct": "text/x-yaml", @@ -197,6 +198,7 @@ var LanguagesMime = map[string]string{ "Squirrel": "text/x-c++src", "Standard ML": "text/x-ocaml", "Starlark": "text/x-python", + "StringTemplate": "text/html", "Svelte": "text/html", "Swift": "text/x-swift", "SystemVerilog": "text/x-systemverilog", @@ -234,6 +236,7 @@ var LanguagesMime = map[string]string{ "XQuery": "application/xquery", "XS": "text/x-csrc", "XSLT": "text/xml", + "Xonsh": "text/x-python", "YAML": "text/x-yaml", "edn": "text/x-clojure", "reStructuredText": "text/x-rst", diff --git a/vendor/github.com/go-enry/go-enry/v2/data/type.go b/vendor/github.com/go-enry/go-enry/v2/data/type.go index 8240ffb3c0..330cd32bdf 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/type.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/type.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data @@ -42,11 +42,13 @@ var LanguagesType = map[string]int{ "AutoIt": 2, "Avro IDL": 1, "Awk": 2, + "BASIC": 2, "Ballerina": 2, "Batchfile": 2, "Beef": 2, "Befunge": 2, "BibTeX": 3, + "Bicep": 2, "Bison": 2, "BitBake": 2, "Blade": 3, @@ -66,6 +68,7 @@ var LanguagesType = map[string]int{ "CLIPS": 2, "CMake": 2, "COBOL": 2, + "CODEOWNERS": 1, "COLLADA": 1, "CSON": 1, "CSS": 3, @@ -153,6 +156,7 @@ var LanguagesType = map[string]int{ "Forth": 2, "Fortran": 2, "Fortran Free Form": 2, + "FreeBasic": 2, "FreeMarker": 2, "Frege": 2, "Futhark": 2, @@ -167,6 +171,7 @@ var LanguagesType = map[string]int{ "GLSL": 2, "GN": 1, "Game Maker Language": 2, + "Gemfile.lock": 1, "Genie": 2, "Genshi": 2, "Gentoo Ebuild": 2, @@ -194,7 +199,6 @@ var LanguagesType = map[string]int{ "HCL": 2, "HLSL": 2, "HTML": 3, - "HTML+Django": 3, "HTML+ECR": 3, "HTML+EEX": 3, "HTML+ERB": 3, @@ -238,6 +242,7 @@ var LanguagesType = map[string]int{ "Java Server Pages": 2, "JavaScript": 2, "JavaScript+ERB": 2, + "Jinja": 3, "Jison": 2, "Jison Lex": 2, "Jolie": 2, @@ -251,6 +256,7 @@ var LanguagesType = map[string]int{ "KiCad Schematic": 1, "Kit": 3, "Kotlin": 2, + "Kusto": 1, "LFE": 2, "LLVM": 2, "LOLCODE": 2, @@ -301,6 +307,7 @@ var LanguagesType = map[string]int{ "Meson": 2, "Metal": 2, "Microsoft Developer Studio Project": 1, + "Microsoft Visual Studio Solution": 1, "MiniD": 2, "Mirah": 2, "Modelica": 2, @@ -428,6 +435,7 @@ var LanguagesType = map[string]int{ "Record Jar": 1, "Red": 2, "Redcode": 2, + "Redirect Rules": 1, "Regular Expression": 1, "Ren'Py": 2, "RenderScript": 2, @@ -465,6 +473,7 @@ var LanguagesType = map[string]int{ "ShellSession": 2, "Shen": 2, "Sieve": 2, + "Singularity": 2, "Slash": 2, "Slice": 2, "Slim": 3, @@ -480,6 +489,7 @@ var LanguagesType = map[string]int{ "Standard ML": 2, "Starlark": 2, "Stata": 2, + "StringTemplate": 3, "Stylus": 3, "SubRip Text": 1, "SugarSS": 3, @@ -551,6 +561,7 @@ var LanguagesType = map[string]int{ "XS": 2, "XSLT": 2, "Xojo": 2, + "Xonsh": 2, "Xtend": 2, "YAML": 1, "YANG": 1, @@ -570,6 +581,7 @@ var LanguagesType = map[string]int{ "eC": 2, "edn": 1, "fish": 2, + "jq": 2, "mIRC Script": 2, "mcfunction": 2, "mupad": 2, @@ -578,6 +590,7 @@ var LanguagesType = map[string]int{ "ooc": 2, "q": 2, "reStructuredText": 4, + "robots.txt": 1, "sed": 2, "wdl": 2, "wisp": 2, diff --git a/vendor/github.com/go-enry/go-enry/v2/data/vendor.go b/vendor/github.com/go-enry/go-enry/v2/data/vendor.go index d650cfbdc9..e620fbffb2 100644 --- a/vendor/github.com/go-enry/go-enry/v2/data/vendor.go +++ b/vendor/github.com/go-enry/go-enry/v2/data/vendor.go @@ -1,5 +1,5 @@ // Code generated by github.com/go-enry/go-enry/v2/internal/code-generator DO NOT EDIT. -// Extracted from github/linguist commit: 6aed0bd564f55c4f2d987c2e6035eda7aea26375 +// Extracted from github/linguist commit: 95636e415749b0bf8fbf3f86922f788cf91c11a2 package data diff --git a/vendor/github.com/go-redis/redis/v8/README.md b/vendor/github.com/go-redis/redis/v8/README.md index e58d867df9..bc4624e0a9 100644 --- a/vendor/github.com/go-redis/redis/v8/README.md +++ b/vendor/github.com/go-redis/redis/v8/README.md @@ -17,6 +17,12 @@ - [Examples](https://pkg.go.dev/github.com/go-redis/redis/v8?tab=doc#pkg-examples) - [RealWorld example app](https://github.com/uptrace/go-treemux-realworld-example-app) +My other projects: + +- [Bun](https://bun.uptrace.dev) - fast and simple SQL client for PostgreSQL, MySQL, and SQLite. +- [treemux](https://github.com/vmihailenco/treemux) - high-speed, flexible, tree-based HTTP router + for Go. + ## Ecosystem - [Redis Mock](https://github.com/go-redis/redismock). @@ -160,8 +166,3 @@ Lastly, run: ``` go test ``` - -## See also - -- [Fast and flexible ORM](https://github.com/uptrace/bun) -- [msgpack for Go](https://github.com/vmihailenco/msgpack) diff --git a/vendor/github.com/go-redis/redis/v8/cluster.go b/vendor/github.com/go-redis/redis/v8/cluster.go index e5d49ddee7..49b2d37bd6 100644 --- a/vendor/github.com/go-redis/redis/v8/cluster.go +++ b/vendor/github.com/go-redis/redis/v8/cluster.go @@ -91,7 +91,7 @@ func (opt *ClusterOptions) init() { } if opt.PoolSize == 0 { - opt.PoolSize = 5 * runtime.NumCPU() + opt.PoolSize = 5 * runtime.GOMAXPROCS(0) } switch opt.ReadTimeout { diff --git a/vendor/github.com/go-redis/redis/v8/command.go b/vendor/github.com/go-redis/redis/v8/command.go index 9a3018d3b4..77d0bada4d 100644 --- a/vendor/github.com/go-redis/redis/v8/command.go +++ b/vendor/github.com/go-redis/redis/v8/command.go @@ -1501,6 +1501,122 @@ func (cmd *XPendingExtCmd) readReply(rd *proto.Reader) error { //------------------------------------------------------------------------------ +type XAutoClaimCmd struct { + baseCmd + + start string + val []XMessage +} + +var _ Cmder = (*XAutoClaimCmd)(nil) + +func NewXAutoClaimCmd(ctx context.Context, args ...interface{}) *XAutoClaimCmd { + return &XAutoClaimCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *XAutoClaimCmd) Val() (messages []XMessage, start string) { + return cmd.val, cmd.start +} + +func (cmd *XAutoClaimCmd) Result() (messages []XMessage, start string, err error) { + return cmd.val, cmd.start, cmd.err +} + +func (cmd *XAutoClaimCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XAutoClaimCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + if n != 2 { + return nil, fmt.Errorf("got %d, wanted 2", n) + } + var err error + + cmd.start, err = rd.ReadString() + if err != nil { + return nil, err + } + + cmd.val, err = readXMessageSlice(rd) + if err != nil { + return nil, err + } + + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + +type XAutoClaimJustIDCmd struct { + baseCmd + + start string + val []string +} + +var _ Cmder = (*XAutoClaimJustIDCmd)(nil) + +func NewXAutoClaimJustIDCmd(ctx context.Context, args ...interface{}) *XAutoClaimJustIDCmd { + return &XAutoClaimJustIDCmd{ + baseCmd: baseCmd{ + ctx: ctx, + args: args, + }, + } +} + +func (cmd *XAutoClaimJustIDCmd) Val() (ids []string, start string) { + return cmd.val, cmd.start +} + +func (cmd *XAutoClaimJustIDCmd) Result() (ids []string, start string, err error) { + return cmd.val, cmd.start, cmd.err +} + +func (cmd *XAutoClaimJustIDCmd) String() string { + return cmdString(cmd, cmd.val) +} + +func (cmd *XAutoClaimJustIDCmd) readReply(rd *proto.Reader) error { + _, err := rd.ReadArrayReply(func(rd *proto.Reader, n int64) (interface{}, error) { + if n != 2 { + return nil, fmt.Errorf("got %d, wanted 2", n) + } + var err error + + cmd.start, err = rd.ReadString() + if err != nil { + return nil, err + } + + nn, err := rd.ReadArrayLen() + if err != nil { + return nil, err + } + + cmd.val = make([]string, nn) + for i := 0; i < nn; i++ { + cmd.val[i], err = rd.ReadString() + if err != nil { + return nil, err + } + } + + return nil, nil + }) + return err +} + +//------------------------------------------------------------------------------ + type XInfoConsumersCmd struct { baseCmd val []XInfoConsumer diff --git a/vendor/github.com/go-redis/redis/v8/commands.go b/vendor/github.com/go-redis/redis/v8/commands.go index 4ac42ecdbd..9e1e5ad254 100644 --- a/vendor/github.com/go-redis/redis/v8/commands.go +++ b/vendor/github.com/go-redis/redis/v8/commands.go @@ -9,7 +9,8 @@ import ( "github.com/go-redis/redis/v8/internal" ) -// KeepTTL is an option for Set command to keep key's existing TTL. +// KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, +// otherwise you will receive an error: (error) ERR syntax error. // For example: // // rdb.Set(ctx, key, value, redis.KeepTTL) @@ -226,6 +227,7 @@ type Cmdable interface { XGroupCreateMkStream(ctx context.Context, stream, group, start string) *StatusCmd XGroupSetID(ctx context.Context, stream, group, start string) *StatusCmd XGroupDestroy(ctx context.Context, stream, group string) *IntCmd + XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd XReadGroup(ctx context.Context, a *XReadGroupArgs) *XStreamSliceCmd XAck(ctx context.Context, stream, group string, ids ...string) *IntCmd @@ -233,20 +235,39 @@ type Cmdable interface { XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingExtCmd XClaim(ctx context.Context, a *XClaimArgs) *XMessageSliceCmd XClaimJustID(ctx context.Context, a *XClaimArgs) *StringSliceCmd + + // TODO: XTrim and XTrimApprox remove in v9. XTrim(ctx context.Context, key string, maxLen int64) *IntCmd XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd + XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd + XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd + XTrimMinID(ctx context.Context, key string, minID string) *IntCmd + XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd XInfoGroups(ctx context.Context, key string) *XInfoGroupsCmd XInfoStream(ctx context.Context, key string) *XInfoStreamCmd XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd + + // TODO: remove + // ZAddCh + // ZIncr + // ZAddNXCh + // ZAddXXCh + // ZIncrNX + // ZIncrXX + // in v9. + // use ZAddArgs and ZAddArgsIncr. + ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd + ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd + ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd ZIncr(ctx context.Context, key string, member *Z) *FloatCmd ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd @@ -265,6 +286,9 @@ type Cmdable interface { ZRangeByScore(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ZRangeByLex(ctx context.Context, key string, opt *ZRangeBy) *StringSliceCmd ZRangeByScoreWithScores(ctx context.Context, key string, opt *ZRangeBy) *ZSliceCmd + ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd + ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd + ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd ZRank(ctx context.Context, key, member string) *IntCmd ZRem(ctx context.Context, key string, members ...interface{}) *IntCmd ZRemRangeByRank(ctx context.Context, key string, start, stop int64) *IntCmd @@ -278,6 +302,8 @@ type Cmdable interface { ZRevRank(ctx context.Context, key, member string) *IntCmd ZScore(ctx context.Context, key, member string) *FloatCmd ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd + ZUnion(ctx context.Context, store ZStore) *StringSliceCmd + ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd ZRandMember(ctx context.Context, key string, count int, withScores bool) *StringSliceCmd ZDiff(ctx context.Context, keys ...string) *StringSliceCmd ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd @@ -386,7 +412,7 @@ func (c statefulCmdable) Auth(ctx context.Context, password string) *StatusCmd { return cmd } -// Perform an AUTH command, using the given user and pass. +// AuthACL Perform an AUTH command, using the given user and pass. // Should be used to authenticate the current connection with one of the connections defined in the ACL list // when connecting to a Redis 6.0 instance, or greater, that is using the Redis ACL system. func (c statefulCmdable) AuthACL(ctx context.Context, username, password string) *StatusCmd { @@ -447,7 +473,7 @@ func (c cmdable) Ping(ctx context.Context) *StatusCmd { return cmd } -func (c cmdable) Quit(ctx context.Context) *StatusCmd { +func (c cmdable) Quit(_ context.Context) *StatusCmd { panic("not implemented") } @@ -710,7 +736,7 @@ func (c cmdable) DecrBy(ctx context.Context, key string, decrement int64) *IntCm return cmd } -// Redis `GET key` command. It returns redis.Nil error when key does not exist. +// Get Redis `GET key` command. It returns redis.Nil error when key does not exist. func (c cmdable) Get(ctx context.Context, key string) *StringCmd { cmd := NewStringCmd(ctx, "get", key) _ = c(ctx, cmd) @@ -729,7 +755,7 @@ func (c cmdable) GetSet(ctx context.Context, key string, value interface{}) *Str return cmd } -// An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). +// GetEx An expiration of zero removes the TTL associated with the key (i.e. GETEX key persist). // Requires Redis >= 6.2.0. func (c cmdable) GetEx(ctx context.Context, key string, expiration time.Duration) *StringCmd { args := make([]interface{}, 0, 4) @@ -749,7 +775,7 @@ func (c cmdable) GetEx(ctx context.Context, key string, expiration time.Duration return cmd } -// redis-server version >= 6.2.0. +// GetDel redis-server version >= 6.2.0. func (c cmdable) GetDel(ctx context.Context, key string) *StringCmd { cmd := NewStringCmd(ctx, "getdel", key) _ = c(ctx, cmd) @@ -811,11 +837,12 @@ func (c cmdable) MSetNX(ctx context.Context, values ...interface{}) *BoolCmd { return cmd } -// Redis `SET key value [expiration]` command. +// Set Redis `SET key value [expiration]` command. // Use expiration for `SETEX`-like behavior. // // Zero expiration means the key has no expiration time. -// KeepTTL(-1) expiration is a Redis KEEPTTL option to keep existing TTL. +// KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, +// otherwise you will receive an error: (error) ERR syntax error. func (c cmdable) Set(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd { args := make([]interface{}, 3, 5) args[0] = "set" @@ -848,7 +875,8 @@ type SetArgs struct { // When Get is true, the command returns the old value stored at key, or nil when key did not exist. Get bool - // KeepTTL is a Redis KEEPTTL option to keep existing TTL. + // KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, + // otherwise you will receive an error: (error) ERR syntax error. KeepTTL bool } @@ -886,17 +914,18 @@ func (c cmdable) SetArgs(ctx context.Context, key string, value interface{}, a S return cmd } -// Redis `SETEX key expiration value` command. +// SetEX Redis `SETEX key expiration value` command. func (c cmdable) SetEX(ctx context.Context, key string, value interface{}, expiration time.Duration) *StatusCmd { cmd := NewStatusCmd(ctx, "setex", key, formatSec(ctx, expiration), value) _ = c(ctx, cmd) return cmd } -// Redis `SET key value [expiration] NX` command. +// SetNX Redis `SET key value [expiration] NX` command. // // Zero expiration means the key has no expiration time. -// KeepTTL(-1) expiration is a Redis KEEPTTL option to keep existing TTL. +// KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, +// otherwise you will receive an error: (error) ERR syntax error. func (c cmdable) SetNX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd { var cmd *BoolCmd switch expiration { @@ -917,10 +946,11 @@ func (c cmdable) SetNX(ctx context.Context, key string, value interface{}, expir return cmd } -// Redis `SET key value [expiration] XX` command. +// SetXX Redis `SET key value [expiration] XX` command. // // Zero expiration means the key has no expiration time. -// KeepTTL(-1) expiration is a Redis KEEPTTL option to keep existing TTL. +// KeepTTL is a Redis KEEPTTL option to keep existing TTL, it requires your redis-server version >= 6.0, +// otherwise you will receive an error: (error) ERR syntax error. func (c cmdable) SetXX(ctx context.Context, key string, value interface{}, expiration time.Duration) *BoolCmd { var cmd *BoolCmd switch expiration { @@ -1228,7 +1258,7 @@ func (c cmdable) HVals(ctx context.Context, key string) *StringSliceCmd { return cmd } -// redis-server version >= 6.2.0. +// HRandField redis-server version >= 6.2.0. func (c cmdable) HRandField(ctx context.Context, key string, count int, withValues bool) *StringSliceCmd { args := make([]interface{}, 0, 4) @@ -1521,7 +1551,7 @@ func (c cmdable) SIsMember(ctx context.Context, key string, member interface{}) return cmd } -// Redis `SMISMEMBER key member [member ...]` command. +// SMIsMember Redis `SMISMEMBER key member [member ...]` command. func (c cmdable) SMIsMember(ctx context.Context, key string, members ...interface{}) *BoolSliceCmd { args := make([]interface{}, 2, 2+len(members)) args[0] = "smismember" @@ -1532,14 +1562,14 @@ func (c cmdable) SMIsMember(ctx context.Context, key string, members ...interfac return cmd } -// Redis `SMEMBERS key` command output as a slice. +// SMembers Redis `SMEMBERS key` command output as a slice. func (c cmdable) SMembers(ctx context.Context, key string) *StringSliceCmd { cmd := NewStringSliceCmd(ctx, "smembers", key) _ = c(ctx, cmd) return cmd } -// Redis `SMEMBERS key` command output as a map. +// SMembersMap Redis `SMEMBERS key` command output as a map. func (c cmdable) SMembersMap(ctx context.Context, key string) *StringStructMapCmd { cmd := NewStringStructMapCmd(ctx, "smembers", key) _ = c(ctx, cmd) @@ -1552,28 +1582,28 @@ func (c cmdable) SMove(ctx context.Context, source, destination string, member i return cmd } -// Redis `SPOP key` command. +// SPop Redis `SPOP key` command. func (c cmdable) SPop(ctx context.Context, key string) *StringCmd { cmd := NewStringCmd(ctx, "spop", key) _ = c(ctx, cmd) return cmd } -// Redis `SPOP key count` command. +// SPopN Redis `SPOP key count` command. func (c cmdable) SPopN(ctx context.Context, key string, count int64) *StringSliceCmd { cmd := NewStringSliceCmd(ctx, "spop", key, count) _ = c(ctx, cmd) return cmd } -// Redis `SRANDMEMBER key` command. +// SRandMember Redis `SRANDMEMBER key` command. func (c cmdable) SRandMember(ctx context.Context, key string) *StringCmd { cmd := NewStringCmd(ctx, "srandmember", key) _ = c(ctx, cmd) return cmd } -// Redis `SRANDMEMBER key count` command. +// SRandMemberN Redis `SRANDMEMBER key count` command. func (c cmdable) SRandMemberN(ctx context.Context, key string, count int64) *StringSliceCmd { cmd := NewStringSliceCmd(ctx, "srandmember", key, count) _ = c(ctx, cmd) @@ -1621,22 +1651,50 @@ func (c cmdable) SUnionStore(ctx context.Context, destination string, keys ...st // - XAddArgs.Values = map[string]interface{}{"key1": "value1", "key2": "value2"} // // Note that map will not preserve the order of key-value pairs. +// MaxLen/MaxLenApprox and MinID are in conflict, only one of them can be used. type XAddArgs struct { - Stream string - MaxLen int64 // MAXLEN N + Stream string + NoMkStream bool + MaxLen int64 // MAXLEN N + + // Deprecated: use MaxLen+Approx, remove in v9. MaxLenApprox int64 // MAXLEN ~ N - ID string - Values interface{} + + MinID string + // Approx causes MaxLen and MinID to use "~" matcher (instead of "="). + Approx bool + Limit int64 + ID string + Values interface{} } +// XAdd a.Limit has a bug, please confirm it and use it. +// issue: https://github.com/redis/redis/issues/9046 func (c cmdable) XAdd(ctx context.Context, a *XAddArgs) *StringCmd { - args := make([]interface{}, 0, 8) - args = append(args, "xadd") - args = append(args, a.Stream) - if a.MaxLen > 0 { - args = append(args, "maxlen", a.MaxLen) - } else if a.MaxLenApprox > 0 { + args := make([]interface{}, 0, 11) + args = append(args, "xadd", a.Stream) + if a.NoMkStream { + args = append(args, "nomkstream") + } + switch { + case a.MaxLen > 0: + if a.Approx { + args = append(args, "maxlen", "~", a.MaxLen) + } else { + args = append(args, "maxlen", a.MaxLen) + } + case a.MaxLenApprox > 0: + // TODO remove in v9. args = append(args, "maxlen", "~", a.MaxLenApprox) + case a.MinID != "": + if a.Approx { + args = append(args, "minid", "~", a.MinID) + } else { + args = append(args, "minid", a.MinID) + } + } + if a.Limit > 0 { + args = append(args, "limit", a.Limit) } if a.ID != "" { args = append(args, a.ID) @@ -1757,6 +1815,12 @@ func (c cmdable) XGroupDestroy(ctx context.Context, stream, group string) *IntCm return cmd } +func (c cmdable) XGroupCreateConsumer(ctx context.Context, stream, group, consumer string) *IntCmd { + cmd := NewIntCmd(ctx, "xgroup", "createconsumer", stream, group, consumer) + _ = c(ctx, cmd) + return cmd +} + func (c cmdable) XGroupDelConsumer(ctx context.Context, stream, group, consumer string) *IntCmd { cmd := NewIntCmd(ctx, "xgroup", "delconsumer", stream, group, consumer) _ = c(ctx, cmd) @@ -1845,6 +1909,39 @@ func (c cmdable) XPendingExt(ctx context.Context, a *XPendingExtArgs) *XPendingE return cmd } +type XAutoClaimArgs struct { + Stream string + Group string + MinIdle time.Duration + Start string + Count int64 + Consumer string +} + +func (c cmdable) XAutoClaim(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimCmd { + args := xAutoClaimArgs(ctx, a) + cmd := NewXAutoClaimCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) XAutoClaimJustID(ctx context.Context, a *XAutoClaimArgs) *XAutoClaimJustIDCmd { + args := xAutoClaimArgs(ctx, a) + args = append(args, "justid") + cmd := NewXAutoClaimJustIDCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + +func xAutoClaimArgs(ctx context.Context, a *XAutoClaimArgs) []interface{} { + args := make([]interface{}, 0, 9) + args = append(args, "xautoclaim", a.Stream, a.Group, a.Consumer, formatMs(ctx, a.MinIdle), a.Start) + if a.Count > 0 { + args = append(args, "count", a.Count) + } + return args +} + type XClaimArgs struct { Stream string Group string @@ -1881,16 +1978,63 @@ func xClaimArgs(a *XClaimArgs) []interface{} { return args } -func (c cmdable) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd { - cmd := NewIntCmd(ctx, "xtrim", key, "maxlen", maxLen) +// xTrim If approx is true, add the "~" parameter, otherwise it is the default "=" (redis default). +// example: +// XTRIM key MAXLEN/MINID threshold LIMIT limit. +// XTRIM key MAXLEN/MINID ~ threshold LIMIT limit. +// The redis-server version is lower than 6.2, please set limit to 0. +func (c cmdable) xTrim( + ctx context.Context, key, strategy string, + approx bool, threshold interface{}, limit int64, +) *IntCmd { + args := make([]interface{}, 0, 7) + args = append(args, "xtrim", key, strategy) + if approx { + args = append(args, "~") + } + args = append(args, threshold) + if limit > 0 { + args = append(args, "limit", limit) + } + cmd := NewIntCmd(ctx, args...) _ = c(ctx, cmd) return cmd } +// Deprecated: use XTrimMaxLen, remove in v9. +func (c cmdable) XTrim(ctx context.Context, key string, maxLen int64) *IntCmd { + return c.xTrim(ctx, key, "maxlen", false, maxLen, 0) +} + +// Deprecated: use XTrimMaxLenApprox, remove in v9. func (c cmdable) XTrimApprox(ctx context.Context, key string, maxLen int64) *IntCmd { - cmd := NewIntCmd(ctx, "xtrim", key, "maxlen", "~", maxLen) - _ = c(ctx, cmd) - return cmd + return c.xTrim(ctx, key, "maxlen", true, maxLen, 0) +} + +// XTrimMaxLen No `~` rules are used, `limit` cannot be used. +// cmd: XTRIM key MAXLEN maxLen +func (c cmdable) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *IntCmd { + return c.xTrim(ctx, key, "maxlen", false, maxLen, 0) +} + +// XTrimMaxLenApprox LIMIT has a bug, please confirm it and use it. +// issue: https://github.com/redis/redis/issues/9046 +// cmd: XTRIM key MAXLEN ~ maxLen LIMIT limit +func (c cmdable) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd { + return c.xTrim(ctx, key, "maxlen", true, maxLen, limit) +} + +// XTrimMinID No `~` rules are used, `limit` cannot be used. +// cmd: XTRIM key MINID minID +func (c cmdable) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd { + return c.xTrim(ctx, key, "minid", false, minID, 0) +} + +// XTrimMinIDApprox LIMIT has a bug, please confirm it and use it. +// issue: https://github.com/redis/redis/issues/9046 +// cmd: XTRIM key MINID ~ minID LIMIT limit +func (c cmdable) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd { + return c.xTrim(ctx, key, "minid", true, minID, limit) } func (c cmdable) XInfoConsumers(ctx context.Context, key string, group string) *XInfoConsumersCmd { @@ -1938,7 +2082,7 @@ type ZWithKey struct { Key string } -// ZStore is used as an arg to ZInterStore and ZUnionStore. +// ZStore is used as an arg to ZInter/ZInterStore and ZUnion/ZUnionStore. type ZStore struct { Keys []string Weights []float64 @@ -1946,7 +2090,7 @@ type ZStore struct { Aggregate string } -func (z *ZStore) len() (n int) { +func (z ZStore) len() (n int) { n = len(z.Keys) if len(z.Weights) > 0 { n += 1 + len(z.Weights) @@ -1957,7 +2101,23 @@ func (z *ZStore) len() (n int) { return n } -// Redis `BZPOPMAX key [key ...] timeout` command. +func (z ZStore) appendArgs(args []interface{}) []interface{} { + for _, key := range z.Keys { + args = append(args, key) + } + if len(z.Weights) > 0 { + args = append(args, "weights") + for _, weights := range z.Weights { + args = append(args, weights) + } + } + if z.Aggregate != "" { + args = append(args, "aggregate", z.Aggregate) + } + return args +} + +// BZPopMax Redis `BZPOPMAX key [key ...] timeout` command. func (c cmdable) BZPopMax(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd { args := make([]interface{}, 1+len(keys)+1) args[0] = "bzpopmax" @@ -1971,7 +2131,7 @@ func (c cmdable) BZPopMax(ctx context.Context, timeout time.Duration, keys ...st return cmd } -// Redis `BZPOPMIN key [key ...] timeout` command. +// BZPopMin Redis `BZPOPMIN key [key ...] timeout` command. func (c cmdable) BZPopMin(ctx context.Context, timeout time.Duration, keys ...string) *ZWithKeyCmd { args := make([]interface{}, 1+len(keys)+1) args[0] = "bzpopmin" @@ -1985,96 +2145,169 @@ func (c cmdable) BZPopMin(ctx context.Context, timeout time.Duration, keys ...st return cmd } -func (c cmdable) zAdd(ctx context.Context, a []interface{}, n int, members ...*Z) *IntCmd { +// ZAddArgs WARN: The GT, LT and NX options are mutually exclusive. +type ZAddArgs struct { + NX bool + XX bool + LT bool + GT bool + Ch bool + Members []Z +} + +func (c cmdable) zAddArgs(key string, args ZAddArgs, incr bool) []interface{} { + a := make([]interface{}, 0, 6+2*len(args.Members)) + a = append(a, "zadd", key) + + // The GT, LT and NX options are mutually exclusive. + if args.NX { + a = append(a, "nx") + } else { + if args.XX { + a = append(a, "xx") + } + if args.GT { + a = append(a, "gt") + } else if args.LT { + a = append(a, "lt") + } + } + if args.Ch { + a = append(a, "ch") + } + if incr { + a = append(a, "incr") + } + for _, m := range args.Members { + a = append(a, m.Score) + a = append(a, m.Member) + } + return a +} + +func (c cmdable) ZAddArgs(ctx context.Context, key string, args ZAddArgs) *IntCmd { + cmd := NewIntCmd(ctx, c.zAddArgs(key, args, false)...) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZAddArgsIncr(ctx context.Context, key string, args ZAddArgs) *FloatCmd { + cmd := NewFloatCmd(ctx, c.zAddArgs(key, args, true)...) + _ = c(ctx, cmd) + return cmd +} + +// TODO: Compatible with v8 api, will be removed in v9. +func (c cmdable) zAdd(ctx context.Context, key string, args ZAddArgs, members ...*Z) *IntCmd { + args.Members = make([]Z, len(members)) for i, m := range members { - a[n+2*i] = m.Score - a[n+2*i+1] = m.Member + args.Members[i] = *m } - cmd := NewIntCmd(ctx, a...) + cmd := NewIntCmd(ctx, c.zAddArgs(key, args, false)...) _ = c(ctx, cmd) return cmd } -// Redis `ZADD key score member [score member ...]` command. +// ZAdd Redis `ZADD key score member [score member ...]` command. func (c cmdable) ZAdd(ctx context.Context, key string, members ...*Z) *IntCmd { - const n = 2 - a := make([]interface{}, n+2*len(members)) - a[0], a[1] = "zadd", key - return c.zAdd(ctx, a, n, members...) + return c.zAdd(ctx, key, ZAddArgs{}, members...) } -// Redis `ZADD key NX score member [score member ...]` command. +// ZAddNX Redis `ZADD key NX score member [score member ...]` command. func (c cmdable) ZAddNX(ctx context.Context, key string, members ...*Z) *IntCmd { - const n = 3 - a := make([]interface{}, n+2*len(members)) - a[0], a[1], a[2] = "zadd", key, "nx" - return c.zAdd(ctx, a, n, members...) + return c.zAdd(ctx, key, ZAddArgs{ + NX: true, + }, members...) } -// Redis `ZADD key XX score member [score member ...]` command. +// ZAddXX Redis `ZADD key XX score member [score member ...]` command. func (c cmdable) ZAddXX(ctx context.Context, key string, members ...*Z) *IntCmd { - const n = 3 - a := make([]interface{}, n+2*len(members)) - a[0], a[1], a[2] = "zadd", key, "xx" - return c.zAdd(ctx, a, n, members...) -} - -// Redis `ZADD key CH score member [score member ...]` command. + return c.zAdd(ctx, key, ZAddArgs{ + XX: true, + }, members...) +} + +// ZAddCh Redis `ZADD key CH score member [score member ...]` command. +// Deprecated: Use +// client.ZAddArgs(ctx, ZAddArgs{ +// Ch: true, +// Members: []Z, +// }) +// remove in v9. func (c cmdable) ZAddCh(ctx context.Context, key string, members ...*Z) *IntCmd { - const n = 3 - a := make([]interface{}, n+2*len(members)) - a[0], a[1], a[2] = "zadd", key, "ch" - return c.zAdd(ctx, a, n, members...) -} - -// Redis `ZADD key NX CH score member [score member ...]` command. + return c.zAdd(ctx, key, ZAddArgs{ + Ch: true, + }, members...) +} + +// ZAddNXCh Redis `ZADD key NX CH score member [score member ...]` command. +// Deprecated: Use +// client.ZAddArgs(ctx, ZAddArgs{ +// NX: true, +// Ch: true, +// Members: []Z, +// }) +// remove in v9. func (c cmdable) ZAddNXCh(ctx context.Context, key string, members ...*Z) *IntCmd { - const n = 4 - a := make([]interface{}, n+2*len(members)) - a[0], a[1], a[2], a[3] = "zadd", key, "nx", "ch" - return c.zAdd(ctx, a, n, members...) -} - -// Redis `ZADD key XX CH score member [score member ...]` command. + return c.zAdd(ctx, key, ZAddArgs{ + NX: true, + Ch: true, + }, members...) +} + +// ZAddXXCh Redis `ZADD key XX CH score member [score member ...]` command. +// Deprecated: Use +// client.ZAddArgs(ctx, ZAddArgs{ +// XX: true, +// Ch: true, +// Members: []Z, +// }) +// remove in v9. func (c cmdable) ZAddXXCh(ctx context.Context, key string, members ...*Z) *IntCmd { - const n = 4 - a := make([]interface{}, n+2*len(members)) - a[0], a[1], a[2], a[3] = "zadd", key, "xx", "ch" - return c.zAdd(ctx, a, n, members...) -} - -func (c cmdable) zIncr(ctx context.Context, a []interface{}, n int, members ...*Z) *FloatCmd { - for i, m := range members { - a[n+2*i] = m.Score - a[n+2*i+1] = m.Member - } - cmd := NewFloatCmd(ctx, a...) - _ = c(ctx, cmd) - return cmd -} - -// Redis `ZADD key INCR score member` command. + return c.zAdd(ctx, key, ZAddArgs{ + XX: true, + Ch: true, + }, members...) +} + +// ZIncr Redis `ZADD key INCR score member` command. +// Deprecated: Use +// client.ZAddArgsIncr(ctx, ZAddArgs{ +// Members: []Z, +// }) +// remove in v9. func (c cmdable) ZIncr(ctx context.Context, key string, member *Z) *FloatCmd { - const n = 3 - a := make([]interface{}, n+2) - a[0], a[1], a[2] = "zadd", key, "incr" - return c.zIncr(ctx, a, n, member) + return c.ZAddArgsIncr(ctx, key, ZAddArgs{ + Members: []Z{*member}, + }) } -// Redis `ZADD key NX INCR score member` command. +// ZIncrNX Redis `ZADD key NX INCR score member` command. +// Deprecated: Use +// client.ZAddArgsIncr(ctx, ZAddArgs{ +// NX: true, +// Members: []Z, +// }) +// remove in v9. func (c cmdable) ZIncrNX(ctx context.Context, key string, member *Z) *FloatCmd { - const n = 4 - a := make([]interface{}, n+2) - a[0], a[1], a[2], a[3] = "zadd", key, "incr", "nx" - return c.zIncr(ctx, a, n, member) + return c.ZAddArgsIncr(ctx, key, ZAddArgs{ + NX: true, + Members: []Z{*member}, + }) } -// Redis `ZADD key XX INCR score member` command. +// ZIncrXX Redis `ZADD key XX INCR score member` command. +// Deprecated: Use +// client.ZAddArgsIncr(ctx, ZAddArgs{ +// XX: true, +// Members: []Z, +// }) +// remove in v9. func (c cmdable) ZIncrXX(ctx context.Context, key string, member *Z) *FloatCmd { - const n = 4 - a := make([]interface{}, n+2) - a[0], a[1], a[2], a[3] = "zadd", key, "incr", "xx" - return c.zIncr(ctx, a, n, member) + return c.ZAddArgsIncr(ctx, key, ZAddArgs{ + XX: true, + Members: []Z{*member}, + }) } func (c cmdable) ZCard(ctx context.Context, key string) *IntCmd { @@ -2104,18 +2337,7 @@ func (c cmdable) ZIncrBy(ctx context.Context, key string, increment float64, mem func (c cmdable) ZInterStore(ctx context.Context, destination string, store *ZStore) *IntCmd { args := make([]interface{}, 0, 3+store.len()) args = append(args, "zinterstore", destination, len(store.Keys)) - for _, key := range store.Keys { - args = append(args, key) - } - if len(store.Weights) > 0 { - args = append(args, "weights") - for _, weight := range store.Weights { - args = append(args, weight) - } - } - if store.Aggregate != "" { - args = append(args, "aggregate", store.Aggregate) - } + args = store.appendArgs(args) cmd := NewIntCmd(ctx, args...) cmd.setFirstKeyPos(3) _ = c(ctx, cmd) @@ -2125,19 +2347,7 @@ func (c cmdable) ZInterStore(ctx context.Context, destination string, store *ZSt func (c cmdable) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd { args := make([]interface{}, 0, 2+store.len()) args = append(args, "zinter", len(store.Keys)) - for _, key := range store.Keys { - args = append(args, key) - } - if len(store.Weights) > 0 { - args = append(args, "weights") - for _, weights := range store.Weights { - args = append(args, weights) - } - } - - if store.Aggregate != "" { - args = append(args, "aggregate", store.Aggregate) - } + args = store.appendArgs(args) cmd := NewStringSliceCmd(ctx, args...) cmd.setFirstKeyPos(2) _ = c(ctx, cmd) @@ -2147,18 +2357,7 @@ func (c cmdable) ZInter(ctx context.Context, store *ZStore) *StringSliceCmd { func (c cmdable) ZInterWithScores(ctx context.Context, store *ZStore) *ZSliceCmd { args := make([]interface{}, 0, 3+store.len()) args = append(args, "zinter", len(store.Keys)) - for _, key := range store.Keys { - args = append(args, key) - } - if len(store.Weights) > 0 { - args = append(args, "weights") - for _, weights := range store.Weights { - args = append(args, weights) - } - } - if store.Aggregate != "" { - args = append(args, "aggregate", store.Aggregate) - } + args = store.appendArgs(args) args = append(args, "withscores") cmd := NewZSliceCmd(ctx, args...) cmd.setFirstKeyPos(2) @@ -2218,29 +2417,112 @@ func (c cmdable) ZPopMin(ctx context.Context, key string, count ...int64) *ZSlic return cmd } -func (c cmdable) zRange(ctx context.Context, key string, start, stop int64, withScores bool) *StringSliceCmd { - args := []interface{}{ - "zrange", - key, - start, - stop, +// ZRangeArgs is all the options of the ZRange command. +// In version> 6.2.0, you can replace the(cmd): +// ZREVRANGE, +// ZRANGEBYSCORE, +// ZREVRANGEBYSCORE, +// ZRANGEBYLEX, +// ZREVRANGEBYLEX. +// Please pay attention to your redis-server version. +// +// Rev, ByScore, ByLex and Offset+Count options require redis-server 6.2.0 and higher. +type ZRangeArgs struct { + Key string + + // When the ByScore option is provided, the open interval(exclusive) can be set. + // By default, the score intervals specified by <Start> and <Stop> are closed (inclusive). + // It is similar to the deprecated(6.2.0+) ZRangeByScore command. + // For example: + // ZRangeArgs{ + // Key: "example-key", + // Start: "(3", + // Stop: 8, + // ByScore: true, + // } + // cmd: "ZRange example-key (3 8 ByScore" (3 < score <= 8). + // + // For the ByLex option, it is similar to the deprecated(6.2.0+) ZRangeByLex command. + // You can set the <Start> and <Stop> options as follows: + // ZRangeArgs{ + // Key: "example-key", + // Start: "[abc", + // Stop: "(def", + // ByLex: true, + // } + // cmd: "ZRange example-key [abc (def ByLex" + // + // For normal cases (ByScore==false && ByLex==false), <Start> and <Stop> should be set to the index range (int). + // You can read the documentation for more information: https://redis.io/commands/zrange + Start interface{} + Stop interface{} + + // The ByScore and ByLex options are mutually exclusive. + ByScore bool + ByLex bool + + Rev bool + + // limit offset count. + Offset int64 + Count int64 +} + +func (z ZRangeArgs) appendArgs(args []interface{}) []interface{} { + // For Rev+ByScore/ByLex, we need to adjust the position of <Start> and <Stop>. + if z.Rev && (z.ByScore || z.ByLex) { + args = append(args, z.Key, z.Stop, z.Start) + } else { + args = append(args, z.Key, z.Start, z.Stop) } - if withScores { - args = append(args, "withscores") + + if z.ByScore { + args = append(args, "byscore") + } else if z.ByLex { + args = append(args, "bylex") + } + if z.Rev { + args = append(args, "rev") } + if z.Offset != 0 || z.Count != 0 { + args = append(args, "limit", z.Offset, z.Count) + } + return args +} + +func (c cmdable) ZRangeArgs(ctx context.Context, z ZRangeArgs) *StringSliceCmd { + args := make([]interface{}, 0, 9) + args = append(args, "zrange") + args = z.appendArgs(args) cmd := NewStringSliceCmd(ctx, args...) _ = c(ctx, cmd) return cmd } +func (c cmdable) ZRangeArgsWithScores(ctx context.Context, z ZRangeArgs) *ZSliceCmd { + args := make([]interface{}, 0, 10) + args = append(args, "zrange") + args = z.appendArgs(args) + args = append(args, "withscores") + cmd := NewZSliceCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + func (c cmdable) ZRange(ctx context.Context, key string, start, stop int64) *StringSliceCmd { - return c.zRange(ctx, key, start, stop, false) + return c.ZRangeArgs(ctx, ZRangeArgs{ + Key: key, + Start: start, + Stop: stop, + }) } func (c cmdable) ZRangeWithScores(ctx context.Context, key string, start, stop int64) *ZSliceCmd { - cmd := NewZSliceCmd(ctx, "zrange", key, start, stop, "withscores") - _ = c(ctx, cmd) - return cmd + return c.ZRangeArgsWithScores(ctx, ZRangeArgs{ + Key: key, + Start: start, + Stop: stop, + }) } type ZRangeBy struct { @@ -2289,6 +2571,15 @@ func (c cmdable) ZRangeByScoreWithScores(ctx context.Context, key string, opt *Z return cmd } +func (c cmdable) ZRangeStore(ctx context.Context, dst string, z ZRangeArgs) *IntCmd { + args := make([]interface{}, 0, 10) + args = append(args, "zrangestore", dst) + args = z.appendArgs(args) + cmd := NewIntCmd(ctx, args...) + _ = c(ctx, cmd) + return cmd +} + func (c cmdable) ZRank(ctx context.Context, key, member string) *IntCmd { cmd := NewIntCmd(ctx, "zrank", key, member) _ = c(ctx, cmd) @@ -2391,29 +2682,38 @@ func (c cmdable) ZScore(ctx context.Context, key, member string) *FloatCmd { return cmd } +func (c cmdable) ZUnion(ctx context.Context, store ZStore) *StringSliceCmd { + args := make([]interface{}, 0, 2+store.len()) + args = append(args, "zunion", len(store.Keys)) + args = store.appendArgs(args) + cmd := NewStringSliceCmd(ctx, args...) + cmd.setFirstKeyPos(2) + _ = c(ctx, cmd) + return cmd +} + +func (c cmdable) ZUnionWithScores(ctx context.Context, store ZStore) *ZSliceCmd { + args := make([]interface{}, 0, 3+store.len()) + args = append(args, "zunion", len(store.Keys)) + args = store.appendArgs(args) + args = append(args, "withscores") + cmd := NewZSliceCmd(ctx, args...) + cmd.setFirstKeyPos(2) + _ = c(ctx, cmd) + return cmd +} + func (c cmdable) ZUnionStore(ctx context.Context, dest string, store *ZStore) *IntCmd { args := make([]interface{}, 0, 3+store.len()) args = append(args, "zunionstore", dest, len(store.Keys)) - for _, key := range store.Keys { - args = append(args, key) - } - if len(store.Weights) > 0 { - args = append(args, "weights") - for _, weight := range store.Weights { - args = append(args, weight) - } - } - if store.Aggregate != "" { - args = append(args, "aggregate", store.Aggregate) - } - + args = store.appendArgs(args) cmd := NewIntCmd(ctx, args...) cmd.setFirstKeyPos(3) _ = c(ctx, cmd) return cmd } -// redis-server version >= 6.2.0. +// ZRandMember redis-server version >= 6.2.0. func (c cmdable) ZRandMember(ctx context.Context, key string, count int, withScores bool) *StringSliceCmd { args := make([]interface{}, 0, 4) @@ -2428,7 +2728,7 @@ func (c cmdable) ZRandMember(ctx context.Context, key string, count int, withSco return cmd } -// redis-server version >= 6.2.0. +// ZDiff redis-server version >= 6.2.0. func (c cmdable) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd { args := make([]interface{}, 2+len(keys)) args[0] = "zdiff" @@ -2443,7 +2743,7 @@ func (c cmdable) ZDiff(ctx context.Context, keys ...string) *StringSliceCmd { return cmd } -// redis-server version >= 6.2.0. +// ZDiffWithScores redis-server version >= 6.2.0. func (c cmdable) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd { args := make([]interface{}, 3+len(keys)) args[0] = "zdiff" @@ -2459,7 +2759,7 @@ func (c cmdable) ZDiffWithScores(ctx context.Context, keys ...string) *ZSliceCmd return cmd } -// redis-server version >=6.2.0. +// ZDiffStore redis-server version >=6.2.0. func (c cmdable) ZDiffStore(ctx context.Context, destination string, keys ...string) *IntCmd { args := make([]interface{}, 0, 3+len(keys)) args = append(args, "zdiffstore", destination, len(keys)) @@ -2693,7 +2993,7 @@ func (c cmdable) SlowLogGet(ctx context.Context, num int64) *SlowLogCmd { return cmd } -func (c cmdable) Sync(ctx context.Context) { +func (c cmdable) Sync(_ context.Context) { panic("not implemented") } @@ -3011,7 +3311,7 @@ func (c cmdable) GeoRadiusStore( return cmd } -// GeoRadius is a read-only GEORADIUSBYMEMBER_RO command. +// GeoRadiusByMember is a read-only GEORADIUSBYMEMBER_RO command. func (c cmdable) GeoRadiusByMember( ctx context.Context, key, member string, query *GeoRadiusQuery, ) *GeoLocationCmd { diff --git a/vendor/github.com/go-redis/redis/v8/go.mod b/vendor/github.com/go-redis/redis/v8/go.mod index aa13d2ef2d..c5ac426893 100644 --- a/vendor/github.com/go-redis/redis/v8/go.mod +++ b/vendor/github.com/go-redis/redis/v8/go.mod @@ -5,7 +5,7 @@ go 1.13 require ( github.com/cespare/xxhash/v2 v2.1.1 github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f + github.com/google/go-cmp v0.5.6 // indirect github.com/onsi/ginkgo v1.15.0 github.com/onsi/gomega v1.10.5 - go.opentelemetry.io/otel/metric v0.20.0 ) diff --git a/vendor/github.com/go-redis/redis/v8/go.sum b/vendor/github.com/go-redis/redis/v8/go.sum index b8309364d9..76abf5b46c 100644 --- a/vendor/github.com/go-redis/redis/v8/go.sum +++ b/vendor/github.com/go-redis/redis/v8/go.sum @@ -1,7 +1,5 @@ github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -18,8 +16,8 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= @@ -31,20 +29,7 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.5 h1:7n6FEkpFmfCoo2t+YYqXH0evK+a9ICQz0xcAy9dYcaQ= github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/otel v0.20.0 h1:eaP0Fqu7SXHwvjiqDq83zImeehOHX8doTvU9AwXON8g= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel/metric v0.20.0 h1:4kzhXFP+btKm4jwxpjIqjs41A7MakRFUS86bqLHTIw8= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/oteltest v0.20.0 h1:HiITxCawalo5vQzdHfKeZurV8x7ljcqAgiWzF6Vaeaw= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/trace v0.20.0 h1:1DL6EXUdcg95gukhuRRvLDO/4X5THh/5dIV52lqtnbw= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -95,5 +80,3 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWD gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vendor/github.com/go-redis/redis/v8/internal/hscan/hscan.go b/vendor/github.com/go-redis/redis/v8/internal/hscan/hscan.go index 6f97f9287c..852c8bd525 100644 --- a/vendor/github.com/go-redis/redis/v8/internal/hscan/hscan.go +++ b/vendor/github.com/go-redis/redis/v8/internal/hscan/hscan.go @@ -49,7 +49,7 @@ var ( func Struct(dst interface{}) (StructValue, error) { v := reflect.ValueOf(dst) - // The dstination to scan into should be a struct pointer. + // The destination to scan into should be a struct pointer. if v.Kind() != reflect.Ptr || v.IsNil() { return StructValue{}, fmt.Errorf("redis.Scan(non-pointer %T)", dst) } diff --git a/vendor/github.com/go-redis/redis/v8/internal/instruments.go b/vendor/github.com/go-redis/redis/v8/internal/instruments.go deleted file mode 100644 index 49d6111e18..0000000000 --- a/vendor/github.com/go-redis/redis/v8/internal/instruments.go +++ /dev/null @@ -1,33 +0,0 @@ -package internal - -import ( - "context" - - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/global" -) - -var ( - // WritesCounter is a count of write commands performed. - WritesCounter metric.Int64Counter - // NewConnectionsCounter is a count of new connections. - NewConnectionsCounter metric.Int64Counter -) - -func init() { - defer func() { - if r := recover(); r != nil { - Logger.Printf(context.Background(), "Error creating meter github.com/go-redis/redis for Instruments", r) - } - }() - - meter := metric.Must(global.Meter("github.com/go-redis/redis")) - - WritesCounter = meter.NewInt64Counter("redis.writes", - metric.WithDescription("the number of writes initiated"), - ) - - NewConnectionsCounter = meter.NewInt64Counter("redis.new_connections", - metric.WithDescription("the number of connections created"), - ) -} diff --git a/vendor/github.com/go-redis/redis/v8/internal/pool/conn.go b/vendor/github.com/go-redis/redis/v8/internal/pool/conn.go index 1ce29edd4b..5661659865 100644 --- a/vendor/github.com/go-redis/redis/v8/internal/pool/conn.go +++ b/vendor/github.com/go-redis/redis/v8/internal/pool/conn.go @@ -7,7 +7,6 @@ import ( "sync/atomic" "time" - "github.com/go-redis/redis/v8/internal" "github.com/go-redis/redis/v8/internal/proto" ) @@ -86,13 +85,7 @@ func (cn *Conn) WithWriter( return err } - if err := cn.bw.Flush(); err != nil { - return err - } - - internal.WritesCounter.Add(ctx, 1) - - return nil + return cn.bw.Flush() } func (cn *Conn) Close() error { diff --git a/vendor/github.com/go-redis/redis/v8/internal/pool/pool.go b/vendor/github.com/go-redis/redis/v8/internal/pool/pool.go index 4d247b3010..a8f0a6d4e2 100644 --- a/vendor/github.com/go-redis/redis/v8/internal/pool/pool.go +++ b/vendor/github.com/go-redis/redis/v8/internal/pool/pool.go @@ -188,7 +188,6 @@ func (p *ConnPool) dialConn(ctx context.Context, pooled bool) (*Conn, error) { return nil, err } - internal.NewConnectionsCounter.Add(ctx, 1) cn := NewConn(netConn) cn.pooled = pooled return cn, nil diff --git a/vendor/github.com/go-redis/redis/v8/options.go b/vendor/github.com/go-redis/redis/v8/options.go index 7cf1bc1bbf..8bbc27b82b 100644 --- a/vendor/github.com/go-redis/redis/v8/options.go +++ b/vendor/github.com/go-redis/redis/v8/options.go @@ -77,7 +77,7 @@ type Options struct { WriteTimeout time.Duration // Maximum number of socket connections. - // Default is 10 connections per every CPU as reported by runtime.NumCPU. + // Default is 10 connections per every available CPU as reported by runtime.GOMAXPROCS. PoolSize int // Minimum number of idle connections which is useful when establishing // new connection is slow. @@ -136,7 +136,7 @@ func (opt *Options) init() { } } if opt.PoolSize == 0 { - opt.PoolSize = 10 * runtime.NumCPU() + opt.PoolSize = 10 * runtime.GOMAXPROCS(0) } switch opt.ReadTimeout { case -1: diff --git a/vendor/github.com/golang/snappy/AUTHORS b/vendor/github.com/golang/snappy/AUTHORS index 203e84ebab..52ccb5a934 100644 --- a/vendor/github.com/golang/snappy/AUTHORS +++ b/vendor/github.com/golang/snappy/AUTHORS @@ -10,6 +10,7 @@ Amazon.com, Inc Damian Gryski <dgryski@gmail.com> +Eric Buth <eric@topos.com> Google Inc. Jan Mercl <0xjnml@gmail.com> Klaus Post <klauspost@gmail.com> diff --git a/vendor/github.com/golang/snappy/CONTRIBUTORS b/vendor/github.com/golang/snappy/CONTRIBUTORS index d9914732b5..ea6524ddd0 100644 --- a/vendor/github.com/golang/snappy/CONTRIBUTORS +++ b/vendor/github.com/golang/snappy/CONTRIBUTORS @@ -26,7 +26,9 @@ # Please keep the list sorted. +Alex Legg <alexlegg@google.com> Damian Gryski <dgryski@gmail.com> +Eric Buth <eric@topos.com> Jan Mercl <0xjnml@gmail.com> Jonathan Swinney <jswinney@amazon.com> Kai Backman <kaib@golang.org> diff --git a/vendor/github.com/golang/snappy/decode.go b/vendor/github.com/golang/snappy/decode.go index f1e04b172c..23c6e26c6b 100644 --- a/vendor/github.com/golang/snappy/decode.go +++ b/vendor/github.com/golang/snappy/decode.go @@ -118,32 +118,23 @@ func (r *Reader) readFull(p []byte, allowEOF bool) (ok bool) { return true } -// Read satisfies the io.Reader interface. -func (r *Reader) Read(p []byte) (int, error) { - if r.err != nil { - return 0, r.err - } - for { - if r.i < r.j { - n := copy(p, r.decoded[r.i:r.j]) - r.i += n - return n, nil - } +func (r *Reader) fill() error { + for r.i >= r.j { if !r.readFull(r.buf[:4], true) { - return 0, r.err + return r.err } chunkType := r.buf[0] if !r.readHeader { if chunkType != chunkTypeStreamIdentifier { r.err = ErrCorrupt - return 0, r.err + return r.err } r.readHeader = true } chunkLen := int(r.buf[1]) | int(r.buf[2])<<8 | int(r.buf[3])<<16 if chunkLen > len(r.buf) { r.err = ErrUnsupported - return 0, r.err + return r.err } // The chunk types are specified at @@ -153,11 +144,11 @@ func (r *Reader) Read(p []byte) (int, error) { // Section 4.2. Compressed data (chunk type 0x00). if chunkLen < checksumSize { r.err = ErrCorrupt - return 0, r.err + return r.err } buf := r.buf[:chunkLen] if !r.readFull(buf, false) { - return 0, r.err + return r.err } checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24 buf = buf[checksumSize:] @@ -165,19 +156,19 @@ func (r *Reader) Read(p []byte) (int, error) { n, err := DecodedLen(buf) if err != nil { r.err = err - return 0, r.err + return r.err } if n > len(r.decoded) { r.err = ErrCorrupt - return 0, r.err + return r.err } if _, err := Decode(r.decoded, buf); err != nil { r.err = err - return 0, r.err + return r.err } if crc(r.decoded[:n]) != checksum { r.err = ErrCorrupt - return 0, r.err + return r.err } r.i, r.j = 0, n continue @@ -186,25 +177,25 @@ func (r *Reader) Read(p []byte) (int, error) { // Section 4.3. Uncompressed data (chunk type 0x01). if chunkLen < checksumSize { r.err = ErrCorrupt - return 0, r.err + return r.err } buf := r.buf[:checksumSize] if !r.readFull(buf, false) { - return 0, r.err + return r.err } checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24 // Read directly into r.decoded instead of via r.buf. n := chunkLen - checksumSize if n > len(r.decoded) { r.err = ErrCorrupt - return 0, r.err + return r.err } if !r.readFull(r.decoded[:n], false) { - return 0, r.err + return r.err } if crc(r.decoded[:n]) != checksum { r.err = ErrCorrupt - return 0, r.err + return r.err } r.i, r.j = 0, n continue @@ -213,15 +204,15 @@ func (r *Reader) Read(p []byte) (int, error) { // Section 4.1. Stream identifier (chunk type 0xff). if chunkLen != len(magicBody) { r.err = ErrCorrupt - return 0, r.err + return r.err } if !r.readFull(r.buf[:len(magicBody)], false) { - return 0, r.err + return r.err } for i := 0; i < len(magicBody); i++ { if r.buf[i] != magicBody[i] { r.err = ErrCorrupt - return 0, r.err + return r.err } } continue @@ -230,12 +221,44 @@ func (r *Reader) Read(p []byte) (int, error) { if chunkType <= 0x7f { // Section 4.5. Reserved unskippable chunks (chunk types 0x02-0x7f). r.err = ErrUnsupported - return 0, r.err + return r.err } // Section 4.4 Padding (chunk type 0xfe). // Section 4.6. Reserved skippable chunks (chunk types 0x80-0xfd). if !r.readFull(r.buf[:chunkLen], false) { - return 0, r.err + return r.err } } + + return nil +} + +// Read satisfies the io.Reader interface. +func (r *Reader) Read(p []byte) (int, error) { + if r.err != nil { + return 0, r.err + } + + if err := r.fill(); err != nil { + return 0, err + } + + n := copy(p, r.decoded[r.i:r.j]) + r.i += n + return n, nil +} + +// ReadByte satisfies the io.ByteReader interface. +func (r *Reader) ReadByte() (byte, error) { + if r.err != nil { + return 0, r.err + } + + if err := r.fill(); err != nil { + return 0, err + } + + c := r.decoded[r.i] + r.i++ + return c, nil } diff --git a/vendor/github.com/golang/snappy/encode_arm64.s b/vendor/github.com/golang/snappy/encode_arm64.s index bf83667d71..f8d54adfc5 100644 --- a/vendor/github.com/golang/snappy/encode_arm64.s +++ b/vendor/github.com/golang/snappy/encode_arm64.s @@ -382,7 +382,7 @@ inner0: // if load32(src, s) != load32(src, candidate) { continue } break MOVW 0(R7), R3 - MOVW (R6)(R15*1), R4 + MOVW (R6)(R15), R4 CMPW R4, R3 BNE inner0 @@ -672,7 +672,7 @@ inlineEmitCopyEnd: MOVHU R3, 0(R17)(R11<<1) // if uint32(x>>8) == load32(src, candidate) { continue } - MOVW (R6)(R15*1), R4 + MOVW (R6)(R15), R4 CMPW R4, R14 BEQ inner1 diff --git a/vendor/github.com/hashicorp/golang-lru/go.mod b/vendor/github.com/hashicorp/golang-lru/go.mod index 824cb97e83..8ad8826b36 100644 --- a/vendor/github.com/hashicorp/golang-lru/go.mod +++ b/vendor/github.com/hashicorp/golang-lru/go.mod @@ -1 +1,3 @@ module github.com/hashicorp/golang-lru + +go 1.12 diff --git a/vendor/github.com/hashicorp/golang-lru/lru.go b/vendor/github.com/hashicorp/golang-lru/lru.go index 1cbe04b7d0..4e5e9d8fd0 100644 --- a/vendor/github.com/hashicorp/golang-lru/lru.go +++ b/vendor/github.com/hashicorp/golang-lru/lru.go @@ -37,7 +37,7 @@ func (c *Cache) Purge() { c.lock.Unlock() } -// Add adds a value to the cache. Returns true if an eviction occurred. +// Add adds a value to the cache. Returns true if an eviction occurred. func (c *Cache) Add(key, value interface{}) (evicted bool) { c.lock.Lock() evicted = c.lru.Add(key, value) @@ -71,8 +71,8 @@ func (c *Cache) Peek(key interface{}) (value interface{}, ok bool) { return value, ok } -// ContainsOrAdd checks if a key is in the cache without updating the -// recent-ness or deleting it for being stale, and if not, adds the value. +// ContainsOrAdd checks if a key is in the cache without updating the +// recent-ness or deleting it for being stale, and if not, adds the value. // Returns whether found and whether an eviction occurred. func (c *Cache) ContainsOrAdd(key, value interface{}) (ok, evicted bool) { c.lock.Lock() @@ -85,18 +85,52 @@ func (c *Cache) ContainsOrAdd(key, value interface{}) (ok, evicted bool) { return false, evicted } +// PeekOrAdd checks if a key is in the cache without updating the +// recent-ness or deleting it for being stale, and if not, adds the value. +// Returns whether found and whether an eviction occurred. +func (c *Cache) PeekOrAdd(key, value interface{}) (previous interface{}, ok, evicted bool) { + c.lock.Lock() + defer c.lock.Unlock() + + previous, ok = c.lru.Peek(key) + if ok { + return previous, true, false + } + + evicted = c.lru.Add(key, value) + return nil, false, evicted +} + // Remove removes the provided key from the cache. -func (c *Cache) Remove(key interface{}) { +func (c *Cache) Remove(key interface{}) (present bool) { c.lock.Lock() - c.lru.Remove(key) + present = c.lru.Remove(key) c.lock.Unlock() + return +} + +// Resize changes the cache size. +func (c *Cache) Resize(size int) (evicted int) { + c.lock.Lock() + evicted = c.lru.Resize(size) + c.lock.Unlock() + return evicted } // RemoveOldest removes the oldest item from the cache. -func (c *Cache) RemoveOldest() { +func (c *Cache) RemoveOldest() (key interface{}, value interface{}, ok bool) { + c.lock.Lock() + key, value, ok = c.lru.RemoveOldest() + c.lock.Unlock() + return +} + +// GetOldest returns the oldest entry +func (c *Cache) GetOldest() (key interface{}, value interface{}, ok bool) { c.lock.Lock() - c.lru.RemoveOldest() + key, value, ok = c.lru.GetOldest() c.lock.Unlock() + return } // Keys returns a slice of the keys in the cache, from oldest to newest. diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go index 5673773b22..a86c8539e0 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru.go @@ -73,6 +73,9 @@ func (c *LRU) Add(key, value interface{}) (evicted bool) { func (c *LRU) Get(key interface{}) (value interface{}, ok bool) { if ent, ok := c.items[key]; ok { c.evictList.MoveToFront(ent) + if ent.Value.(*entry) == nil { + return nil, false + } return ent.Value.(*entry).value, true } return @@ -142,6 +145,19 @@ func (c *LRU) Len() int { return c.evictList.Len() } +// Resize changes the cache size. +func (c *LRU) Resize(size int) (evicted int) { + diff := c.Len() - size + if diff < 0 { + diff = 0 + } + for i := 0; i < diff; i++ { + c.removeOldest() + } + c.size = size + return diff +} + // removeOldest removes the oldest item from the cache. func (c *LRU) removeOldest() { ent := c.evictList.Back() diff --git a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go index 74c7077440..92d70934d6 100644 --- a/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go +++ b/vendor/github.com/hashicorp/golang-lru/simplelru/lru_interface.go @@ -10,7 +10,7 @@ type LRUCache interface { // updates the "recently used"-ness of the key. #value, isFound Get(key interface{}) (value interface{}, ok bool) - // Check if a key exsists in cache without updating the recent-ness. + // Checks if a key exists in cache without updating the recent-ness. Contains(key interface{}) (ok bool) // Returns key's value without updating the "recently used"-ness of the key. @@ -31,6 +31,9 @@ type LRUCache interface { // Returns the number of items in the cache. Len() int - // Clear all cache entries + // Clears all cache entries. Purge() + + // Resizes cache, returning number evicted + Resize(int) int } diff --git a/vendor/github.com/klauspost/compress/zstd/blockdec.go b/vendor/github.com/klauspost/compress/zstd/blockdec.go index e30af505ca..8a98c4562e 100644 --- a/vendor/github.com/klauspost/compress/zstd/blockdec.go +++ b/vendor/github.com/klauspost/compress/zstd/blockdec.go @@ -168,10 +168,10 @@ func (b *blockDec) reset(br byteBuffer, windowSize uint64) error { // Read block data. if cap(b.dataStorage) < cSize { - if b.lowMem { + if b.lowMem || cSize > maxCompressedBlockSize { b.dataStorage = make([]byte, 0, cSize) } else { - b.dataStorage = make([]byte, 0, maxBlockSize) + b.dataStorage = make([]byte, 0, maxCompressedBlockSize) } } if cap(b.dst) <= maxSize { diff --git a/vendor/github.com/klauspost/compress/zstd/decoder_options.go b/vendor/github.com/klauspost/compress/zstd/decoder_options.go index c0fd058c28..95cc9b8b81 100644 --- a/vendor/github.com/klauspost/compress/zstd/decoder_options.go +++ b/vendor/github.com/klauspost/compress/zstd/decoder_options.go @@ -17,14 +17,16 @@ type decoderOptions struct { lowMem bool concurrent int maxDecodedSize uint64 + maxWindowSize uint64 dicts []dict } func (o *decoderOptions) setDefault() { *o = decoderOptions{ // use less ram: true for now, but may change. - lowMem: true, - concurrent: runtime.GOMAXPROCS(0), + lowMem: true, + concurrent: runtime.GOMAXPROCS(0), + maxWindowSize: MaxWindowSize, } o.maxDecodedSize = 1 << 63 } @@ -52,7 +54,6 @@ func WithDecoderConcurrency(n int) DOption { // WithDecoderMaxMemory allows to set a maximum decoded size for in-memory // non-streaming operations or maximum window size for streaming operations. // This can be used to control memory usage of potentially hostile content. -// For streaming operations, the maximum window size is capped at 1<<30 bytes. // Maximum and default is 1 << 63 bytes. func WithDecoderMaxMemory(n uint64) DOption { return func(o *decoderOptions) error { @@ -81,3 +82,21 @@ func WithDecoderDicts(dicts ...[]byte) DOption { return nil } } + +// WithDecoderMaxWindow allows to set a maximum window size for decodes. +// This allows rejecting packets that will cause big memory usage. +// The Decoder will likely allocate more memory based on the WithDecoderLowmem setting. +// If WithDecoderMaxMemory is set to a lower value, that will be used. +// Default is 512MB, Maximum is ~3.75 TB as per zstandard spec. +func WithDecoderMaxWindow(size uint64) DOption { + return func(o *decoderOptions) error { + if size < MinWindowSize { + return errors.New("WithMaxWindowSize must be at least 1KB, 1024 bytes") + } + if size > (1<<41)+7*(1<<38) { + return errors.New("WithMaxWindowSize must be less than (1<<41) + 7*(1<<38) ~ 3.75TB") + } + o.maxWindowSize = size + return nil + } +} diff --git a/vendor/github.com/klauspost/compress/zstd/framedec.go b/vendor/github.com/klauspost/compress/zstd/framedec.go index e8cc9a2c22..989c79f8c3 100644 --- a/vendor/github.com/klauspost/compress/zstd/framedec.go +++ b/vendor/github.com/klauspost/compress/zstd/framedec.go @@ -22,10 +22,6 @@ type frameDec struct { WindowSize uint64 - // maxWindowSize is the maximum windows size to support. - // should never be bigger than max-int. - maxWindowSize uint64 - // In order queue of blocks being decoded. decoding chan *blockDec @@ -50,8 +46,11 @@ type frameDec struct { } const ( - // The minimum Window_Size is 1 KB. + // MinWindowSize is the minimum Window Size, which is 1 KB. MinWindowSize = 1 << 10 + + // MaxWindowSize is the maximum encoder window size + // and the default decoder maximum window size. MaxWindowSize = 1 << 29 ) @@ -61,12 +60,11 @@ var ( ) func newFrameDec(o decoderOptions) *frameDec { - d := frameDec{ - o: o, - maxWindowSize: MaxWindowSize, + if o.maxWindowSize > o.maxDecodedSize { + o.maxWindowSize = o.maxDecodedSize } - if d.maxWindowSize > o.maxDecodedSize { - d.maxWindowSize = o.maxDecodedSize + d := frameDec{ + o: o, } return &d } @@ -251,13 +249,17 @@ func (d *frameDec) reset(br byteBuffer) error { } } - if d.WindowSize > d.maxWindowSize { - printf("window size %d > max %d\n", d.WindowSize, d.maxWindowSize) + if d.WindowSize > uint64(d.o.maxWindowSize) { + if debugDecoder { + printf("window size %d > max %d\n", d.WindowSize, d.o.maxWindowSize) + } return ErrWindowSizeExceeded } // The minimum Window_Size is 1 KB. if d.WindowSize < MinWindowSize { - println("got window size: ", d.WindowSize) + if debugDecoder { + println("got window size: ", d.WindowSize) + } return ErrWindowSizeTooSmall } d.history.windowSize = int(d.WindowSize) @@ -352,8 +354,8 @@ func (d *frameDec) checkCRC() error { func (d *frameDec) initAsync() { if !d.o.lowMem && !d.SingleSegment { - // set max extra size history to 10MB. - d.history.maxSize = d.history.windowSize + maxBlockSize*5 + // set max extra size history to 2MB. + d.history.maxSize = d.history.windowSize + maxBlockSize } // re-alloc if more than one extra block size. if d.o.lowMem && cap(d.history.b) > d.history.maxSize+maxBlockSize { diff --git a/vendor/github.com/klauspost/cpuid/v2/.travis.yml b/vendor/github.com/klauspost/cpuid/v2/.travis.yml deleted file mode 100644 index aa9bad7e58..0000000000 --- a/vendor/github.com/klauspost/cpuid/v2/.travis.yml +++ /dev/null @@ -1,67 +0,0 @@ -language: go - -os: - - linux - - osx - - windows - -arch: - - amd64 - - arm64 - -go: - - 1.13.x - - 1.14.x - - 1.15.x - - 1.16.x - - master - -env: - - CGO_ENABLED=0 - -script: - - go vet ./... - - go test -test.v -test.run ^TestCPUID$ - - CGO_ENABLED=1 go test -race ./... - - go test -tags=nounsafe -test.v -test.run ^TestCPUID$ - - go test -tags=noasm ./... - - go run ./cmd/cpuid/main.go - - go run ./cmd/cpuid/main.go -json - -matrix: - allow_failures: - - go: 'master' - fast_finish: true - include: - - stage: other - go: 1.16.x - os: linux - arch: amd64 - script: - - diff <(gofmt -d .) <(printf "") - - diff <(gofmt -d ./private) <(printf "") - - curl -sfL https://git.io/goreleaser | VERSION=v0.157.0 sh -s -- check # check goreleaser config for deprecations - - curl -sL https://git.io/goreleaser | VERSION=v0.157.0 sh -s -- --snapshot --skip-publish --rm-dist - - go get github.com/klauspost/asmfmt&&go install github.com/klauspost/asmfmt/cmd/asmfmt - - diff <(asmfmt -d .) <(printf "") - - GOOS=linux GOARCH=386 go test . - - ./test-architectures.sh - - stage: other - go: 1.15.x - os: linux - arch: amd64 - script: - - ./test-architectures.sh - -deploy: - - provider: script - skip_cleanup: true - script: curl -sL https://git.io/goreleaser | VERSION=v0.157.0 bash || true - on: - tags: true - condition: ($TRAVIS_OS_NAME = linux) && ($TRAVIS_CPU_ARCH = amd64) - go: 1.16.x -branches: - only: - - master - - /^v\d+\.\d+(\.\d+)?(-\S*)?$/ diff --git a/vendor/github.com/klauspost/cpuid/v2/cpuid.go b/vendor/github.com/klauspost/cpuid/v2/cpuid.go index 43e9cc173f..b49537545f 100644 --- a/vendor/github.com/klauspost/cpuid/v2/cpuid.go +++ b/vendor/github.com/klauspost/cpuid/v2/cpuid.go @@ -96,7 +96,9 @@ const ( BMI2 // Bit Manipulation Instruction Set 2 CLDEMOTE // Cache Line Demote CLMUL // Carry-less Multiplication + CLZERO // CLZERO instruction supported CMOV // i686 CMOV + CPBOOST // Core Performance Boost CX16 // CMPXCHG16B Instruction ENQCMD // Enqueue Command ERMS // Enhanced REP MOVSB/STOSB @@ -106,6 +108,7 @@ const ( GFNI // Galois Field New Instructions HLE // Hardware Lock Elision HTT // Hyperthreading (enabled) + HWA // Hardware assert supported. Indicates support for MSRC001_10 HYPERVISOR // This bit has been reserved by Intel & AMD for use by hypervisors IBPB // Indirect Branch Restricted Speculation (IBRS) and Indirect Branch Predictor Barrier (IBPB) IBS // Instruction Based Sampling (AMD) @@ -117,18 +120,25 @@ const ( IBSOPSAM // Instruction Based Sampling Feature (AMD) IBSRDWROPCNT // Instruction Based Sampling Feature (AMD) IBSRIPINVALIDCHK // Instruction Based Sampling Feature (AMD) + INT_WBINVD // WBINVD/WBNOINVD are interruptible. + INVLPGB // NVLPGB and TLBSYNC instruction supported LZCNT // LZCNT instruction + MCAOVERFLOW // MCA overflow recovery support. + MCOMMIT // MCOMMIT instruction supported MMX // standard MMX MMXEXT // SSE integer functions or AMD MMX ext MOVDIR64B // Move 64 Bytes as Direct Store MOVDIRI // Move Doubleword as Direct Store MPX // Intel MPX (Memory Protection Extensions) + MSRIRC // Instruction Retired Counter MSR available NX // NX (No-Execute) bit POPCNT // POPCNT instruction + RDPRU // RDPRU instruction supported RDRAND // RDRAND instruction is available RDSEED // RDSEED instruction is available RDTSCP // RDTSCP Instruction RTM // Restricted Transactional Memory + RTM_ALWAYS_ABORT // Indicates that the loaded microcode is forcing RTM abort. SERIALIZE // Serialize Instruction Execution SGX // Software Guard Extensions SGXLC // Software Guard Extensions Launch Control @@ -141,6 +151,7 @@ const ( SSE4A // AMD Barcelona microarchitecture SSE4a instructions SSSE3 // Conroe SSSE3 functions STIBP // Single Thread Indirect Branch Predictors + SUCCOR // Software uncorrectable error containment and recovery capability. TBM // AMD Trailing Bit Manipulation TSXLDTRK // Intel TSX Suspend Load Address Tracking VAES // Vector AES @@ -194,7 +205,8 @@ type CPUInfo struct { Family int // CPU family number Model int // CPU model number CacheLine int // Cache line size in bytes. Will be 0 if undetectable. - Hz int64 // Clock speed, if known, 0 otherwise + Hz int64 // Clock speed, if known, 0 otherwise. Will attempt to contain base clock speed. + BoostFreq int64 // Max clock speed, if known, 0 otherwise Cache struct { L1I int // L1 Instruction Cache (per core or shared). Will be -1 if undetected L1D int // L1 Data Cache (per core or shared). Will be -1 if undetected @@ -363,25 +375,43 @@ func (c CPUInfo) LogicalCPU() int { return int(ebx >> 24) } -// hertz tries to compute the clock speed of the CPU. If leaf 15 is +// frequencies tries to compute the clock speed of the CPU. If leaf 15 is // supported, use it, otherwise parse the brand string. Yes, really. -func hertz(model string) int64 { +func (c *CPUInfo) frequencies() { + c.Hz, c.BoostFreq = 0, 0 mfi := maxFunctionID() if mfi >= 0x15 { eax, ebx, ecx, _ := cpuid(0x15) if eax != 0 && ebx != 0 && ecx != 0 { - return int64((int64(ecx) * int64(ebx)) / int64(eax)) + c.Hz = (int64(ecx) * int64(ebx)) / int64(eax) + fmt.Println("frequencies(): ", ecx, ebx, eax, "->", c.Hz) } } + if mfi >= 0x16 { + a, b, _, _ := cpuid(0x16) + // Base... + if a&0xffff > 0 { + c.Hz = int64(a&0xffff) * 1_000_000 + } + // Boost... + if b&0xffff > 0 { + c.BoostFreq = int64(b&0xffff) * 1_000_000 + } + } + if c.Hz > 0 { + return + } + // computeHz determines the official rated speed of a CPU from its brand // string. This insanity is *actually the official documented way to do // this according to Intel*, prior to leaf 0x15 existing. The official // documentation only shows this working for exactly `x.xx` or `xxxx` // cases, e.g., `2.50GHz` or `1300MHz`; this parser will accept other // sizes. + model := c.BrandName hz := strings.LastIndex(model, "Hz") if hz < 3 { - return 0 + return } var multiplier int64 switch model[hz-1] { @@ -393,7 +423,7 @@ func hertz(model string) int64 { multiplier = 1000 * 1000 * 1000 * 1000 } if multiplier == 0 { - return 0 + return } freq := int64(0) divisor := int64(0) @@ -405,21 +435,22 @@ func hertz(model string) int64 { decimalShift *= 10 } else if model[i] == '.' { if divisor != 0 { - return 0 + return } divisor = decimalShift } else { - return 0 + return } } // we didn't find a space if i < 0 { - return 0 + return } if divisor != 0 { - return (freq * multiplier) / divisor + c.Hz = (freq * multiplier) / divisor + return } - return freq * multiplier + c.Hz = freq * multiplier } // VM Will return true if the cpu id indicates we are in @@ -911,6 +942,7 @@ func support() flagSet { fs.setIf(ecx&(1<<29) != 0, ENQCMD) fs.setIf(ecx&(1<<30) != 0, SGXLC) // CPUID.(EAX=7, ECX=0).EDX + fs.setIf(edx&(1<<11) != 0, RTM_ALWAYS_ABORT) fs.setIf(edx&(1<<14) != 0, SERIALIZE) fs.setIf(edx&(1<<16) != 0, TSXLDTRK) fs.setIf(edx&(1<<26) != 0, IBPB) @@ -980,9 +1012,23 @@ func support() flagSet { } } + if maxExtendedFunction() >= 0x80000007 { + _, b, _, d := cpuid(0x80000007) + fs.setIf((b&(1<<0)) != 0, MCAOVERFLOW) + fs.setIf((b&(1<<1)) != 0, SUCCOR) + fs.setIf((b&(1<<2)) != 0, HWA) + fs.setIf((d&(1<<9)) != 0, CPBOOST) + } + if maxExtendedFunction() >= 0x80000008 { _, b, _, _ := cpuid(0x80000008) fs.setIf((b&(1<<9)) != 0, WBNOINVD) + fs.setIf((b&(1<<8)) != 0, MCOMMIT) + fs.setIf((b&(1<<13)) != 0, INT_WBINVD) + fs.setIf((b&(1<<4)) != 0, RDPRU) + fs.setIf((b&(1<<3)) != 0, INVLPGB) + fs.setIf((b&(1<<1)) != 0, MSRIRC) + fs.setIf((b&(1<<0)) != 0, CLZERO) } if maxExtendedFunction() >= 0x8000001b && fs.inSet(IBS) { diff --git a/vendor/github.com/klauspost/cpuid/v2/detect_x86.go b/vendor/github.com/klauspost/cpuid/v2/detect_x86.go index 93bc20f4fe..367c35c88c 100644 --- a/vendor/github.com/klauspost/cpuid/v2/detect_x86.go +++ b/vendor/github.com/klauspost/cpuid/v2/detect_x86.go @@ -30,6 +30,6 @@ func addInfo(c *CPUInfo, safe bool) { c.LogicalCores = logicalCores() c.PhysicalCores = physicalCores() c.VendorID, c.VendorString = vendorID() - c.Hz = hertz(c.BrandName) c.cacheSize() + c.frequencies() } diff --git a/vendor/github.com/klauspost/cpuid/v2/featureid_string.go b/vendor/github.com/klauspost/cpuid/v2/featureid_string.go index 0e764f9027..f56af03b9e 100644 --- a/vendor/github.com/klauspost/cpuid/v2/featureid_string.go +++ b/vendor/github.com/klauspost/cpuid/v2/featureid_string.go @@ -37,90 +37,101 @@ func _() { _ = x[BMI2-27] _ = x[CLDEMOTE-28] _ = x[CLMUL-29] - _ = x[CMOV-30] - _ = x[CX16-31] - _ = x[ENQCMD-32] - _ = x[ERMS-33] - _ = x[F16C-34] - _ = x[FMA3-35] - _ = x[FMA4-36] - _ = x[GFNI-37] - _ = x[HLE-38] - _ = x[HTT-39] - _ = x[HYPERVISOR-40] - _ = x[IBPB-41] - _ = x[IBS-42] - _ = x[IBSBRNTRGT-43] - _ = x[IBSFETCHSAM-44] - _ = x[IBSFFV-45] - _ = x[IBSOPCNT-46] - _ = x[IBSOPCNTEXT-47] - _ = x[IBSOPSAM-48] - _ = x[IBSRDWROPCNT-49] - _ = x[IBSRIPINVALIDCHK-50] - _ = x[LZCNT-51] - _ = x[MMX-52] - _ = x[MMXEXT-53] - _ = x[MOVDIR64B-54] - _ = x[MOVDIRI-55] - _ = x[MPX-56] - _ = x[NX-57] - _ = x[POPCNT-58] - _ = x[RDRAND-59] - _ = x[RDSEED-60] - _ = x[RDTSCP-61] - _ = x[RTM-62] - _ = x[SERIALIZE-63] - _ = x[SGX-64] - _ = x[SGXLC-65] - _ = x[SHA-66] - _ = x[SSE-67] - _ = x[SSE2-68] - _ = x[SSE3-69] - _ = x[SSE4-70] - _ = x[SSE42-71] - _ = x[SSE4A-72] - _ = x[SSSE3-73] - _ = x[STIBP-74] - _ = x[TBM-75] - _ = x[TSXLDTRK-76] - _ = x[VAES-77] - _ = x[VMX-78] - _ = x[VPCLMULQDQ-79] - _ = x[WAITPKG-80] - _ = x[WBNOINVD-81] - _ = x[XOP-82] - _ = x[AESARM-83] - _ = x[ARMCPUID-84] - _ = x[ASIMD-85] - _ = x[ASIMDDP-86] - _ = x[ASIMDHP-87] - _ = x[ASIMDRDM-88] - _ = x[ATOMICS-89] - _ = x[CRC32-90] - _ = x[DCPOP-91] - _ = x[EVTSTRM-92] - _ = x[FCMA-93] - _ = x[FP-94] - _ = x[FPHP-95] - _ = x[GPA-96] - _ = x[JSCVT-97] - _ = x[LRCPC-98] - _ = x[PMULL-99] - _ = x[SHA1-100] - _ = x[SHA2-101] - _ = x[SHA3-102] - _ = x[SHA512-103] - _ = x[SM3-104] - _ = x[SM4-105] - _ = x[SVE-106] - _ = x[lastID-107] + _ = x[CLZERO-30] + _ = x[CMOV-31] + _ = x[CPBOOST-32] + _ = x[CX16-33] + _ = x[ENQCMD-34] + _ = x[ERMS-35] + _ = x[F16C-36] + _ = x[FMA3-37] + _ = x[FMA4-38] + _ = x[GFNI-39] + _ = x[HLE-40] + _ = x[HTT-41] + _ = x[HWA-42] + _ = x[HYPERVISOR-43] + _ = x[IBPB-44] + _ = x[IBS-45] + _ = x[IBSBRNTRGT-46] + _ = x[IBSFETCHSAM-47] + _ = x[IBSFFV-48] + _ = x[IBSOPCNT-49] + _ = x[IBSOPCNTEXT-50] + _ = x[IBSOPSAM-51] + _ = x[IBSRDWROPCNT-52] + _ = x[IBSRIPINVALIDCHK-53] + _ = x[INT_WBINVD-54] + _ = x[INVLPGB-55] + _ = x[LZCNT-56] + _ = x[MCAOVERFLOW-57] + _ = x[MCOMMIT-58] + _ = x[MMX-59] + _ = x[MMXEXT-60] + _ = x[MOVDIR64B-61] + _ = x[MOVDIRI-62] + _ = x[MPX-63] + _ = x[MSRIRC-64] + _ = x[NX-65] + _ = x[POPCNT-66] + _ = x[RDPRU-67] + _ = x[RDRAND-68] + _ = x[RDSEED-69] + _ = x[RDTSCP-70] + _ = x[RTM-71] + _ = x[RTM_ALWAYS_ABORT-72] + _ = x[SERIALIZE-73] + _ = x[SGX-74] + _ = x[SGXLC-75] + _ = x[SHA-76] + _ = x[SSE-77] + _ = x[SSE2-78] + _ = x[SSE3-79] + _ = x[SSE4-80] + _ = x[SSE42-81] + _ = x[SSE4A-82] + _ = x[SSSE3-83] + _ = x[STIBP-84] + _ = x[SUCCOR-85] + _ = x[TBM-86] + _ = x[TSXLDTRK-87] + _ = x[VAES-88] + _ = x[VMX-89] + _ = x[VPCLMULQDQ-90] + _ = x[WAITPKG-91] + _ = x[WBNOINVD-92] + _ = x[XOP-93] + _ = x[AESARM-94] + _ = x[ARMCPUID-95] + _ = x[ASIMD-96] + _ = x[ASIMDDP-97] + _ = x[ASIMDHP-98] + _ = x[ASIMDRDM-99] + _ = x[ATOMICS-100] + _ = x[CRC32-101] + _ = x[DCPOP-102] + _ = x[EVTSTRM-103] + _ = x[FCMA-104] + _ = x[FP-105] + _ = x[FPHP-106] + _ = x[GPA-107] + _ = x[JSCVT-108] + _ = x[LRCPC-109] + _ = x[PMULL-110] + _ = x[SHA1-111] + _ = x[SHA2-112] + _ = x[SHA3-113] + _ = x[SHA512-114] + _ = x[SM3-115] + _ = x[SM4-116] + _ = x[SVE-117] + _ = x[lastID-118] _ = x[firstID-0] } -const _FeatureID_name = "firstIDADXAESNIAMD3DNOWAMD3DNOWEXTAMXBF16AMXINT8AMXTILEAVXAVX2AVX512BF16AVX512BITALGAVX512BWAVX512CDAVX512DQAVX512ERAVX512FAVX512IFMAAVX512PFAVX512VBMIAVX512VBMI2AVX512VLAVX512VNNIAVX512VP2INTERSECTAVX512VPOPCNTDQAVXSLOWBMI1BMI2CLDEMOTECLMULCMOVCX16ENQCMDERMSF16CFMA3FMA4GFNIHLEHTTHYPERVISORIBPBIBSIBSBRNTRGTIBSFETCHSAMIBSFFVIBSOPCNTIBSOPCNTEXTIBSOPSAMIBSRDWROPCNTIBSRIPINVALIDCHKLZCNTMMXMMXEXTMOVDIR64BMOVDIRIMPXNXPOPCNTRDRANDRDSEEDRDTSCPRTMSERIALIZESGXSGXLCSHASSESSE2SSE3SSE4SSE42SSE4ASSSE3STIBPTBMTSXLDTRKVAESVMXVPCLMULQDQWAITPKGWBNOINVDXOPAESARMARMCPUIDASIMDASIMDDPASIMDHPASIMDRDMATOMICSCRC32DCPOPEVTSTRMFCMAFPFPHPGPAJSCVTLRCPCPMULLSHA1SHA2SHA3SHA512SM3SM4SVElastID" +const _FeatureID_name = "firstIDADXAESNIAMD3DNOWAMD3DNOWEXTAMXBF16AMXINT8AMXTILEAVXAVX2AVX512BF16AVX512BITALGAVX512BWAVX512CDAVX512DQAVX512ERAVX512FAVX512IFMAAVX512PFAVX512VBMIAVX512VBMI2AVX512VLAVX512VNNIAVX512VP2INTERSECTAVX512VPOPCNTDQAVXSLOWBMI1BMI2CLDEMOTECLMULCLZEROCMOVCPBOOSTCX16ENQCMDERMSF16CFMA3FMA4GFNIHLEHTTHWAHYPERVISORIBPBIBSIBSBRNTRGTIBSFETCHSAMIBSFFVIBSOPCNTIBSOPCNTEXTIBSOPSAMIBSRDWROPCNTIBSRIPINVALIDCHKINT_WBINVDINVLPGBLZCNTMCAOVERFLOWMCOMMITMMXMMXEXTMOVDIR64BMOVDIRIMPXMSRIRCNXPOPCNTRDPRURDRANDRDSEEDRDTSCPRTMRTM_ALWAYS_ABORTSERIALIZESGXSGXLCSHASSESSE2SSE3SSE4SSE42SSE4ASSSE3STIBPSUCCORTBMTSXLDTRKVAESVMXVPCLMULQDQWAITPKGWBNOINVDXOPAESARMARMCPUIDASIMDASIMDDPASIMDHPASIMDRDMATOMICSCRC32DCPOPEVTSTRMFCMAFPFPHPGPAJSCVTLRCPCPMULLSHA1SHA2SHA3SHA512SM3SM4SVElastID" -var _FeatureID_index = [...]uint16{0, 7, 10, 15, 23, 34, 41, 48, 55, 58, 62, 72, 84, 92, 100, 108, 116, 123, 133, 141, 151, 162, 170, 180, 198, 213, 220, 224, 228, 236, 241, 245, 249, 255, 259, 263, 267, 271, 275, 278, 281, 291, 295, 298, 308, 319, 325, 333, 344, 352, 364, 380, 385, 388, 394, 403, 410, 413, 415, 421, 427, 433, 439, 442, 451, 454, 459, 462, 465, 469, 473, 477, 482, 487, 492, 497, 500, 508, 512, 515, 525, 532, 540, 543, 549, 557, 562, 569, 576, 584, 591, 596, 601, 608, 612, 614, 618, 621, 626, 631, 636, 640, 644, 648, 654, 657, 660, 663, 669} +var _FeatureID_index = [...]uint16{0, 7, 10, 15, 23, 34, 41, 48, 55, 58, 62, 72, 84, 92, 100, 108, 116, 123, 133, 141, 151, 162, 170, 180, 198, 213, 220, 224, 228, 236, 241, 247, 251, 258, 262, 268, 272, 276, 280, 284, 288, 291, 294, 297, 307, 311, 314, 324, 335, 341, 349, 360, 368, 380, 396, 406, 413, 418, 429, 436, 439, 445, 454, 461, 464, 470, 472, 478, 483, 489, 495, 501, 504, 520, 529, 532, 537, 540, 543, 547, 551, 555, 560, 565, 570, 575, 581, 584, 592, 596, 599, 609, 616, 624, 627, 633, 641, 646, 653, 660, 668, 675, 680, 685, 692, 696, 698, 702, 705, 710, 715, 720, 724, 728, 732, 738, 741, 744, 747, 753} func (i FeatureID) String() string { if i < 0 || i >= FeatureID(len(_FeatureID_index)-1) { diff --git a/vendor/github.com/microcosm-cc/bluemonday/Makefile b/vendor/github.com/microcosm-cc/bluemonday/Makefile index b15dc74f37..b5903a2e86 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/Makefile +++ b/vendor/github.com/microcosm-cc/bluemonday/Makefile @@ -25,7 +25,7 @@ build: @go build vet: - @go vet *.go + @go vet lint: @golint *.go diff --git a/vendor/github.com/microcosm-cc/bluemonday/README.md b/vendor/github.com/microcosm-cc/bluemonday/README.md index cd2766f6b2..6a34473efa 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/README.md +++ b/vendor/github.com/microcosm-cc/bluemonday/README.md @@ -2,7 +2,7 @@ bluemonday is a HTML sanitizer implemented in Go. It is fast and highly configurable. -bluemonday takes untrusted user generated content as an input, and will return HTML that has been sanitised against a whitelist of approved HTML elements and attributes so that you can safely include the content in your web page. +bluemonday takes untrusted user generated content as an input, and will return HTML that has been sanitised against an allowlist of approved HTML elements and attributes so that you can safely include the content in your web page. If you accept user generated content, and your server uses Go, you **need** bluemonday. @@ -50,15 +50,15 @@ bluemonday is heavily inspired by both the [OWASP Java HTML Sanitizer](https://c ## Technical Summary -Whitelist based, you need to either build a policy describing the HTML elements and attributes to permit (and the `regexp` patterns of attributes), or use one of the supplied policies representing good defaults. +Allowlist based, you need to either build a policy describing the HTML elements and attributes to permit (and the `regexp` patterns of attributes), or use one of the supplied policies representing good defaults. -The policy containing the whitelist is applied using a fast non-validating, forward only, token-based parser implemented in the [Go net/html library](https://godoc.org/golang.org/x/net/html) by the core Go team. +The policy containing the allowlist is applied using a fast non-validating, forward only, token-based parser implemented in the [Go net/html library](https://godoc.org/golang.org/x/net/html) by the core Go team. -We expect to be supplied with well-formatted HTML (closing elements for every applicable open element, nested correctly) and so we do not focus on repairing badly nested or incomplete HTML. We focus on simply ensuring that whatever elements do exist are described in the policy whitelist and that attributes and links are safe for use on your web page. [GIGO](http://en.wikipedia.org/wiki/Garbage_in,_garbage_out) does apply and if you feed it bad HTML bluemonday is not tasked with figuring out how to make it good again. +We expect to be supplied with well-formatted HTML (closing elements for every applicable open element, nested correctly) and so we do not focus on repairing badly nested or incomplete HTML. We focus on simply ensuring that whatever elements do exist are described in the policy allowlist and that attributes and links are safe for use on your web page. [GIGO](http://en.wikipedia.org/wiki/Garbage_in,_garbage_out) does apply and if you feed it bad HTML bluemonday is not tasked with figuring out how to make it good again. ### Supported Go Versions -bluemonday is tested against Go 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.11, 1.12, and tip. +bluemonday is tested on all versions since Go 1.2 including tip. We do not support Go 1.0 as we depend on `golang.org/x/net/html` which includes a reference to `io.ErrNoProgress` which did not exist in Go 1.0. @@ -146,8 +146,8 @@ func main() { We ship two default policies: -1. `bluemonday.StrictPolicy()` which can be thought of as equivalent to stripping all HTML elements and their attributes as it has nothing on its whitelist. An example usage scenario would be blog post titles where HTML tags are not expected at all and if they are then the elements *and* the content of the elements should be stripped. This is a *very* strict policy. -2. `bluemonday.UGCPolicy()` which allows a broad selection of HTML elements and attributes that are safe for user generated content. Note that this policy does *not* whitelist iframes, object, embed, styles, script, etc. An example usage scenario would be blog post bodies where a variety of formatting is expected along with the potential for TABLEs and IMGs. +1. `bluemonday.StrictPolicy()` which can be thought of as equivalent to stripping all HTML elements and their attributes as it has nothing on its allowlist. An example usage scenario would be blog post titles where HTML tags are not expected at all and if they are then the elements *and* the content of the elements should be stripped. This is a *very* strict policy. +2. `bluemonday.UGCPolicy()` which allows a broad selection of HTML elements and attributes that are safe for user generated content. Note that this policy does *not* allow iframes, object, embed, styles, script, etc. An example usage scenario would be blog post bodies where a variety of formatting is expected along with the potential for TABLEs and IMGs. ## Policy Building @@ -220,7 +220,7 @@ p.AllowElements("fieldset", "select", "option") ### Inline CSS -Although it's possible to handle inline CSS using `AllowAttrs` with a `Matching` rule, writing a single monolithic regular expression to safely process all inline CSS which you wish to allow is not a trivial task. Instead of attempting to do so, you can whitelist the `style` attribute on whichever element(s) you desire and use style policies to control and sanitize inline styles. +Although it's possible to handle inline CSS using `AllowAttrs` with a `Matching` rule, writing a single monolithic regular expression to safely process all inline CSS which you wish to allow is not a trivial task. Instead of attempting to do so, you can allow the `style` attribute on whichever element(s) you desire and use style policies to control and sanitize inline styles. It is suggested that you use `Matching` (with a suitable regular expression) `MatchingEnum`, or `MatchingHandler` to ensure each style matches your needs, @@ -241,7 +241,7 @@ p.AllowAttrs("style").OnElements("span", "p") p.AllowStyles("text-decoration").MatchingEnum("underline", "line-through", "none").OnElements("span") ``` -Or you can specify elements based on a regex patterm match: +Or you can specify elements based on a regex pattern match: ```go p.AllowAttrs("style").OnElementsMatching(regex.MustCompile(`^my-element-`)) // Allow the 'text-decoration' property to be set to 'underline', 'line-through' or 'none' @@ -254,6 +254,7 @@ validate the values for a given property. The string parameter has been converted to lowercase and unicode code points have been converted. ```go myHandler := func(value string) bool{ + // Validate your input here return true } p.AllowAttrs("style").OnElements("span", "p") @@ -279,12 +280,12 @@ We provide some additional global options for safely working with links. p.RequireParseableURLs(true) ``` -If you have enabled parseable URLs then the following option will `AllowRelativeURLs`. By default this is disabled (bluemonday is a whitelist tool... you need to explicitly tell us to permit things) and when disabled it will prevent all local and scheme relative URLs (i.e. `href="localpage.html"`, `href="../home.html"` and even `href="//www.google.com"` are relative): +If you have enabled parseable URLs then the following option will `AllowRelativeURLs`. By default this is disabled (bluemonday is an allowlist tool... you need to explicitly tell us to permit things) and when disabled it will prevent all local and scheme relative URLs (i.e. `href="localpage.html"`, `href="../home.html"` and even `href="//www.google.com"` are relative): ```go p.AllowRelativeURLs(true) ``` -If you have enabled parseable URLs then you can whitelist the schemes (commonly called protocol when thinking of `http` and `https`) that are permitted. Bear in mind that allowing relative URLs in the above option will allow for a blank scheme: +If you have enabled parseable URLs then you can allow the schemes (commonly called protocol when thinking of `http` and `https`) that are permitted. Bear in mind that allowing relative URLs in the above option will allow for a blank scheme: ```go p.AllowURLSchemes("mailto", "http", "https") ``` @@ -302,7 +303,7 @@ p.RequireNoReferrerOnLinks(true) ``` -We provide a convenience method that applies all of the above, but you will still need to whitelist the linkable elements for the URL rules to be applied to: +We provide a convenience method that applies all of the above, but you will still need to allow the linkable elements for the URL rules to be applied to: ```go p.AllowStandardURLs() p.AllowAttrs("cite").OnElements("blockquote", "q") @@ -372,11 +373,11 @@ p.AllowAttrs( ) ``` -Both examples exhibit the same issue, they declare attributes but do not then specify whether they are whitelisted globally or only on specific elements (and which elements). Attributes belong to one or more elements, and the policy needs to declare this. +Both examples exhibit the same issue, they declare attributes but do not then specify whether they are allowed globally or only on specific elements (and which elements). Attributes belong to one or more elements, and the policy needs to declare this. ## Limitations -We are not yet including any tools to help whitelist and sanitize CSS. Which means that unless you wish to do the heavy lifting in a single regular expression (inadvisable), **you should not allow the "style" attribute anywhere**. +We are not yet including any tools to help allow and sanitize CSS. Which means that unless you wish to do the heavy lifting in a single regular expression (inadvisable), **you should not allow the "style" attribute anywhere**. It is not the job of bluemonday to fix your bad HTML, it is merely the job of bluemonday to prevent malicious HTML getting through. If you have mismatched HTML elements, or non-conforming nesting of elements, those will remain. But if you have well-structured HTML bluemonday will not break it. diff --git a/vendor/github.com/microcosm-cc/bluemonday/handlers.go b/vendor/github.com/microcosm-cc/bluemonday/css/handlers.go index 9753d6e952..200a6729a2 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/handlers.go +++ b/vendor/github.com/microcosm-cc/bluemonday/css/handlers.go @@ -27,7 +27,7 @@ // 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 bluemonday +package css import ( "regexp" @@ -329,7 +329,7 @@ func splitValues(value string) []string { return values } -func getDefaultHandler(attr string) func(string) bool { +func GetDefaultHandler(attr string) func(string) bool { if defaultStyleHandlers[attr] != nil { return defaultStyleHandlers[attr] diff --git a/vendor/github.com/microcosm-cc/bluemonday/doc.go b/vendor/github.com/microcosm-cc/bluemonday/doc.go index 71dab60898..ba2d775ac9 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/doc.go +++ b/vendor/github.com/microcosm-cc/bluemonday/doc.go @@ -28,10 +28,10 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* -Package bluemonday provides a way of describing a whitelist of HTML elements +Package bluemonday provides a way of describing an allowlist of HTML elements and attributes as a policy, and for that policy to be applied to untrusted strings from users that may contain markup. All elements and attributes not on -the whitelist will be stripped. +the allowlist will be stripped. The default bluemonday.UGCPolicy().Sanitize() turns this: @@ -84,21 +84,21 @@ bluemonday is heavily inspired by both the OWASP Java HTML Sanitizer We ship two default policies, one is bluemonday.StrictPolicy() and can be thought of as equivalent to stripping all HTML elements and their attributes as -it has nothing on its whitelist. +it has nothing on its allowlist. The other is bluemonday.UGCPolicy() and allows a broad selection of HTML elements and attributes that are safe for user generated content. Note that -this policy does not whitelist iframes, object, embed, styles, script, etc. +this policy does not allow iframes, object, embed, styles, script, etc. The essence of building a policy is to determine which HTML elements and attributes are considered safe for your scenario. OWASP provide an XSS prevention cheat sheet ( https://www.google.com/search?q=xss+prevention+cheat+sheet ) to help explain the risks, but essentially: - 1. Avoid whitelisting anything other than plain HTML elements - 2. Avoid whitelisting `script`, `style`, `iframe`, `object`, `embed`, `base` + 1. Avoid allowing anything other than plain HTML elements + 2. Avoid allowing `script`, `style`, `iframe`, `object`, `embed`, `base` elements - 3. Avoid whitelisting anything other than plain HTML elements with simple + 3. Avoid allowing anything other than plain HTML elements with simple values that you can match to a regexp */ package bluemonday diff --git a/vendor/github.com/microcosm-cc/bluemonday/go.mod b/vendor/github.com/microcosm-cc/bluemonday/go.mod index edbd585f26..02cf2eac30 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/go.mod +++ b/vendor/github.com/microcosm-cc/bluemonday/go.mod @@ -5,5 +5,5 @@ go 1.16 require ( github.com/aymerick/douceur v0.2.0 github.com/gorilla/css v1.0.0 // indirect - golang.org/x/net v0.0.0-20210421230115-4e50805a0758 + golang.org/x/net v0.0.0-20210610132358-84b48f89b13b ) diff --git a/vendor/github.com/microcosm-cc/bluemonday/go.sum b/vendor/github.com/microcosm-cc/bluemonday/go.sum index e195d4eafd..930d271e36 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/go.sum +++ b/vendor/github.com/microcosm-cc/bluemonday/go.sum @@ -4,8 +4,11 @@ github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= golang.org/x/net v0.0.0-20210421230115-4e50805a0758 h1:aEpZnXcAmXkd6AvLb2OPt+EN1Zu/8Ne3pCqPjja5PXY= golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b h1:k+E048sYJHyVnsr1GDrRZWQ32D2C7lWs9JRc0bel53A= +golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/vendor/github.com/microcosm-cc/bluemonday/helpers.go b/vendor/github.com/microcosm-cc/bluemonday/helpers.go index 089fe9db90..776a4a6cd4 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/helpers.go +++ b/vendor/github.com/microcosm-cc/bluemonday/helpers.go @@ -141,7 +141,7 @@ func (p *Policy) AllowStandardURLs() { } // AllowStandardAttributes will enable "id", "title" and the language specific -// attributes "dir" and "lang" on all elements that are whitelisted +// attributes "dir" and "lang" on all elements that are allowed func (p *Policy) AllowStandardAttributes() { // "dir" "lang" are permitted as both language attributes affect charsets // and direction of text. diff --git a/vendor/github.com/microcosm-cc/bluemonday/policy.go b/vendor/github.com/microcosm-cc/bluemonday/policy.go index 9c7e662fc2..602a203798 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/policy.go +++ b/vendor/github.com/microcosm-cc/bluemonday/policy.go @@ -35,9 +35,11 @@ import ( "net/url" "regexp" "strings" + + "github.com/microcosm-cc/bluemonday/css" ) -// Policy encapsulates the whitelist of HTML elements and attributes that will +// Policy encapsulates the allowlist of HTML elements and attributes that will // be applied to the sanitised HTML. // // You should use bluemonday.NewPolicy() to create a blank policy as the @@ -86,28 +88,31 @@ type Policy struct { // When true, allow data attributes. allowDataAttributes bool - // map[htmlElementName]map[htmlAttributeName]attrPolicy - elsAndAttrs map[string]map[string]attrPolicy + // When true, allow comments. + allowComments bool + + // map[htmlElementName]map[htmlAttributeName][]attrPolicy + elsAndAttrs map[string]map[string][]attrPolicy // elsMatchingAndAttrs stores regex based element matches along with attributes - elsMatchingAndAttrs map[*regexp.Regexp]map[string]attrPolicy + elsMatchingAndAttrs map[*regexp.Regexp]map[string][]attrPolicy - // map[htmlAttributeName]attrPolicy - globalAttrs map[string]attrPolicy + // map[htmlAttributeName][]attrPolicy + globalAttrs map[string][]attrPolicy - // map[htmlElementName]map[cssPropertyName]stylePolicy - elsAndStyles map[string]map[string]stylePolicy + // map[htmlElementName]map[cssPropertyName][]stylePolicy + elsAndStyles map[string]map[string][]stylePolicy - // map[regex]map[cssPropertyName]stylePolicy - elsMatchingAndStyles map[*regexp.Regexp]map[string]stylePolicy + // map[regex]map[cssPropertyName][]stylePolicy + elsMatchingAndStyles map[*regexp.Regexp]map[string][]stylePolicy - // map[cssPropertyName]stylePolicy - globalStyles map[string]stylePolicy + // map[cssPropertyName][]stylePolicy + globalStyles map[string][]stylePolicy // If urlPolicy is nil, all URLs with matching schema are allowed. // Otherwise, only the URLs with matching schema and urlPolicy(url) // returning true are allowed. - allowURLSchemes map[string]urlPolicy + allowURLSchemes map[string][]urlPolicy // If an element has had all attributes removed as a result of a policy // being applied, then the element would be removed from the output. @@ -174,22 +179,22 @@ type urlPolicy func(url *url.URL) (allowUrl bool) // init initializes the maps if this has not been done already func (p *Policy) init() { if !p.initialized { - p.elsAndAttrs = make(map[string]map[string]attrPolicy) - p.elsMatchingAndAttrs = make(map[*regexp.Regexp]map[string]attrPolicy) - p.globalAttrs = make(map[string]attrPolicy) - p.elsAndStyles = make(map[string]map[string]stylePolicy) - p.elsMatchingAndStyles = make(map[*regexp.Regexp]map[string]stylePolicy) - p.globalStyles = make(map[string]stylePolicy) - p.allowURLSchemes = make(map[string]urlPolicy) + p.elsAndAttrs = make(map[string]map[string][]attrPolicy) + p.elsMatchingAndAttrs = make(map[*regexp.Regexp]map[string][]attrPolicy) + p.globalAttrs = make(map[string][]attrPolicy) + p.elsAndStyles = make(map[string]map[string][]stylePolicy) + p.elsMatchingAndStyles = make(map[*regexp.Regexp]map[string][]stylePolicy) + p.globalStyles = make(map[string][]stylePolicy) + p.allowURLSchemes = make(map[string][]urlPolicy) p.setOfElementsAllowedWithoutAttrs = make(map[string]struct{}) p.setOfElementsToSkipContent = make(map[string]struct{}) p.initialized = true } } -// NewPolicy returns a blank policy with nothing whitelisted or permitted. This +// NewPolicy returns a blank policy with nothing allowed or permitted. This // is the recommended way to start building a policy and you should now use -// AllowAttrs() and/or AllowElements() to construct the whitelist of HTML +// AllowAttrs() and/or AllowElements() to construct the allowlist of HTML // elements and attributes. func NewPolicy() *Policy { @@ -203,7 +208,7 @@ func NewPolicy() *Policy { // AllowAttrs takes a range of HTML attribute names and returns an // attribute policy builder that allows you to specify the pattern and scope of -// the whitelisted attribute. +// the allowed attribute. // // The attribute policy is only added to the core policy when either Globally() // or OnElements(...) are called. @@ -223,7 +228,7 @@ func (p *Policy) AllowAttrs(attrNames ...string) *attrPolicyBuilder { return &abp } -// AllowDataAttributes whitelists all data attributes. We can't specify the name +// AllowDataAttributes permits all data attributes. We can't specify the name // of each attribute exactly as they are customized. // // NOTE: These values are not sanitized and applications that evaluate or process @@ -238,6 +243,22 @@ func (p *Policy) AllowDataAttributes() { p.allowDataAttributes = true } +// AllowComments allows comments. +// +// Please note that only one type of comment will be allowed by this, this is the +// the standard HTML comment <!-- --> which includes the use of that to permit +// conditionals as per https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/compatibility/ms537512(v=vs.85)?redirectedfrom=MSDN +// +// What is not permitted are CDATA XML comments, as the x/net/html package we depend +// on does not handle this fully and we are not choosing to take on that work: +// https://pkg.go.dev/golang.org/x/net/html#Tokenizer.AllowCDATA . If the x/net/html +// package changes this then these will be considered, otherwise if you AllowComments +// but provide a CDATA comment, then as per the documentation in x/net/html this will +// be treated as a plain HTML comment. +func (p *Policy) AllowComments() { + p.allowComments = true +} + // AllowNoAttrs says that attributes on element are optional. // // The attribute policy is only added to the core policy when OnElements(...) @@ -265,8 +286,7 @@ func (abp *attrPolicyBuilder) AllowNoAttrs() *attrPolicyBuilder { } // Matching allows a regular expression to be applied to a nascent attribute -// policy, and returns the attribute policy. Calling this more than once will -// replace the existing regexp. +// policy, and returns the attribute policy. func (abp *attrPolicyBuilder) Matching(regex *regexp.Regexp) *attrPolicyBuilder { abp.regexp = regex @@ -284,7 +304,7 @@ func (abp *attrPolicyBuilder) OnElements(elements ...string) *Policy { for _, attr := range abp.attrNames { if _, ok := abp.p.elsAndAttrs[element]; !ok { - abp.p.elsAndAttrs[element] = make(map[string]attrPolicy) + abp.p.elsAndAttrs[element] = make(map[string][]attrPolicy) } ap := attrPolicy{} @@ -292,14 +312,14 @@ func (abp *attrPolicyBuilder) OnElements(elements ...string) *Policy { ap.regexp = abp.regexp } - abp.p.elsAndAttrs[element][attr] = ap + abp.p.elsAndAttrs[element][attr] = append(abp.p.elsAndAttrs[element][attr], ap) } if abp.allowEmpty { abp.p.setOfElementsAllowedWithoutAttrs[element] = struct{}{} if _, ok := abp.p.elsAndAttrs[element]; !ok { - abp.p.elsAndAttrs[element] = make(map[string]attrPolicy) + abp.p.elsAndAttrs[element] = make(map[string][]attrPolicy) } } } @@ -312,19 +332,19 @@ func (abp *attrPolicyBuilder) OnElements(elements ...string) *Policy { func (abp *attrPolicyBuilder) OnElementsMatching(regex *regexp.Regexp) *Policy { for _, attr := range abp.attrNames { if _, ok := abp.p.elsMatchingAndAttrs[regex]; !ok { - abp.p.elsMatchingAndAttrs[regex] = make(map[string]attrPolicy) + abp.p.elsMatchingAndAttrs[regex] = make(map[string][]attrPolicy) } ap := attrPolicy{} if abp.regexp != nil { ap.regexp = abp.regexp } - abp.p.elsMatchingAndAttrs[regex][attr] = ap + abp.p.elsMatchingAndAttrs[regex][attr] = append(abp.p.elsMatchingAndAttrs[regex][attr], ap) } if abp.allowEmpty { abp.p.setOfElementsMatchingAllowedWithoutAttrs = append(abp.p.setOfElementsMatchingAllowedWithoutAttrs, regex) if _, ok := abp.p.elsMatchingAndAttrs[regex]; !ok { - abp.p.elsMatchingAndAttrs[regex] = make(map[string]attrPolicy) + abp.p.elsMatchingAndAttrs[regex] = make(map[string][]attrPolicy) } } @@ -337,7 +357,7 @@ func (abp *attrPolicyBuilder) Globally() *Policy { for _, attr := range abp.attrNames { if _, ok := abp.p.globalAttrs[attr]; !ok { - abp.p.globalAttrs[attr] = attrPolicy{} + abp.p.globalAttrs[attr] = []attrPolicy{} } ap := attrPolicy{} @@ -345,7 +365,7 @@ func (abp *attrPolicyBuilder) Globally() *Policy { ap.regexp = abp.regexp } - abp.p.globalAttrs[attr] = ap + abp.p.globalAttrs[attr] = append(abp.p.globalAttrs[attr], ap) } return abp.p @@ -353,7 +373,7 @@ func (abp *attrPolicyBuilder) Globally() *Policy { // AllowStyles takes a range of CSS property names and returns a // style policy builder that allows you to specify the pattern and scope of -// the whitelisted property. +// the allowed property. // // The style policy is only added to the core policy when either Globally() // or OnElements(...) are called. @@ -373,8 +393,7 @@ func (p *Policy) AllowStyles(propertyNames ...string) *stylePolicyBuilder { } // Matching allows a regular expression to be applied to a nascent style -// policy, and returns the style policy. Calling this more than once will -// replace the existing regexp. +// policy, and returns the style policy. func (spb *stylePolicyBuilder) Matching(regex *regexp.Regexp) *stylePolicyBuilder { spb.regexp = regex @@ -383,8 +402,7 @@ func (spb *stylePolicyBuilder) Matching(regex *regexp.Regexp) *stylePolicyBuilde } // MatchingEnum allows a list of allowed values to be applied to a nascent style -// policy, and returns the style policy. Calling this more than once will -// replace the existing list of allowed values. +// policy, and returns the style policy. func (spb *stylePolicyBuilder) MatchingEnum(enum ...string) *stylePolicyBuilder { spb.enum = enum @@ -393,8 +411,7 @@ func (spb *stylePolicyBuilder) MatchingEnum(enum ...string) *stylePolicyBuilder } // MatchingHandler allows a handler to be applied to a nascent style -// policy, and returns the style policy. Calling this more than once will -// replace the existing handler. +// policy, and returns the style policy. func (spb *stylePolicyBuilder) MatchingHandler(handler func(string) bool) *stylePolicyBuilder { spb.handler = handler @@ -412,7 +429,7 @@ func (spb *stylePolicyBuilder) OnElements(elements ...string) *Policy { for _, attr := range spb.propertyNames { if _, ok := spb.p.elsAndStyles[element]; !ok { - spb.p.elsAndStyles[element] = make(map[string]stylePolicy) + spb.p.elsAndStyles[element] = make(map[string][]stylePolicy) } sp := stylePolicy{} @@ -423,9 +440,9 @@ func (spb *stylePolicyBuilder) OnElements(elements ...string) *Policy { } else if spb.regexp != nil { sp.regexp = spb.regexp } else { - sp.handler = getDefaultHandler(attr) + sp.handler = css.GetDefaultHandler(attr) } - spb.p.elsAndStyles[element][attr] = sp + spb.p.elsAndStyles[element][attr] = append(spb.p.elsAndStyles[element][attr], sp) } } @@ -439,7 +456,7 @@ func (spb *stylePolicyBuilder) OnElementsMatching(regex *regexp.Regexp) *Policy for _, attr := range spb.propertyNames { if _, ok := spb.p.elsMatchingAndStyles[regex]; !ok { - spb.p.elsMatchingAndStyles[regex] = make(map[string]stylePolicy) + spb.p.elsMatchingAndStyles[regex] = make(map[string][]stylePolicy) } sp := stylePolicy{} @@ -450,9 +467,9 @@ func (spb *stylePolicyBuilder) OnElementsMatching(regex *regexp.Regexp) *Policy } else if spb.regexp != nil { sp.regexp = spb.regexp } else { - sp.handler = getDefaultHandler(attr) + sp.handler = css.GetDefaultHandler(attr) } - spb.p.elsMatchingAndStyles[regex][attr] = sp + spb.p.elsMatchingAndStyles[regex][attr] = append(spb.p.elsMatchingAndStyles[regex][attr], sp) } return spb.p @@ -464,7 +481,7 @@ func (spb *stylePolicyBuilder) Globally() *Policy { for _, attr := range spb.propertyNames { if _, ok := spb.p.globalStyles[attr]; !ok { - spb.p.globalStyles[attr] = stylePolicy{} + spb.p.globalStyles[attr] = []stylePolicy{} } // Use only one strategy for validating styles, fallback to default @@ -476,15 +493,15 @@ func (spb *stylePolicyBuilder) Globally() *Policy { } else if spb.regexp != nil { sp.regexp = spb.regexp } else { - sp.handler = getDefaultHandler(attr) + sp.handler = css.GetDefaultHandler(attr) } - spb.p.globalStyles[attr] = sp + spb.p.globalStyles[attr] = append(spb.p.globalStyles[attr], sp) } return spb.p } -// AllowElements will append HTML elements to the whitelist without applying an +// AllowElements will append HTML elements to the allowlist without applying an // attribute policy to those elements (the elements are permitted // sans-attributes) func (p *Policy) AllowElements(names ...string) *Policy { @@ -494,17 +511,19 @@ func (p *Policy) AllowElements(names ...string) *Policy { element = strings.ToLower(element) if _, ok := p.elsAndAttrs[element]; !ok { - p.elsAndAttrs[element] = make(map[string]attrPolicy) + p.elsAndAttrs[element] = make(map[string][]attrPolicy) } } return p } +// AllowElementsMatching will append HTML elements to the allowlist if they +// match a regexp. func (p *Policy) AllowElementsMatching(regex *regexp.Regexp) *Policy { p.init() if _, ok := p.elsMatchingAndAttrs[regex]; !ok { - p.elsMatchingAndAttrs[regex] = make(map[string]attrPolicy) + p.elsMatchingAndAttrs[regex] = make(map[string][]attrPolicy) } return p } @@ -611,7 +630,7 @@ func (p *Policy) AllowRelativeURLs(require bool) *Policy { return p } -// AllowURLSchemes will append URL schemes to the whitelist +// AllowURLSchemes will append URL schemes to the allowlist // Example: p.AllowURLSchemes("mailto", "http", "https") func (p *Policy) AllowURLSchemes(schemes ...string) *Policy { p.init() @@ -629,7 +648,7 @@ func (p *Policy) AllowURLSchemes(schemes ...string) *Policy { } // AllowURLSchemeWithCustomPolicy will append URL schemes with -// a custom URL policy to the whitelist. +// a custom URL policy to the allowlist. // Only the URLs with matching schema and urlPolicy(url) // returning true will be allowed. func (p *Policy) AllowURLSchemeWithCustomPolicy( @@ -643,13 +662,13 @@ func (p *Policy) AllowURLSchemeWithCustomPolicy( scheme = strings.ToLower(scheme) - p.allowURLSchemes[scheme] = urlPolicy + p.allowURLSchemes[scheme] = append(p.allowURLSchemes[scheme], urlPolicy) return p } // AddSpaceWhenStrippingTag states whether to add a single space " " when -// removing tags that are not whitelisted by the policy. +// removing tags that are not allowed by the policy. // // This is useful if you expect to strip tags in dense markup and may lose the // value of whitespace. diff --git a/vendor/github.com/microcosm-cc/bluemonday/sanitize.go b/vendor/github.com/microcosm-cc/bluemonday/sanitize.go index b462f0990a..9bb87a6879 100644 --- a/vendor/github.com/microcosm-cc/bluemonday/sanitize.go +++ b/vendor/github.com/microcosm-cc/bluemonday/sanitize.go @@ -31,6 +31,7 @@ package bluemonday import ( "bytes" + "fmt" "io" "net/url" "regexp" @@ -47,10 +48,11 @@ var ( dataAttributeXMLPrefix = regexp.MustCompile("^xml.+") dataAttributeInvalidChars = regexp.MustCompile("[A-Z;]+") cssUnicodeChar = regexp.MustCompile(`\\[0-9a-f]{1,6} ?`) + dataURIbase64Prefix = regexp.MustCompile(`^data:[^,]*;base64,`) ) // Sanitize takes a string that contains a HTML fragment or document and applies -// the given policy whitelist. +// the given policy allowlist. // // It returns a HTML string that has been sanitized by the policy or an empty // string if an error has occurred (most likely as a consequence of extremely @@ -60,11 +62,11 @@ func (p *Policy) Sanitize(s string) string { return s } - return p.sanitize(strings.NewReader(s)).String() + return p.sanitizeWithBuff(strings.NewReader(s)).String() } // SanitizeBytes takes a []byte that contains a HTML fragment or document and applies -// the given policy whitelist. +// the given policy allowlist. // // It returns a []byte containing the HTML that has been sanitized by the policy // or an empty []byte if an error has occurred (most likely as a consequence of @@ -74,26 +76,32 @@ func (p *Policy) SanitizeBytes(b []byte) []byte { return b } - return p.sanitize(bytes.NewReader(b)).Bytes() + return p.sanitizeWithBuff(bytes.NewReader(b)).Bytes() } // SanitizeReader takes an io.Reader that contains a HTML fragment or document -// and applies the given policy whitelist. +// and applies the given policy allowlist. // // It returns a bytes.Buffer containing the HTML that has been sanitized by the // policy. Errors during sanitization will merely return an empty result. func (p *Policy) SanitizeReader(r io.Reader) *bytes.Buffer { - return p.sanitize(r) + return p.sanitizeWithBuff(r) +} + +// SanitizeReaderToWriter takes an io.Reader that contains a HTML fragment or document +// and applies the given policy allowlist and writes to the provided writer returning +// an error if there is one. +func (p *Policy) SanitizeReaderToWriter(r io.Reader, w io.Writer) error { + return p.sanitize(r, w) } const escapedURLChars = "'<>\"\r" -func escapeUrlComponent(val string) string { - w := bytes.NewBufferString("") +func escapeUrlComponent(w stringWriterWriter, val string) error { i := strings.IndexAny(val, escapedURLChars) for i != -1 { if _, err := w.WriteString(val[:i]); err != nil { - return w.String() + return err } var esc string switch val[i] { @@ -114,12 +122,12 @@ func escapeUrlComponent(val string) string { } val = val[i+1:] if _, err := w.WriteString(esc); err != nil { - return w.String() + return err } i = strings.IndexAny(val, escapedURLChars) } - w.WriteString(val) - return w.String() + _, err := w.WriteString(val) + return err } // Query represents a query @@ -205,15 +213,16 @@ func sanitizedURL(val string) (string, error) { return u.String(), nil } -func (p *Policy) writeLinkableBuf(buff *bytes.Buffer, token *html.Token) { +func (p *Policy) writeLinkableBuf(buff stringWriterWriter, token *html.Token) (int, error) { // do not escape multiple query parameters - tokenBuff := bytes.NewBufferString("") - tokenBuff.WriteString("<") + tokenBuff := bytes.NewBuffer(make([]byte, 0, 1024)) // This should stay on the stack unless it gets too big + + tokenBuff.WriteByte('<') tokenBuff.WriteString(token.Data) for _, attr := range token.Attr { tokenBuff.WriteByte(' ') tokenBuff.WriteString(attr.Key) - tokenBuff.WriteString(`="`) + tokenBuff.Write([]byte{'=', '"'}) switch attr.Key { case "href", "src": u, ok := p.validURL(attr.Val) @@ -238,12 +247,27 @@ func (p *Policy) writeLinkableBuf(buff *bytes.Buffer, token *html.Token) { tokenBuff.WriteString("/") } tokenBuff.WriteString(">") - buff.WriteString(tokenBuff.String()) + return buff.Write(tokenBuff.Bytes()) } // Performs the actual sanitization process. -func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { +func (p *Policy) sanitizeWithBuff(r io.Reader) *bytes.Buffer { + var buff bytes.Buffer + if err := p.sanitize(r, &buff); err != nil { + return &bytes.Buffer{} + } + return &buff +} + +type asStringWriter struct { + io.Writer +} +func (a *asStringWriter) WriteString(s string) (int, error) { + return a.Write([]byte(s)) +} + +func (p *Policy) sanitize(r io.Reader, w io.Writer) error { // It is possible that the developer has created the policy via: // p := bluemonday.Policy{} // rather than: @@ -252,8 +276,12 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { // would initiliaze the maps, then we need to do that. p.init() + buff, ok := w.(stringWriterWriter) + if !ok { + buff = &asStringWriter{w} + } + var ( - buff bytes.Buffer skipElementContent bool skippingElementsCount int64 skipClosingTag bool @@ -267,11 +295,11 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { err := tokenizer.Err() if err == io.EOF { // End of input means end of processing - return &buff + return nil } // Raw tokenizer error - return &bytes.Buffer{} + return err } token := tokenizer.Token() @@ -289,6 +317,10 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { case html.CommentToken: // Comments are ignored by default + if p.allowComments { + // But if allowed then write the comment out as-is + buff.WriteString(token.String()) + } case html.StartTagToken: @@ -303,7 +335,9 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { skippingElementsCount++ } if p.addSpaces { - buff.WriteString(" ") + if _, err := buff.WriteString(" "); err != nil { + return err + } } break } @@ -318,7 +352,9 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { skipClosingTag = true closingTagToSkipStack = append(closingTagToSkipStack, token.Data) if p.addSpaces { - buff.WriteString(" ") + if _, err := buff.WriteString(" "); err != nil { + return err + } } break } @@ -327,9 +363,13 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { if !skipElementContent { // do not escape multiple query parameters if linkable(token.Data) { - p.writeLinkableBuf(&buff, &token) + if _, err := p.writeLinkableBuf(buff, &token); err != nil { + return err + } } else { - buff.WriteString(token.String()) + if _, err := buff.WriteString(token.String()); err != nil { + return err + } } } @@ -345,7 +385,9 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { skipClosingTag = false } if p.addSpaces { - buff.WriteString(" ") + if _, err := buff.WriteString(" "); err != nil { + return err + } } break } @@ -366,14 +408,18 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { } if !match { if p.addSpaces { - buff.WriteString(" ") + if _, err := buff.WriteString(" "); err != nil { + return err + } } break } } if !skipElementContent { - buff.WriteString(token.String()) + if _, err := buff.WriteString(token.String()); err != nil { + return err + } } case html.SelfClosingTagToken: @@ -383,7 +429,9 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { aa, matched := p.matchRegex(token.Data) if !matched { if p.addSpaces && !matched { - buff.WriteString(" ") + if _, err := buff.WriteString(" "); err != nil { + return err + } } break } @@ -396,16 +444,22 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { if len(token.Attr) == 0 && !p.allowNoAttrs(token.Data) { if p.addSpaces { - buff.WriteString(" ") + if _, err := buff.WriteString(" "); err != nil { + return err + } break } } if !skipElementContent { // do not escape multiple query parameters if linkable(token.Data) { - p.writeLinkableBuf(&buff, &token) + if _, err := p.writeLinkableBuf(buff, &token); err != nil { + return err + } } else { - buff.WriteString(token.String()) + if _, err := buff.WriteString(token.String()); err != nil { + return err + } } } @@ -416,20 +470,26 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { case `script`: // not encouraged, but if a policy allows JavaScript we // should not HTML escape it as that would break the output - buff.WriteString(token.Data) - case `style`: + if _, err := buff.WriteString(token.Data); err != nil { + return err + } + case "style": // not encouraged, but if a policy allows CSS styles we // should not HTML escape it as that would break the output - buff.WriteString(token.Data) + if _, err := buff.WriteString(token.Data); err != nil { + return err + } default: // HTML escape the text - buff.WriteString(token.String()) + if _, err := buff.WriteString(token.String()); err != nil { + return err + } } } default: // A token that didn't exist in the html package when we wrote this - return &bytes.Buffer{} + return fmt.Errorf("unknown token: %v", token) } } } @@ -440,7 +500,7 @@ func (p *Policy) sanitize(r io.Reader) *bytes.Buffer { func (p *Policy) sanitizeAttrs( elementName string, attrs []html.Attribute, - aps map[string]attrPolicy, + aps map[string][]attrPolicy, ) []html.Attribute { if len(attrs) == 0 { @@ -465,8 +525,9 @@ func (p *Policy) sanitizeAttrs( } // Builds a new attribute slice based on the whether the attribute has been - // whitelisted explicitly or globally. + // allowed explicitly or globally. cleanAttrs := []html.Attribute{} +attrsLoop: for _, htmlAttr := range attrs { if p.allowDataAttributes { // If we see a data attribute, let it through. @@ -489,27 +550,30 @@ func (p *Policy) sanitizeAttrs( } // Is there an element specific attribute policy that applies? - if ap, ok := aps[htmlAttr.Key]; ok { - if ap.regexp != nil { - if ap.regexp.MatchString(htmlAttr.Val) { + if apl, ok := aps[htmlAttr.Key]; ok { + for _, ap := range apl { + if ap.regexp != nil { + if ap.regexp.MatchString(htmlAttr.Val) { + cleanAttrs = append(cleanAttrs, htmlAttr) + continue attrsLoop + } + } else { cleanAttrs = append(cleanAttrs, htmlAttr) - continue + continue attrsLoop } - } else { - cleanAttrs = append(cleanAttrs, htmlAttr) - continue } } // Is there a global attribute policy that applies? - if ap, ok := p.globalAttrs[htmlAttr.Key]; ok { - - if ap.regexp != nil { - if ap.regexp.MatchString(htmlAttr.Val) { + if apl, ok := p.globalAttrs[htmlAttr.Key]; ok { + for _, ap := range apl { + if ap.regexp != nil { + if ap.regexp.MatchString(htmlAttr.Val) { + cleanAttrs = append(cleanAttrs, htmlAttr) + } + } else { cleanAttrs = append(cleanAttrs, htmlAttr) } - } else { - cleanAttrs = append(cleanAttrs, htmlAttr) } } } @@ -533,7 +597,7 @@ func (p *Policy) sanitizeAttrs( tmpAttrs := []html.Attribute{} for _, htmlAttr := range cleanAttrs { switch elementName { - case "a", "area", "link": + case "a", "area", "base", "link": if htmlAttr.Key == "href" { if u, ok := p.validURL(htmlAttr.Val); ok { htmlAttr.Val = u @@ -542,7 +606,7 @@ func (p *Policy) sanitizeAttrs( break } tmpAttrs = append(tmpAttrs, htmlAttr) - case "blockquote", "q": + case "blockquote", "del", "ins", "q": if htmlAttr.Key == "cite" { if u, ok := p.validURL(htmlAttr.Val); ok { htmlAttr.Val = u @@ -551,7 +615,7 @@ func (p *Policy) sanitizeAttrs( break } tmpAttrs = append(tmpAttrs, htmlAttr) - case "img", "script": + case "audio", "embed", "iframe", "img", "script", "source", "track", "video": if htmlAttr.Key == "src" { if u, ok := p.validURL(htmlAttr.Val); ok { htmlAttr.Val = u @@ -576,7 +640,7 @@ func (p *Policy) sanitizeAttrs( // Add rel="nofollow" if a "href" exists switch elementName { - case "a", "area", "link": + case "a", "area", "base", "link": var hrefFound bool var externalLink bool for _, htmlAttr := range cleanAttrs { @@ -753,14 +817,14 @@ func (p *Policy) sanitizeAttrs( func (p *Policy) sanitizeStyles(attr html.Attribute, elementName string) html.Attribute { sps := p.elsAndStyles[elementName] if len(sps) == 0 { - sps = map[string]stylePolicy{} + sps = map[string][]stylePolicy{} // check for any matching elements, if we don't already have a policy found // if multiple matches are found they will be overwritten, it's best // to not have overlapping matchers for regex, policies := range p.elsMatchingAndStyles { if regex.MatchString(elementName) { for k, v := range policies { - sps[k] = v + sps[k] = append(sps[k], v...) } } } @@ -778,46 +842,51 @@ func (p *Policy) sanitizeStyles(attr html.Attribute, elementName string) html.At clean := []string{} prefixes := []string{"-webkit-", "-moz-", "-ms-", "-o-", "mso-", "-xv-", "-atsc-", "-wap-", "-khtml-", "prince-", "-ah-", "-hp-", "-ro-", "-rim-", "-tc-"} +decLoop: for _, dec := range decs { - addedProperty := false tempProperty := strings.ToLower(dec.Property) tempValue := removeUnicode(strings.ToLower(dec.Value)) for _, i := range prefixes { tempProperty = strings.TrimPrefix(tempProperty, i) } - if sp, ok := sps[tempProperty]; ok { - if sp.handler != nil { - if sp.handler(tempValue) { - clean = append(clean, dec.Property+": "+dec.Value) - addedProperty = true - } - } else if len(sp.enum) > 0 { - if stringInSlice(tempValue, sp.enum) { - clean = append(clean, dec.Property+": "+dec.Value) - addedProperty = true - } - } else if sp.regexp != nil { - if sp.regexp.MatchString(tempValue) { - clean = append(clean, dec.Property+": "+dec.Value) - addedProperty = true + if spl, ok := sps[tempProperty]; ok { + for _, sp := range spl { + if sp.handler != nil { + if sp.handler(tempValue) { + clean = append(clean, dec.Property+": "+dec.Value) + continue decLoop + } + } else if len(sp.enum) > 0 { + if stringInSlice(tempValue, sp.enum) { + clean = append(clean, dec.Property+": "+dec.Value) + continue decLoop + } + } else if sp.regexp != nil { + if sp.regexp.MatchString(tempValue) { + clean = append(clean, dec.Property+": "+dec.Value) + continue decLoop + } } - continue } } - if sp, ok := p.globalStyles[tempProperty]; ok && !addedProperty { - if sp.handler != nil { - if sp.handler(tempValue) { - clean = append(clean, dec.Property+": "+dec.Value) - } - } else if len(sp.enum) > 0 { - if stringInSlice(tempValue, sp.enum) { - clean = append(clean, dec.Property+": "+dec.Value) - } - } else if sp.regexp != nil { - if sp.regexp.MatchString(tempValue) { - clean = append(clean, dec.Property+": "+dec.Value) + if spl, ok := p.globalStyles[tempProperty]; ok { + for _, sp := range spl { + if sp.handler != nil { + if sp.handler(tempValue) { + clean = append(clean, dec.Property+": "+dec.Value) + continue decLoop + } + } else if len(sp.enum) > 0 { + if stringInSlice(tempValue, sp.enum) { + clean = append(clean, dec.Property+": "+dec.Value) + continue decLoop + } + } else if sp.regexp != nil { + if sp.regexp.MatchString(tempValue) { + clean = append(clean, dec.Property+": "+dec.Value) + continue decLoop + } } - continue } } } @@ -848,11 +917,28 @@ func (p *Policy) validURL(rawurl string) (string, bool) { rawurl = strings.TrimSpace(rawurl) // URLs cannot contain whitespace, unless it is a data-uri - if (strings.Contains(rawurl, " ") || + if strings.Contains(rawurl, " ") || strings.Contains(rawurl, "\t") || - strings.Contains(rawurl, "\n")) && - !strings.HasPrefix(rawurl, `data:`) { - return "", false + strings.Contains(rawurl, "\n") { + if !strings.HasPrefix(rawurl, `data:`) { + return "", false + } + + // Remove \r and \n from base64 encoded data to pass url.Parse. + matched := dataURIbase64Prefix.FindString(rawurl) + if matched != "" { + rawurl = matched + strings.Replace( + strings.Replace( + rawurl[len(matched):], + "\r", + "", + -1, + ), + "\n", + "", + -1, + ) + } } // URLs are valid if they parse @@ -863,16 +949,21 @@ func (p *Policy) validURL(rawurl string) (string, bool) { if u.Scheme != "" { - urlPolicy, ok := p.allowURLSchemes[u.Scheme] + urlPolicies, ok := p.allowURLSchemes[u.Scheme] if !ok { return "", false - } - if urlPolicy == nil || urlPolicy(u) == true { + if len(urlPolicies) == 0 { return u.String(), true } + for _, urlPolicy := range urlPolicies { + if urlPolicy(u) == true { + return u.String(), true + } + } + return "", false } @@ -890,7 +981,14 @@ func (p *Policy) validURL(rawurl string) (string, bool) { func linkable(elementName string) bool { switch elementName { - case "a", "area", "blockquote", "img", "link", "script": + case "a", "area", "base", "link": + // elements that allow .href + return true + case "blockquote", "del", "ins", "q": + // elements that allow .cite + return true + case "audio", "embed", "iframe", "img", "input", "script", "track", "video": + // elements that allow .src return true default: return false @@ -957,14 +1055,14 @@ func removeUnicode(value string) string { return substitutedValue } -func (p *Policy) matchRegex(elementName string) (map[string]attrPolicy, bool) { - aps := make(map[string]attrPolicy, 0) +func (p *Policy) matchRegex(elementName string) (map[string][]attrPolicy, bool) { + aps := make(map[string][]attrPolicy, 0) matched := false for regex, attrs := range p.elsMatchingAndAttrs { if regex.MatchString(elementName) { matched = true for k, v := range attrs { - aps[k] = v + aps[k] = append(aps[k], v...) } } } diff --git a/vendor/github.com/microcosm-cc/bluemonday/stringwriterwriter_go1.12.go b/vendor/github.com/microcosm-cc/bluemonday/stringwriterwriter_go1.12.go new file mode 100644 index 0000000000..afa011e02a --- /dev/null +++ b/vendor/github.com/microcosm-cc/bluemonday/stringwriterwriter_go1.12.go @@ -0,0 +1,10 @@ +// +build go1.12 + +package bluemonday + +import "io" + +type stringWriterWriter interface { + io.Writer + io.StringWriter +} diff --git a/vendor/github.com/microcosm-cc/bluemonday/stringwriterwriter_ltgo1.12.go b/vendor/github.com/microcosm-cc/bluemonday/stringwriterwriter_ltgo1.12.go new file mode 100644 index 0000000000..9bc6747982 --- /dev/null +++ b/vendor/github.com/microcosm-cc/bluemonday/stringwriterwriter_ltgo1.12.go @@ -0,0 +1,14 @@ +// +build go1.1,!go1.12 + +package bluemonday + +import "io" + +type stringWriterWriter interface { + io.Writer + StringWriter +} + +type StringWriter interface { + WriteString(s string) (n int, err error) +} diff --git a/vendor/github.com/miekg/dns/acceptfunc.go b/vendor/github.com/miekg/dns/acceptfunc.go index 825617fe21..3f29a48c48 100644 --- a/vendor/github.com/miekg/dns/acceptfunc.go +++ b/vendor/github.com/miekg/dns/acceptfunc.go @@ -25,6 +25,7 @@ var DefaultMsgAcceptFunc MsgAcceptFunc = defaultMsgAcceptFunc // MsgAcceptAction represents the action to be taken. type MsgAcceptAction int +// Allowed returned values from a MsgAcceptFunc. const ( MsgAccept MsgAcceptAction = iota // Accept the message MsgReject // Reject the message with a RcodeFormatError diff --git a/vendor/github.com/miekg/dns/dnssec.go b/vendor/github.com/miekg/dns/dnssec.go index 7880d7a826..8539aae6c7 100644 --- a/vendor/github.com/miekg/dns/dnssec.go +++ b/vendor/github.com/miekg/dns/dnssec.go @@ -8,9 +8,9 @@ import ( "crypto/elliptic" "crypto/rand" "crypto/rsa" - _ "crypto/sha1" - _ "crypto/sha256" - _ "crypto/sha512" + _ "crypto/sha1" // need its init function + _ "crypto/sha256" // need its init function + _ "crypto/sha512" // need its init function "encoding/asn1" "encoding/binary" "encoding/hex" diff --git a/vendor/github.com/miekg/dns/edns.go b/vendor/github.com/miekg/dns/edns.go index 844cf92b8c..c9181783de 100644 --- a/vendor/github.com/miekg/dns/edns.go +++ b/vendor/github.com/miekg/dns/edns.go @@ -28,6 +28,41 @@ const ( _DO = 1 << 15 // DNSSEC OK ) +// makeDataOpt is used to unpack the EDNS0 option(s) from a message. +func makeDataOpt(code uint16) EDNS0 { + // All the EDNS0.* constants above need to be in this switch. + switch code { + case EDNS0LLQ: + return new(EDNS0_LLQ) + case EDNS0UL: + return new(EDNS0_UL) + case EDNS0NSID: + return new(EDNS0_NSID) + case EDNS0DAU: + return new(EDNS0_DAU) + case EDNS0DHU: + return new(EDNS0_DHU) + case EDNS0N3U: + return new(EDNS0_N3U) + case EDNS0SUBNET: + return new(EDNS0_SUBNET) + case EDNS0EXPIRE: + return new(EDNS0_EXPIRE) + case EDNS0COOKIE: + return new(EDNS0_COOKIE) + case EDNS0TCPKEEPALIVE: + return new(EDNS0_TCP_KEEPALIVE) + case EDNS0PADDING: + return new(EDNS0_PADDING) + case EDNS0EDE: + return new(EDNS0_EDE) + default: + e := new(EDNS0_LOCAL) + e.Code = code + return e + } +} + // OPT is the EDNS0 RR appended to messages to convey extra (meta) information. // See RFC 6891. type OPT struct { @@ -95,7 +130,7 @@ func (*OPT) parse(c *zlexer, origin string) *ParseError { return &ParseError{err: "OPT records do not have a presentation format"} } -func (r1 *OPT) isDuplicate(r2 RR) bool { return false } +func (rr *OPT) isDuplicate(r2 RR) bool { return false } // return the old value -> delete SetVersion? @@ -465,7 +500,7 @@ func (e *EDNS0_LLQ) copy() EDNS0 { return &EDNS0_LLQ{e.Code, e.Version, e.Opcode, e.Error, e.Id, e.LeaseLife} } -// EDNS0_DUA implements the EDNS0 "DNSSEC Algorithm Understood" option. See RFC 6975. +// EDNS0_DAU implements the EDNS0 "DNSSEC Algorithm Understood" option. See RFC 6975. type EDNS0_DAU struct { Code uint16 // Always EDNS0DAU AlgCode []uint8 diff --git a/vendor/github.com/miekg/dns/msg_helpers.go b/vendor/github.com/miekg/dns/msg_helpers.go index 472ada5d19..5904927ca8 100644 --- a/vendor/github.com/miekg/dns/msg_helpers.go +++ b/vendor/github.com/miekg/dns/msg_helpers.go @@ -438,37 +438,6 @@ Option: return edns, off, nil } -func makeDataOpt(code uint16) EDNS0 { - switch code { - case EDNS0NSID: - return new(EDNS0_NSID) - case EDNS0SUBNET: - return new(EDNS0_SUBNET) - case EDNS0COOKIE: - return new(EDNS0_COOKIE) - case EDNS0EXPIRE: - return new(EDNS0_EXPIRE) - case EDNS0UL: - return new(EDNS0_UL) - case EDNS0LLQ: - return new(EDNS0_LLQ) - case EDNS0DAU: - return new(EDNS0_DAU) - case EDNS0DHU: - return new(EDNS0_DHU) - case EDNS0N3U: - return new(EDNS0_N3U) - case EDNS0PADDING: - return new(EDNS0_PADDING) - case EDNS0EDE: - return new(EDNS0_EDE) - default: - e := new(EDNS0_LOCAL) - e.Code = code - return e - } -} - func packDataOpt(options []EDNS0, msg []byte, off int) (int, error) { for _, el := range options { b, err := el.pack() diff --git a/vendor/github.com/miekg/dns/privaterr.go b/vendor/github.com/miekg/dns/privaterr.go index 45c7f26d85..d256b652ea 100644 --- a/vendor/github.com/miekg/dns/privaterr.go +++ b/vendor/github.com/miekg/dns/privaterr.go @@ -90,7 +90,7 @@ Fetch: return nil } -func (r1 *PrivateRR) isDuplicate(r2 RR) bool { return false } +func (r *PrivateRR) isDuplicate(r2 RR) bool { return false } // PrivateHandle registers a private resource record type. It requires // string and numeric representation of private RR type and generator function as argument. diff --git a/vendor/github.com/miekg/dns/scan_rr.go b/vendor/github.com/miekg/dns/scan_rr.go index 05765aed87..e398484da9 100644 --- a/vendor/github.com/miekg/dns/scan_rr.go +++ b/vendor/github.com/miekg/dns/scan_rr.go @@ -734,7 +734,11 @@ func (rr *HIP) parse(c *zlexer, o string) *ParseError { return &ParseError{"", "bad HIP PublicKey", l} } rr.PublicKey = l.token // This cannot contain spaces - rr.PublicKeyLength = uint16(base64.StdEncoding.DecodedLen(len(rr.PublicKey))) + decodedPK, decodedPKerr := base64.StdEncoding.DecodeString(rr.PublicKey) + if decodedPKerr != nil { + return &ParseError{"", "bad HIP PublicKey", l} + } + rr.PublicKeyLength = uint16(len(decodedPK)) // RendezvousServers (if any) l, _ = c.Next() diff --git a/vendor/github.com/miekg/dns/svcb.go b/vendor/github.com/miekg/dns/svcb.go index 64800daa6d..3344253c2b 100644 --- a/vendor/github.com/miekg/dns/svcb.go +++ b/vendor/github.com/miekg/dns/svcb.go @@ -10,6 +10,7 @@ import ( "strings" ) +// SVCBKey is the type of the keys used in the SVCB RR. type SVCBKey uint16 // Keys defined in draft-ietf-dnsop-svcb-https-01 Section 12.3.2. diff --git a/vendor/github.com/miekg/dns/types.go b/vendor/github.com/miekg/dns/types.go index 99dd315bf1..d9becb67cd 100644 --- a/vendor/github.com/miekg/dns/types.go +++ b/vendor/github.com/miekg/dns/types.go @@ -152,12 +152,9 @@ const ( ) // Used in ZONEMD https://tools.ietf.org/html/rfc8976 - const ( - // ZoneMD Accepted Schemes ZoneMDSchemeSimple = 1 - // ZoneMD Hash Algorithms ZoneMDHashAlgSHA384 = 1 ZoneMDHashAlgSHA512 = 2 ) @@ -1416,13 +1413,13 @@ func (rr *APL) String() string { } // str returns presentation form of the APL prefix. -func (p *APLPrefix) str() string { +func (a *APLPrefix) str() string { var sb strings.Builder - if p.Negation { + if a.Negation { sb.WriteByte('!') } - switch len(p.Network.IP) { + switch len(a.Network.IP) { case net.IPv4len: sb.WriteByte('1') case net.IPv6len: @@ -1431,20 +1428,20 @@ func (p *APLPrefix) str() string { sb.WriteByte(':') - switch len(p.Network.IP) { + switch len(a.Network.IP) { case net.IPv4len: - sb.WriteString(p.Network.IP.String()) + sb.WriteString(a.Network.IP.String()) case net.IPv6len: // add prefix for IPv4-mapped IPv6 - if v4 := p.Network.IP.To4(); v4 != nil { + if v4 := a.Network.IP.To4(); v4 != nil { sb.WriteString("::ffff:") } - sb.WriteString(p.Network.IP.String()) + sb.WriteString(a.Network.IP.String()) } sb.WriteByte('/') - prefix, _ := p.Network.Mask.Size() + prefix, _ := a.Network.Mask.Size() sb.WriteString(strconv.Itoa(prefix)) return sb.String() @@ -1458,17 +1455,17 @@ func (a *APLPrefix) equals(b *APLPrefix) bool { } // copy returns a copy of the APL prefix. -func (p *APLPrefix) copy() APLPrefix { +func (a *APLPrefix) copy() APLPrefix { return APLPrefix{ - Negation: p.Negation, - Network: copyNet(p.Network), + Negation: a.Negation, + Network: copyNet(a.Network), } } // len returns size of the prefix in wire format. -func (p *APLPrefix) len() int { +func (a *APLPrefix) len() int { // 4-byte header and the network address prefix (see Section 4 of RFC 3123) - prefix, _ := p.Network.Mask.Size() + prefix, _ := a.Network.Mask.Size() return 4 + (prefix+7)/8 } diff --git a/vendor/github.com/miekg/dns/version.go b/vendor/github.com/miekg/dns/version.go index 695d1e8b48..622c69a1b8 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, 1, 42} +var Version = v{1, 1, 43} // v holds the version of this library. type v struct { diff --git a/vendor/github.com/minio/minio-go/v7/Makefile b/vendor/github.com/minio/minio-go/v7/Makefile index a6f0b9bcfc..ae640c4d64 100644 --- a/vendor/github.com/minio/minio-go/v7/Makefile +++ b/vendor/github.com/minio/minio-go/v7/Makefile @@ -21,7 +21,10 @@ test: @GO111MODULE=on SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minio SECRET_KEY=minio123 ENABLE_HTTPS=1 MINT_MODE=full go test -race -v ./... examples: - @$(foreach v,$(wildcard examples/s3/*), go build -o ${TMPDIR}/$(basename $(v)) $(v) || exit 1;) + @echo "Building s3 examples" + @cd ./examples/s3 && $(foreach v,$(wildcard examples/s3/*.go),go build -mod=mod -o ${TMPDIR}/$(basename $(v)) $(notdir $(v)) || exit 1;) + @echo "Building minio examples" + @cd ./examples/minio && $(foreach v,$(wildcard examples/minio/*.go),go build -mod=mod -o ${TMPDIR}/$(basename $(v)) $(notdir $(v)) || exit 1;) functional-test: @GO111MODULE=on SERVER_ENDPOINT=localhost:9000 ACCESS_KEY=minio SECRET_KEY=minio123 ENABLE_HTTPS=1 MINT_MODE=full go run functional_tests.go diff --git a/vendor/github.com/minio/minio-go/v7/README.md b/vendor/github.com/minio/minio-go/v7/README.md index ab5bcb53f3..b5c26d53c2 100644 --- a/vendor/github.com/minio/minio-go/v7/README.md +++ b/vendor/github.com/minio/minio-go/v7/README.md @@ -104,12 +104,12 @@ func main() { contentType := "application/zip" // Upload the zip file with FPutObject - n, err := minioClient.FPutObject(ctx, bucketName, objectName, filePath, minio.PutObjectOptions{ContentType: contentType}) + info, err := minioClient.FPutObject(ctx, bucketName, objectName, filePath, minio.PutObjectOptions{ContentType: contentType}) if err != nil { log.Fatalln(err) } - log.Printf("Successfully uploaded %s of size %d\n", objectName, n) + log.Printf("Successfully uploaded %s of size %d\n", objectName, info.Size) } ``` diff --git a/vendor/github.com/minio/minio-go/v7/api-bucket-policy.go b/vendor/github.com/minio/minio-go/v7/api-bucket-policy.go index 72676f3447..7e01275df6 100644 --- a/vendor/github.com/minio/minio-go/v7/api-bucket-policy.go +++ b/vendor/github.com/minio/minio-go/v7/api-bucket-policy.go @@ -63,7 +63,7 @@ func (c Client) putBucketPolicy(ctx context.Context, bucketName, policy string) return err } if resp != nil { - if resp.StatusCode != http.StatusNoContent { + if resp.StatusCode != http.StatusNoContent && resp.StatusCode != http.StatusOK { return httpRespToErrorResponse(resp, bucketName, "") } } diff --git a/vendor/github.com/minio/minio-go/v7/api-bucket-replication.go b/vendor/github.com/minio/minio-go/v7/api-bucket-replication.go index bfd5ea4360..41054e1311 100644 --- a/vendor/github.com/minio/minio-go/v7/api-bucket-replication.go +++ b/vendor/github.com/minio/minio-go/v7/api-bucket-replication.go @@ -20,9 +20,12 @@ package minio import ( "bytes" "context" + "encoding/json" "encoding/xml" + "io/ioutil" "net/http" "net/url" + "time" "github.com/minio/minio-go/v7/pkg/replication" "github.com/minio/minio-go/v7/pkg/s3utils" @@ -147,3 +150,79 @@ func (c Client) getBucketReplication(ctx context.Context, bucketName string) (cf return cfg, nil } + +// GetBucketReplicationMetrics fetches bucket replication status metrics +func (c Client) GetBucketReplicationMetrics(ctx context.Context, bucketName string) (s replication.Metrics, err error) { + // Input validation. + if err := s3utils.CheckValidBucketName(bucketName); err != nil { + return s, err + } + // Get resources properly escaped and lined up before + // using them in http request. + urlValues := make(url.Values) + urlValues.Set("replication-metrics", "") + + // Execute GET on bucket to get replication config. + resp, err := c.executeMethod(ctx, http.MethodGet, requestMetadata{ + bucketName: bucketName, + queryValues: urlValues, + }) + + defer closeResponse(resp) + if err != nil { + return s, err + } + + if resp.StatusCode != http.StatusOK { + return s, httpRespToErrorResponse(resp, bucketName, "") + } + respBytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + return s, err + } + + if err := json.Unmarshal(respBytes, &s); err != nil { + return s, err + } + return s, nil +} + +// ResetBucketReplication kicks off replication of previously replicated objects if ExistingObjectReplication +// is enabled in the replication config +func (c Client) ResetBucketReplication(ctx context.Context, bucketName string, olderThan time.Duration) (resetID string, err error) { + // Input validation. + if err := s3utils.CheckValidBucketName(bucketName); err != nil { + return "", err + } + // Get resources properly escaped and lined up before + // using them in http request. + urlValues := make(url.Values) + urlValues.Set("replication-reset", "") + if olderThan > 0 { + urlValues.Set("older-than", olderThan.String()) + } + + // Execute GET on bucket to get replication config. + resp, err := c.executeMethod(ctx, http.MethodPut, requestMetadata{ + bucketName: bucketName, + queryValues: urlValues, + }) + + defer closeResponse(resp) + if err != nil { + return "", err + } + + if resp.StatusCode != http.StatusOK { + return "", httpRespToErrorResponse(resp, bucketName, "") + } + respBytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + return "", err + } + + if err := json.Unmarshal(respBytes, &resetID); err != nil { + return "", err + } + return resetID, nil +} diff --git a/vendor/github.com/minio/minio-go/v7/api-compose-object.go b/vendor/github.com/minio/minio-go/v7/api-compose-object.go index 40238de35f..87dfae8d32 100644 --- a/vendor/github.com/minio/minio-go/v7/api-compose-object.go +++ b/vendor/github.com/minio/minio-go/v7/api-compose-object.go @@ -220,6 +220,9 @@ func (c Client) copyObjectDo(ctx context.Context, srcBucket, srcObject, destBuck if dstOpts.Internal.SourceETag != "" { headers.Set(minIOBucketSourceETag, dstOpts.Internal.SourceETag) } + if dstOpts.Internal.ReplicationRequest { + headers.Set(minIOBucketReplicationRequest, "") + } if len(dstOpts.UserTags) != 0 { headers.Set(amzTaggingHeader, s3utils.TagEncode(dstOpts.UserTags)) } @@ -510,7 +513,7 @@ func (c Client) ComposeObject(ctx context.Context, dst CopyDestOptions, srcs ... // 4. Make final complete-multipart request. uploadInfo, err := c.completeMultipartUpload(ctx, dst.Bucket, dst.Object, uploadID, - completeMultipartUpload{Parts: objParts}) + completeMultipartUpload{Parts: objParts}, PutObjectOptions{}) if err != nil { return UploadInfo{}, err } diff --git a/vendor/github.com/minio/minio-go/v7/api-list.go b/vendor/github.com/minio/minio-go/v7/api-list.go index 7996c11e9d..814ec29c85 100644 --- a/vendor/github.com/minio/minio-go/v7/api-list.go +++ b/vendor/github.com/minio/minio-go/v7/api-list.go @@ -58,12 +58,12 @@ func (c Client) ListBuckets(ctx context.Context) ([]BucketInfo, error) { /// Bucket Read Operations. -func (c Client) listObjectsV2(ctx context.Context, bucketName, objectPrefix string, recursive, metadata bool, maxKeys int) <-chan ObjectInfo { +func (c Client) listObjectsV2(ctx context.Context, bucketName string, opts ListObjectsOptions) <-chan ObjectInfo { // Allocate new list objects channel. objectStatCh := make(chan ObjectInfo, 1) // Default listing is delimited at "/" delimiter := "/" - if recursive { + if opts.Recursive { // If recursive we do not delimit. delimiter = "" } @@ -81,7 +81,7 @@ func (c Client) listObjectsV2(ctx context.Context, bucketName, objectPrefix stri } // Validate incoming object prefix. - if err := s3utils.CheckValidObjectNamePrefix(objectPrefix); err != nil { + if err := s3utils.CheckValidObjectNamePrefix(opts.Prefix); err != nil { defer close(objectStatCh) objectStatCh <- ObjectInfo{ Err: err, @@ -96,8 +96,8 @@ func (c Client) listObjectsV2(ctx context.Context, bucketName, objectPrefix stri var continuationToken string for { // Get list of objects a maximum of 1000 per request. - result, err := c.listObjectsV2Query(ctx, bucketName, objectPrefix, continuationToken, - fetchOwner, metadata, delimiter, maxKeys) + result, err := c.listObjectsV2Query(ctx, bucketName, opts.Prefix, continuationToken, + fetchOwner, opts.WithMetadata, delimiter, opts.MaxKeys, opts.headers) if err != nil { objectStatCh <- ObjectInfo{ Err: err, @@ -153,7 +153,7 @@ func (c Client) listObjectsV2(ctx context.Context, bucketName, objectPrefix stri // ?prefix - Limits the response to keys that begin with the specified prefix. // ?max-keys - Sets the maximum number of keys returned in the response body. // ?metadata - Specifies if we want metadata for the objects as part of list operation. -func (c Client) listObjectsV2Query(ctx context.Context, bucketName, objectPrefix, continuationToken string, fetchOwner, metadata bool, delimiter string, maxkeys int) (ListBucketV2Result, error) { +func (c Client) listObjectsV2Query(ctx context.Context, bucketName, objectPrefix, continuationToken string, fetchOwner, metadata bool, delimiter string, maxkeys int, headers http.Header) (ListBucketV2Result, error) { // Validate bucket name. if err := s3utils.CheckValidBucketName(bucketName); err != nil { return ListBucketV2Result{}, err @@ -202,6 +202,7 @@ func (c Client) listObjectsV2Query(ctx context.Context, bucketName, objectPrefix bucketName: bucketName, queryValues: urlValues, contentSHA256Hex: emptySHA256Hex, + customHeader: headers, }) defer closeResponse(resp) if err != nil { @@ -246,12 +247,12 @@ func (c Client) listObjectsV2Query(ctx context.Context, bucketName, objectPrefix return listBucketResult, nil } -func (c Client) listObjects(ctx context.Context, bucketName, objectPrefix string, recursive bool, maxKeys int) <-chan ObjectInfo { +func (c Client) listObjects(ctx context.Context, bucketName string, opts ListObjectsOptions) <-chan ObjectInfo { // Allocate new list objects channel. objectStatCh := make(chan ObjectInfo, 1) // Default listing is delimited at "/" delimiter := "/" - if recursive { + if opts.Recursive { // If recursive we do not delimit. delimiter = "" } @@ -264,7 +265,7 @@ func (c Client) listObjects(ctx context.Context, bucketName, objectPrefix string return objectStatCh } // Validate incoming object prefix. - if err := s3utils.CheckValidObjectNamePrefix(objectPrefix); err != nil { + if err := s3utils.CheckValidObjectNamePrefix(opts.Prefix); err != nil { defer close(objectStatCh) objectStatCh <- ObjectInfo{ Err: err, @@ -279,7 +280,7 @@ func (c Client) listObjects(ctx context.Context, bucketName, objectPrefix string marker := "" for { // Get list of objects a maximum of 1000 per request. - result, err := c.listObjectsQuery(ctx, bucketName, objectPrefix, marker, delimiter, maxKeys) + result, err := c.listObjectsQuery(ctx, bucketName, opts.Prefix, marker, delimiter, opts.MaxKeys, opts.headers) if err != nil { objectStatCh <- ObjectInfo{ Err: err, @@ -326,12 +327,12 @@ func (c Client) listObjects(ctx context.Context, bucketName, objectPrefix string return objectStatCh } -func (c Client) listObjectVersions(ctx context.Context, bucketName, prefix string, recursive bool, maxKeys int) <-chan ObjectInfo { +func (c Client) listObjectVersions(ctx context.Context, bucketName string, opts ListObjectsOptions) <-chan ObjectInfo { // Allocate new list objects channel. resultCh := make(chan ObjectInfo, 1) // Default listing is delimited at "/" delimiter := "/" - if recursive { + if opts.Recursive { // If recursive we do not delimit. delimiter = "" } @@ -346,7 +347,7 @@ func (c Client) listObjectVersions(ctx context.Context, bucketName, prefix strin } // Validate incoming object prefix. - if err := s3utils.CheckValidObjectNamePrefix(prefix); err != nil { + if err := s3utils.CheckValidObjectNamePrefix(opts.Prefix); err != nil { defer close(resultCh) resultCh <- ObjectInfo{ Err: err, @@ -365,7 +366,7 @@ func (c Client) listObjectVersions(ctx context.Context, bucketName, prefix strin for { // Get list of objects a maximum of 1000 per request. - result, err := c.listObjectVersionsQuery(ctx, bucketName, prefix, keyMarker, versionIDMarker, delimiter, maxKeys) + result, err := c.listObjectVersionsQuery(ctx, bucketName, opts.Prefix, keyMarker, versionIDMarker, delimiter, opts.MaxKeys, opts.headers) if err != nil { resultCh <- ObjectInfo{ Err: err, @@ -438,7 +439,7 @@ func (c Client) listObjectVersions(ctx context.Context, bucketName, prefix strin // ?delimiter - A delimiter is a character you use to group keys. // ?prefix - Limits the response to keys that begin with the specified prefix. // ?max-keys - Sets the maximum number of keys returned in the response body. -func (c Client) listObjectVersionsQuery(ctx context.Context, bucketName, prefix, keyMarker, versionIDMarker, delimiter string, maxkeys int) (ListVersionsResult, error) { +func (c Client) listObjectVersionsQuery(ctx context.Context, bucketName, prefix, keyMarker, versionIDMarker, delimiter string, maxkeys int, headers http.Header) (ListVersionsResult, error) { // Validate bucket name. if err := s3utils.CheckValidBucketName(bucketName); err != nil { return ListVersionsResult{}, err @@ -483,6 +484,7 @@ func (c Client) listObjectVersionsQuery(ctx context.Context, bucketName, prefix, bucketName: bucketName, queryValues: urlValues, contentSHA256Hex: emptySHA256Hex, + customHeader: headers, }) defer closeResponse(resp) if err != nil { @@ -534,7 +536,7 @@ func (c Client) listObjectVersionsQuery(ctx context.Context, bucketName, prefix, // ?delimiter - A delimiter is a character you use to group keys. // ?prefix - Limits the response to keys that begin with the specified prefix. // ?max-keys - Sets the maximum number of keys returned in the response body. -func (c Client) listObjectsQuery(ctx context.Context, bucketName, objectPrefix, objectMarker, delimiter string, maxkeys int) (ListBucketResult, error) { +func (c Client) listObjectsQuery(ctx context.Context, bucketName, objectPrefix, objectMarker, delimiter string, maxkeys int, headers http.Header) (ListBucketResult, error) { // Validate bucket name. if err := s3utils.CheckValidBucketName(bucketName); err != nil { return ListBucketResult{}, err @@ -571,6 +573,7 @@ func (c Client) listObjectsQuery(ctx context.Context, bucketName, objectPrefix, bucketName: bucketName, queryValues: urlValues, contentSHA256Hex: emptySHA256Hex, + customHeader: headers, }) defer closeResponse(resp) if err != nil { @@ -629,6 +632,18 @@ type ListObjectsOptions struct { // Use the deprecated list objects V1 API UseV1 bool + + headers http.Header +} + +// Set adds a key value pair to the options. The +// key-value pair will be part of the HTTP GET request +// headers. +func (o *ListObjectsOptions) Set(key, value string) { + if o.headers == nil { + o.headers = make(http.Header) + } + o.headers.Set(key, value) } // ListObjects returns objects list after evaluating the passed options. @@ -640,22 +655,22 @@ type ListObjectsOptions struct { // func (c Client) ListObjects(ctx context.Context, bucketName string, opts ListObjectsOptions) <-chan ObjectInfo { if opts.WithVersions { - return c.listObjectVersions(ctx, bucketName, opts.Prefix, opts.Recursive, opts.MaxKeys) + return c.listObjectVersions(ctx, bucketName, opts) } // Use legacy list objects v1 API if opts.UseV1 { - return c.listObjects(ctx, bucketName, opts.Prefix, opts.Recursive, opts.MaxKeys) + return c.listObjects(ctx, bucketName, opts) } // Check whether this is snowball region, if yes ListObjectsV2 doesn't work, fallback to listObjectsV1. if location, ok := c.bucketLocCache.Get(bucketName); ok { if location == "snowball" { - return c.listObjects(ctx, bucketName, opts.Prefix, opts.Recursive, opts.MaxKeys) + return c.listObjects(ctx, bucketName, opts) } } - return c.listObjectsV2(ctx, bucketName, opts.Prefix, opts.Recursive, opts.WithMetadata, opts.MaxKeys) + return c.listObjectsV2(ctx, bucketName, opts) } // ListIncompleteUploads - List incompletely uploaded multipart objects. diff --git a/vendor/github.com/minio/minio-go/v7/api-put-object-common.go b/vendor/github.com/minio/minio-go/v7/api-put-object-common.go index 3d0408e534..f1653afe10 100644 --- a/vendor/github.com/minio/minio-go/v7/api-put-object-common.go +++ b/vendor/github.com/minio/minio-go/v7/api-put-object-common.go @@ -57,17 +57,17 @@ func isReadAt(reader io.Reader) (ok bool) { return } -// optimalPartInfo - calculate the optimal part info for a given +// OptimalPartInfo - calculate the optimal part info for a given // object size. // // NOTE: Assumption here is that for any object to be uploaded to any S3 compatible // object storage it will have the following parameters as constants. // // maxPartsCount - 10000 -// minPartSize - 128MiB +// minPartSize - 16MiB // maxMultipartPutObjectSize - 5TiB // -func optimalPartInfo(objectSize int64, configuredPartSize uint64) (totalPartsCount int, partSize int64, lastPartSize int64, err error) { +func OptimalPartInfo(objectSize int64, configuredPartSize uint64) (totalPartsCount int, partSize int64, lastPartSize int64, err error) { // object size is '-1' set it to 5TiB. var unknownSize bool if objectSize == -1 { diff --git a/vendor/github.com/minio/minio-go/v7/api-put-object-multipart.go b/vendor/github.com/minio/minio-go/v7/api-put-object-multipart.go index 1c862ad968..873ec38786 100644 --- a/vendor/github.com/minio/minio-go/v7/api-put-object-multipart.go +++ b/vendor/github.com/minio/minio-go/v7/api-put-object-multipart.go @@ -32,6 +32,7 @@ import ( "strconv" "strings" + "github.com/google/uuid" "github.com/minio/minio-go/v7/pkg/encrypt" "github.com/minio/minio-go/v7/pkg/s3utils" ) @@ -72,7 +73,7 @@ func (c Client) putObjectMultipartNoStream(ctx context.Context, bucketName, obje var complMultipartUpload completeMultipartUpload // Calculate the optimal parts info for a given size. - totalPartsCount, partSize, _, err := optimalPartInfo(-1, opts.PartSize) + totalPartsCount, partSize, _, err := OptimalPartInfo(-1, opts.PartSize) if err != nil { return UploadInfo{}, err } @@ -175,7 +176,7 @@ func (c Client) putObjectMultipartNoStream(ctx context.Context, bucketName, obje // Sort all completed parts. sort.Sort(completedParts(complMultipartUpload.Parts)) - uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload) + uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload, PutObjectOptions{}) if err != nil { return UploadInfo{}, err } @@ -198,6 +199,13 @@ func (c Client) initiateMultipartUpload(ctx context.Context, bucketName, objectN urlValues := make(url.Values) urlValues.Set("uploads", "") + if opts.Internal.SourceVersionID != "" { + if _, err := uuid.Parse(opts.Internal.SourceVersionID); err != nil { + return initiateMultipartUploadResult{}, errInvalidArgument(err.Error()) + } + urlValues.Set("versionId", opts.Internal.SourceVersionID) + } + // Set ContentType header. customHeader := opts.Header() @@ -301,7 +309,7 @@ func (c Client) uploadPart(ctx context.Context, bucketName, objectName, uploadID // completeMultipartUpload - Completes a multipart upload by assembling previously uploaded parts. func (c Client) completeMultipartUpload(ctx context.Context, bucketName, objectName, uploadID string, - complete completeMultipartUpload) (UploadInfo, error) { + complete completeMultipartUpload, opts PutObjectOptions) (UploadInfo, error) { // Input validation. if err := s3utils.CheckValidBucketName(bucketName); err != nil { return UploadInfo{}, err @@ -328,6 +336,7 @@ func (c Client) completeMultipartUpload(ctx context.Context, bucketName, objectN contentBody: completeMultipartUploadBuffer, contentLength: int64(len(completeMultipartUploadBytes)), contentSHA256Hex: sum256Hex(completeMultipartUploadBytes), + customHeader: opts.Header(), } // Execute POST to complete multipart upload for an objectName. diff --git a/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go b/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go index f4694fc552..f1cc9fbb97 100644 --- a/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go +++ b/vendor/github.com/minio/minio-go/v7/api-put-object-streaming.go @@ -101,7 +101,7 @@ func (c Client) putObjectMultipartStreamFromReadAt(ctx context.Context, bucketNa } // Calculate the optimal parts info for a given size. - totalPartsCount, partSize, lastPartSize, err := optimalPartInfo(size, opts.PartSize) + totalPartsCount, partSize, lastPartSize, err := OptimalPartInfo(size, opts.PartSize) if err != nil { return UploadInfo{}, err } @@ -231,7 +231,7 @@ func (c Client) putObjectMultipartStreamFromReadAt(ctx context.Context, bucketNa // Sort all completed parts. sort.Sort(completedParts(complMultipartUpload.Parts)) - uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload) + uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload, PutObjectOptions{}) if err != nil { return UploadInfo{}, err } @@ -251,7 +251,7 @@ func (c Client) putObjectMultipartStreamOptionalChecksum(ctx context.Context, bu } // Calculate the optimal parts info for a given size. - totalPartsCount, partSize, lastPartSize, err := optimalPartInfo(size, opts.PartSize) + totalPartsCount, partSize, lastPartSize, err := OptimalPartInfo(size, opts.PartSize) if err != nil { return UploadInfo{}, err } @@ -358,7 +358,7 @@ func (c Client) putObjectMultipartStreamOptionalChecksum(ctx context.Context, bu // Sort all completed parts. sort.Sort(completedParts(complMultipartUpload.Parts)) - uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload) + uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload, PutObjectOptions{}) if err != nil { return UploadInfo{}, err } diff --git a/vendor/github.com/minio/minio-go/v7/api-put-object.go b/vendor/github.com/minio/minio-go/v7/api-put-object.go index 0cbb0a7a30..b89f96d532 100644 --- a/vendor/github.com/minio/minio-go/v7/api-put-object.go +++ b/vendor/github.com/minio/minio-go/v7/api-put-object.go @@ -55,10 +55,11 @@ func (r ReplicationStatus) Empty() bool { // AdvancedPutOptions for internal use - to be utilized by replication, ILM transition // implementation on MinIO server type AdvancedPutOptions struct { - SourceVersionID string - SourceETag string - ReplicationStatus ReplicationStatus - SourceMTime time.Time + SourceVersionID string + SourceETag string + ReplicationStatus ReplicationStatus + SourceMTime time.Time + ReplicationRequest bool } // PutObjectOptions represents options specified by user for PutObject call @@ -152,6 +153,9 @@ func (opts PutObjectOptions) Header() (header http.Header) { if opts.Internal.SourceETag != "" { header.Set(minIOBucketSourceETag, opts.Internal.SourceETag) } + if opts.Internal.ReplicationRequest { + header.Set(minIOBucketReplicationRequest, "") + } if len(opts.UserTags) != 0 { header.Set(amzTaggingHeader, s3utils.TagEncode(opts.UserTags)) } @@ -269,7 +273,7 @@ func (c Client) putObjectMultipartStreamNoLength(ctx context.Context, bucketName var complMultipartUpload completeMultipartUpload // Calculate the optimal parts info for a given size. - totalPartsCount, partSize, _, err := optimalPartInfo(-1, opts.PartSize) + totalPartsCount, partSize, _, err := OptimalPartInfo(-1, opts.PartSize) if err != nil { return UploadInfo{}, err } @@ -356,7 +360,7 @@ func (c Client) putObjectMultipartStreamNoLength(ctx context.Context, bucketName // Sort all completed parts. sort.Sort(completedParts(complMultipartUpload.Parts)) - uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload) + uploadInfo, err := c.completeMultipartUpload(ctx, bucketName, objectName, uploadID, complMultipartUpload, PutObjectOptions{}) if err != nil { return UploadInfo{}, err } diff --git a/vendor/github.com/minio/minio-go/v7/api-remove.go b/vendor/github.com/minio/minio-go/v7/api-remove.go index 7ac3f26aa8..f21a72c973 100644 --- a/vendor/github.com/minio/minio-go/v7/api-remove.go +++ b/vendor/github.com/minio/minio-go/v7/api-remove.go @@ -64,6 +64,7 @@ type AdvancedRemoveOptions struct { ReplicationDeleteMarker bool ReplicationStatus ReplicationStatus ReplicationMTime time.Time + ReplicationRequest bool } // RemoveObjectOptions represents options specified by user for RemoveObject call @@ -112,6 +113,9 @@ func (c Client) removeObject(ctx context.Context, bucketName, objectName string, if !opts.Internal.ReplicationStatus.Empty() { headers.Set(amzBucketReplicationStatus, string(opts.Internal.ReplicationStatus)) } + if opts.Internal.ReplicationRequest { + headers.Set(minIOBucketReplicationRequest, "") + } // Execute DELETE on objectName. resp, err := c.executeMethod(ctx, http.MethodDelete, requestMetadata{ bucketName: bucketName, diff --git a/vendor/github.com/minio/minio-go/v7/api.go b/vendor/github.com/minio/minio-go/v7/api.go index 9a957af583..3ca67f377c 100644 --- a/vendor/github.com/minio/minio-go/v7/api.go +++ b/vendor/github.com/minio/minio-go/v7/api.go @@ -108,7 +108,7 @@ type Options struct { // Global constants. const ( libraryName = "minio-go" - libraryVersion = "v7.0.10" + libraryVersion = "v7.0.12" ) // User Agent should always following the below style. @@ -544,9 +544,6 @@ func (c Client) executeMethod(ctx context.Context, method string, metadata reque // Indicate to our routine to exit cleanly upon return. defer cancel() - // Blank indentifier is kept here on purpose since 'range' without - // blank identifiers is only supported since go1.4 - // https://golang.org/doc/go1.4#forrange. for range c.newRetryTimer(retryCtx, reqRetry, DefaultRetryUnit, DefaultRetryCap, MaxJitter) { // Retry executes the following function body if request has an // error until maxRetries have been exhausted, retry attempts are diff --git a/vendor/github.com/minio/minio-go/v7/constants.go b/vendor/github.com/minio/minio-go/v7/constants.go index 5e5aec7c2e..2a2e6a0dee 100644 --- a/vendor/github.com/minio/minio-go/v7/constants.go +++ b/vendor/github.com/minio/minio-go/v7/constants.go @@ -23,9 +23,9 @@ package minio // a part in a multipart upload may not be uploaded. const absMinPartSize = 1024 * 1024 * 5 -// minPartSize - minimum part size 128MiB per object after which +// minPartSize - minimum part size 16MiB per object after which // putObject behaves internally as multipart. -const minPartSize = 1024 * 1024 * 128 +const minPartSize = 1024 * 1024 * 16 // maxPartsCount - maximum number of parts for a single multipart session. const maxPartsCount = 10000 @@ -88,4 +88,5 @@ const ( minIOBucketSourceETag = "X-Minio-Source-Etag" minIOBucketReplicationDeleteMarker = "X-Minio-Source-DeleteMarker" minIOBucketReplicationProxyRequest = "X-Minio-Source-Proxy-Request" + minIOBucketReplicationRequest = "X-Minio-Source-Replication-Request" ) diff --git a/vendor/github.com/minio/minio-go/v7/core.go b/vendor/github.com/minio/minio-go/v7/core.go index 2bf4edf016..26931f22d2 100644 --- a/vendor/github.com/minio/minio-go/v7/core.go +++ b/vendor/github.com/minio/minio-go/v7/core.go @@ -46,13 +46,13 @@ func NewCore(endpoint string, opts *Options) (*Core, error) { // ListObjects - List all the objects at a prefix, optionally with marker and delimiter // you can further filter the results. func (c Core) ListObjects(bucket, prefix, marker, delimiter string, maxKeys int) (result ListBucketResult, err error) { - return c.listObjectsQuery(context.Background(), bucket, prefix, marker, delimiter, maxKeys) + return c.listObjectsQuery(context.Background(), bucket, prefix, marker, delimiter, maxKeys, nil) } // ListObjectsV2 - Lists all the objects at a prefix, similar to ListObjects() but uses // continuationToken instead of marker to support iteration over the results. func (c Core) ListObjectsV2(bucketName, objectPrefix, continuationToken string, fetchOwner bool, delimiter string, maxkeys int) (ListBucketV2Result, error) { - return c.listObjectsV2Query(context.Background(), bucketName, objectPrefix, continuationToken, fetchOwner, false, delimiter, maxkeys) + return c.listObjectsV2Query(context.Background(), bucketName, objectPrefix, continuationToken, fetchOwner, false, delimiter, maxkeys, nil) } // CopyObject - copies an object from source object to destination object on server side. @@ -97,10 +97,10 @@ func (c Core) ListObjectParts(ctx context.Context, bucket, object, uploadID stri } // CompleteMultipartUpload - Concatenate uploaded parts and commit to an object. -func (c Core) CompleteMultipartUpload(ctx context.Context, bucket, object, uploadID string, parts []CompletePart) (string, error) { +func (c Core) CompleteMultipartUpload(ctx context.Context, bucket, object, uploadID string, parts []CompletePart, opts PutObjectOptions) (string, error) { res, err := c.completeMultipartUpload(ctx, bucket, object, uploadID, completeMultipartUpload{ Parts: parts, - }) + }, opts) return res.ETag, err } diff --git a/vendor/github.com/minio/minio-go/v7/functional_tests.go b/vendor/github.com/minio/minio-go/v7/functional_tests.go new file mode 100644 index 0000000000..6b329dd27b --- /dev/null +++ b/vendor/github.com/minio/minio-go/v7/functional_tests.go @@ -0,0 +1,11812 @@ +// +build mint + +/* + * MinIO Go Library for Amazon S3 Compatible Cloud Storage + * Copyright 2015-2020 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" + "context" + "errors" + "fmt" + "hash/crc32" + "io" + "io/ioutil" + "math/rand" + "mime/multipart" + "net/http" + "net/url" + "os" + "path/filepath" + "reflect" + "runtime" + "sort" + "strconv" + "strings" + "sync" + "time" + + "github.com/dustin/go-humanize" + jsoniter "github.com/json-iterator/go" + log "github.com/sirupsen/logrus" + + "github.com/minio/minio-go/v7" + "github.com/minio/minio-go/v7/pkg/credentials" + "github.com/minio/minio-go/v7/pkg/encrypt" + "github.com/minio/minio-go/v7/pkg/notification" + "github.com/minio/minio-go/v7/pkg/tags" +) + +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 +) +const ( + serverEndpoint = "SERVER_ENDPOINT" + accessKey = "ACCESS_KEY" + secretKey = "SECRET_KEY" + enableHTTPS = "ENABLE_HTTPS" + enableKMS = "ENABLE_KMS" +) + +type mintJSONFormatter struct { +} + +func (f *mintJSONFormatter) Format(entry *log.Entry) ([]byte, error) { + data := make(log.Fields, len(entry.Data)) + 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 + } + } + var json = jsoniter.ConfigCompatibleWithStandardLibrary + 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 +} + +var readFull = func(r io.Reader, buf []byte) (n int, err error) { + // ReadFull reads exactly len(buf) bytes from r into buf. + // It returns the number of bytes copied and an error if + // fewer bytes were read. The error is EOF only if no bytes + // were read. If an EOF happens after reading some but not + // all the bytes, ReadFull returns ErrUnexpectedEOF. + // On return, n == len(buf) if and only if err == nil. + // If r returns an error having read at least len(buf) bytes, + // the error is dropped. + for n < len(buf) && err == nil { + var nn int + nn, err = r.Read(buf[n:]) + // Some spurious io.Reader's return + // io.ErrUnexpectedEOF when nn == 0 + // this behavior is undocumented + // so we are on purpose not using io.ReadFull + // implementation because this can lead + // to custom handling, to avoid that + // we simply modify the original io.ReadFull + // implementation to avoid this issue. + // io.ErrUnexpectedEOF with nn == 0 really + // means that io.EOF + if err == io.ErrUnexpectedEOF && nn == 0 { + err = io.EOF + } + n += nn + } + if n >= len(buf) { + err = nil + } else if n > 0 && err == io.EOF { + err = io.ErrUnexpectedEOF + } + return +} + +func cleanEmptyEntries(fields log.Fields) log.Fields { + cleanFields := log.Fields{} + for k, v := range fields { + if v != "" { + cleanFields[k] = v + } + } + return cleanFields +} + +// log successful test runs +func successLogger(testName string, function string, args map[string]interface{}, startTime time.Time) *log.Entry { + // calculate the test case duration + duration := time.Since(startTime) + // log with the fields as per mint + fields := log.Fields{"name": "minio-go: " + testName, "function": function, "args": args, "duration": duration.Nanoseconds() / 1000000, "status": "PASS"} + return log.WithFields(cleanEmptyEntries(fields)) +} + +// As few of the features are not available in Gateway(s) currently, Check if err value is NotImplemented, +// and log as NA in that case and continue execution. Otherwise log as failure and return +func logError(testName string, function string, args map[string]interface{}, startTime time.Time, alert string, message string, err error) { + // If server returns NotImplemented we assume it is gateway mode and hence log it as info and move on to next tests + // Special case for ComposeObject API as it is implemented on client side and adds specific error details like `Error in upload-part-copy` in + // addition to NotImplemented error returned from server + if isErrNotImplemented(err) { + ignoredLog(testName, function, args, startTime, message).Info() + } else { + failureLog(testName, function, args, startTime, alert, message, err).Fatal() + } +} + +// log failed test runs +func failureLog(testName string, function string, args map[string]interface{}, startTime time.Time, alert string, message string, err error) *log.Entry { + // calculate the test case duration + duration := time.Since(startTime) + var fields log.Fields + // log with the fields as per mint + if err != nil { + fields = log.Fields{"name": "minio-go: " + testName, "function": function, "args": args, + "duration": duration.Nanoseconds() / 1000000, "status": "FAIL", "alert": alert, "message": message, "error": err} + } else { + fields = log.Fields{"name": "minio-go: " + testName, "function": function, "args": args, + "duration": duration.Nanoseconds() / 1000000, "status": "FAIL", "alert": alert, "message": message} + } + return log.WithFields(cleanEmptyEntries(fields)) +} + +// log not applicable test runs +func ignoredLog(testName string, function string, args map[string]interface{}, startTime time.Time, alert string) *log.Entry { + // calculate the test case duration + duration := time.Since(startTime) + // log with the fields as per mint + fields := log.Fields{"name": "minio-go: " + testName, "function": function, "args": args, + "duration": duration.Nanoseconds() / 1000000, "status": "NA", "alert": strings.Split(alert, " ")[0] + " is NotImplemented"} + return log.WithFields(cleanEmptyEntries(fields)) +} + +// Delete objects in given bucket, recursively +func cleanupBucket(bucketName string, c *minio.Client) error { + // Create a done channel to control 'ListObjectsV2' go routine. + doneCh := make(chan struct{}) + // Exit cleanly upon return. + defer close(doneCh) + // Iterate over all objects in the bucket via listObjectsV2 and delete + for objCh := range c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{Recursive: true}) { + if objCh.Err != nil { + return objCh.Err + } + if objCh.Key != "" { + err := c.RemoveObject(context.Background(), bucketName, objCh.Key, minio.RemoveObjectOptions{}) + if err != nil { + return err + } + } + } + for objPartInfo := range c.ListIncompleteUploads(context.Background(), bucketName, "", true) { + if objPartInfo.Err != nil { + return objPartInfo.Err + } + if objPartInfo.Key != "" { + err := c.RemoveIncompleteUpload(context.Background(), bucketName, objPartInfo.Key) + if err != nil { + return err + } + } + } + // objects are already deleted, clear the buckets now + err := c.RemoveBucket(context.Background(), bucketName) + if err != nil { + return err + } + return err +} + +func cleanupVersionedBucket(bucketName string, c *minio.Client) error { + doneCh := make(chan struct{}) + defer close(doneCh) + for obj := range c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) { + if obj.Err != nil { + return obj.Err + } + if obj.Key != "" { + err := c.RemoveObject(context.Background(), bucketName, obj.Key, + minio.RemoveObjectOptions{VersionID: obj.VersionID, GovernanceBypass: true}) + if err != nil { + return err + } + } + } + for objPartInfo := range c.ListIncompleteUploads(context.Background(), bucketName, "", true) { + if objPartInfo.Err != nil { + return objPartInfo.Err + } + if objPartInfo.Key != "" { + err := c.RemoveIncompleteUpload(context.Background(), bucketName, objPartInfo.Key) + if err != nil { + return err + } + } + } + // objects are already deleted, clear the buckets now + err := c.RemoveBucket(context.Background(), bucketName) + if err != nil { + for obj := range c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) { + log.Println("found", obj.Key, obj.VersionID) + } + return err + } + return err +} + +func isErrNotImplemented(err error) bool { + return minio.ToErrorResponse(err).Code == "NotImplemented" +} + +func init() { + // If server endpoint is not set, all tests default to + // using https://play.min.io + if os.Getenv(serverEndpoint) == "" { + os.Setenv(serverEndpoint, "play.min.io") + os.Setenv(accessKey, "Q3AM3UQ867SPQQA43P2F") + os.Setenv(secretKey, "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG") + os.Setenv(enableHTTPS, "1") + } +} + +var mintDataDir = os.Getenv("MINT_DATA_DIR") + +func getMintDataDirFilePath(filename string) (fp string) { + if mintDataDir == "" { + return + } + return filepath.Join(mintDataDir, filename) +} + +func newRandomReader(seed, size int64) io.Reader { + return io.LimitReader(rand.New(rand.NewSource(seed)), size) +} + +func mustCrcReader(r io.Reader) uint32 { + crc := crc32.NewIEEE() + _, err := io.Copy(crc, r) + if err != nil { + panic(err) + } + return crc.Sum32() +} + +func crcMatches(r io.Reader, want uint32) error { + crc := crc32.NewIEEE() + _, err := io.Copy(crc, r) + if err != nil { + panic(err) + } + got := crc.Sum32() + if got != want { + return fmt.Errorf("crc mismatch, want %x, got %x", want, got) + } + return nil +} + +func crcMatchesName(r io.Reader, name string) error { + want := dataFileCRC32[name] + crc := crc32.NewIEEE() + _, err := io.Copy(crc, r) + if err != nil { + panic(err) + } + got := crc.Sum32() + if got != want { + return fmt.Errorf("crc mismatch, want %x, got %x", want, got) + } + return nil +} + +// read data from file if it exists or optionally create a buffer of particular size +func getDataReader(fileName string) io.ReadCloser { + if mintDataDir == "" { + size := int64(dataFileMap[fileName]) + if _, ok := dataFileCRC32[fileName]; !ok { + dataFileCRC32[fileName] = mustCrcReader(newRandomReader(size, size)) + } + return ioutil.NopCloser(newRandomReader(size, size)) + } + reader, _ := os.Open(getMintDataDirFilePath(fileName)) + if _, ok := dataFileCRC32[fileName]; !ok { + dataFileCRC32[fileName] = mustCrcReader(reader) + reader.Close() + reader, _ = os.Open(getMintDataDirFilePath(fileName)) + } + return reader +} + +// 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)]) +} + +var dataFileMap = map[string]int{ + "datafile-0-b": 0, + "datafile-1-b": 1, + "datafile-1-kB": 1 * humanize.KiByte, + "datafile-10-kB": 10 * humanize.KiByte, + "datafile-33-kB": 33 * humanize.KiByte, + "datafile-100-kB": 100 * humanize.KiByte, + "datafile-1.03-MB": 1056 * humanize.KiByte, + "datafile-1-MB": 1 * humanize.MiByte, + "datafile-5-MB": 5 * humanize.MiByte, + "datafile-6-MB": 6 * humanize.MiByte, + "datafile-11-MB": 11 * humanize.MiByte, + "datafile-65-MB": 65 * humanize.MiByte, + "datafile-129-MB": 129 * humanize.MiByte, +} + +var dataFileCRC32 = map[string]uint32{} + +func isFullMode() bool { + return os.Getenv("MINT_MODE") == "full" +} + +func getFuncName() string { + return getFuncNameLoc(2) +} + +func getFuncNameLoc(caller int) string { + pc, _, _, _ := runtime.Caller(caller) + return strings.TrimPrefix(runtime.FuncForPC(pc).Name(), "main.") +} + +// Tests bucket re-create errors. +func testMakeBucketError() { + region := "eu-central-1" + + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "MakeBucket(bucketName, region)" + // initialize logging params + args := map[string]interface{}{ + "bucketName": "", + "region": region, + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket in 'eu-central-1'. + if err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: region}); err != nil { + logError(testName, function, args, startTime, "", "MakeBucket Failed", err) + return + } + defer cleanupBucket(bucketName, c) + + if err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: region}); err == nil { + logError(testName, function, args, startTime, "", "Bucket already exists", err) + return + } + // Verify valid error response from server. + if minio.ToErrorResponse(err).Code != "BucketAlreadyExists" && + minio.ToErrorResponse(err).Code != "BucketAlreadyOwnedByYou" { + logError(testName, function, args, startTime, "", "Invalid error returned by server", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testMetadataSizeLimit() { + startTime := time.Now() + testName := getFuncName() + function := "PutObject(bucketName, objectName, reader, objectSize, opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "opts.UserMetadata": "", + } + rand.Seed(startTime.Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client creation failed", err) + return + } + c.SetAppInfo("MinIO-go-FunctionalTest", "0.1.0") + + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + args["bucketName"] = bucketName + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + const HeaderSizeLimit = 8 * 1024 + const UserMetadataLimit = 2 * 1024 + + // Meta-data greater than the 2 KB limit of AWS - PUT calls with this meta-data should fail + metadata := make(map[string]string) + metadata["X-Amz-Meta-Mint-Test"] = string(bytes.Repeat([]byte("m"), 1+UserMetadataLimit-len("X-Amz-Meta-Mint-Test"))) + args["metadata"] = fmt.Sprint(metadata) + + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(nil), 0, minio.PutObjectOptions{UserMetadata: metadata}) + if err == nil { + logError(testName, function, args, startTime, "", "Created object with user-defined metadata exceeding metadata size limits", nil) + return + } + + // Meta-data (headers) greater than the 8 KB limit of AWS - PUT calls with this meta-data should fail + metadata = make(map[string]string) + metadata["X-Amz-Mint-Test"] = string(bytes.Repeat([]byte("m"), 1+HeaderSizeLimit-len("X-Amz-Mint-Test"))) + args["metadata"] = fmt.Sprint(metadata) + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(nil), 0, minio.PutObjectOptions{UserMetadata: metadata}) + if err == nil { + logError(testName, function, args, startTime, "", "Created object with headers exceeding header size limits", nil) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests various bucket supported formats. +func testMakeBucketRegions() { + region := "eu-central-1" + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "MakeBucket(bucketName, region)" + // initialize logging params + args := map[string]interface{}{ + "bucketName": "", + "region": region, + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket in 'eu-central-1'. + if err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: region}); err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + // Delete all objects and buckets + if err = cleanupBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + // Make a new bucket with '.' in its name, in 'us-west-2'. This + // request is internally staged into a path style instead of + // virtual host style. + region = "us-west-2" + args["region"] = region + if err = c.MakeBucket(context.Background(), bucketName+".withperiod", minio.MakeBucketOptions{Region: region}); err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + // Delete all objects and buckets + if err = cleanupBucket(bucketName+".withperiod", c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + successLogger(testName, function, args, startTime).Info() +} + +// Test PutObject using a large data to trigger multipart readat +func testPutObjectReadAt() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PutObject(bucketName, objectName, reader, opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "opts": "objectContentType", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + bufSize := dataFileMap["datafile-129-MB"] + var reader = getDataReader("datafile-129-MB") + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Object content type + objectContentType := "binary/octet-stream" + args["objectContentType"] = objectContentType + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: objectContentType}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "Get Object failed", err) + return + } + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat Object failed", err) + return + } + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Number of bytes in stat does not match, expected %d got %d", bufSize, st.Size), err) + return + } + if st.ContentType != objectContentType && st.ContentType != "application/octet-stream" { + logError(testName, function, args, startTime, "", "Content types don't match", err) + return + } + if err := crcMatchesName(r, "datafile-129-MB"); err != nil { + logError(testName, function, args, startTime, "", "data CRC check failed", err) + return + } + if err := r.Close(); err != nil { + logError(testName, function, args, startTime, "", "Object Close failed", err) + return + } + if err := r.Close(); err == nil { + logError(testName, function, args, startTime, "", "Object is already closed, didn't return error on Close", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testListObjectVersions() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "ListObjectVersions(bucketName, prefix, recursive)" + args := map[string]interface{}{ + "bucketName": "", + "prefix": "", + "recursive": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + err = c.EnableVersioning(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "Enable versioning failed", err) + return + } + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + bufSize := dataFileMap["datafile-10-kB"] + var reader = getDataReader("datafile-10-kB") + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + reader.Close() + + bufSize = dataFileMap["datafile-1-b"] + reader = getDataReader("datafile-1-b") + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + reader.Close() + + err = c.RemoveObject(context.Background(), bucketName, objectName, minio.RemoveObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "Unexpected object deletion", err) + return + } + + var deleteMarkers, versions int + + objectsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + for info := range objectsInfo { + if info.Err != nil { + logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err) + return + } + if info.Key != objectName { + logError(testName, function, args, startTime, "", "Unexpected object name in listing objects", nil) + return + } + if info.VersionID == "" { + logError(testName, function, args, startTime, "", "Unexpected version id in listing objects", nil) + return + } + if info.IsDeleteMarker { + deleteMarkers++ + if !info.IsLatest { + logError(testName, function, args, startTime, "", "Unexpected IsLatest field in listing objects", nil) + return + } + } else { + versions++ + } + } + + if deleteMarkers != 1 { + logError(testName, function, args, startTime, "", "Unexpected number of DeleteMarker elements in listing objects", nil) + return + } + + if versions != 2 { + logError(testName, function, args, startTime, "", "Unexpected number of Version elements in listing objects", nil) + return + } + + // Delete all objects and their versions as long as the bucket itself + if err = cleanupVersionedBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testStatObjectWithVersioning() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "StatObject" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + err = c.EnableVersioning(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "Enable versioning failed", err) + return + } + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + bufSize := dataFileMap["datafile-10-kB"] + var reader = getDataReader("datafile-10-kB") + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + reader.Close() + + bufSize = dataFileMap["datafile-1-b"] + reader = getDataReader("datafile-1-b") + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + reader.Close() + + objectsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + + var results []minio.ObjectInfo + for info := range objectsInfo { + if info.Err != nil { + logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err) + return + } + results = append(results, info) + } + + if len(results) != 2 { + logError(testName, function, args, startTime, "", "Unexpected number of Version elements in listing objects", nil) + return + } + + for i := 0; i < len(results); i++ { + opts := minio.StatObjectOptions{VersionID: results[i].VersionID} + statInfo, err := c.StatObject(context.Background(), bucketName, objectName, opts) + if err != nil { + logError(testName, function, args, startTime, "", "error during HEAD object", err) + return + } + if statInfo.VersionID == "" || statInfo.VersionID != results[i].VersionID { + logError(testName, function, args, startTime, "", "error during HEAD object, unexpected version id", err) + return + } + if statInfo.ETag != results[i].ETag { + logError(testName, function, args, startTime, "", "error during HEAD object, unexpected ETag", err) + return + } + if statInfo.LastModified.Unix() != results[i].LastModified.Unix() { + logError(testName, function, args, startTime, "", "error during HEAD object, unexpected Last-Modified", err) + return + } + if statInfo.Size != results[i].Size { + logError(testName, function, args, startTime, "", "error during HEAD object, unexpected Content-Length", err) + return + } + } + + // Delete all objects and their versions as long as the bucket itself + if err = cleanupVersionedBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testGetObjectWithVersioning() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject()" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + err = c.EnableVersioning(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "Enable versioning failed", err) + return + } + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Save the contents of datafiles to check with GetObject() reader output later + var buffers [][]byte + var testFiles = []string{"datafile-1-b", "datafile-10-kB"} + + for _, testFile := range testFiles { + r := getDataReader(testFile) + buf, err := ioutil.ReadAll(r) + if err != nil { + logError(testName, function, args, startTime, "", "unexpected failure", err) + return + } + r.Close() + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + buffers = append(buffers, buf) + } + + objectsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + + var results []minio.ObjectInfo + for info := range objectsInfo { + if info.Err != nil { + logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err) + return + } + results = append(results, info) + } + + if len(results) != 2 { + logError(testName, function, args, startTime, "", "Unexpected number of Version elements in listing objects", nil) + return + } + + sort.SliceStable(results, func(i, j int) bool { + return results[i].Size < results[j].Size + }) + + sort.SliceStable(buffers, func(i, j int) bool { + return len(buffers[i]) < len(buffers[j]) + }) + + for i := 0; i < len(results); i++ { + opts := minio.GetObjectOptions{VersionID: results[i].VersionID} + reader, err := c.GetObject(context.Background(), bucketName, objectName, opts) + if err != nil { + logError(testName, function, args, startTime, "", "error during GET object", err) + return + } + statInfo, err := reader.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "error during calling reader.Stat()", err) + return + } + if statInfo.ETag != results[i].ETag { + logError(testName, function, args, startTime, "", "error during HEAD object, unexpected ETag", err) + return + } + if statInfo.LastModified.Unix() != results[i].LastModified.Unix() { + logError(testName, function, args, startTime, "", "error during HEAD object, unexpected Last-Modified", err) + return + } + if statInfo.Size != results[i].Size { + logError(testName, function, args, startTime, "", "error during HEAD object, unexpected Content-Length", err) + return + } + + tmpBuffer := bytes.NewBuffer([]byte{}) + _, err = io.Copy(tmpBuffer, reader) + if err != nil { + logError(testName, function, args, startTime, "", "unexpected io.Copy()", err) + return + } + + if !bytes.Equal(tmpBuffer.Bytes(), buffers[i]) { + logError(testName, function, args, startTime, "", "unexpected content of GetObject()", err) + return + } + } + + // Delete all objects and their versions as long as the bucket itself + if err = cleanupVersionedBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testPutObjectWithVersioning() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject()" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + err = c.EnableVersioning(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "Enable versioning failed", err) + return + } + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + const n = 10 + // Read input... + + // Save the data concurrently. + var wg sync.WaitGroup + wg.Add(n) + var buffers = make([][]byte, n) + var errs [n]error + for i := 0; i < n; i++ { + r := newRandomReader(int64((1<<20)*i+i), int64(i)) + buf, err := ioutil.ReadAll(r) + if err != nil { + logError(testName, function, args, startTime, "", "unexpected failure", err) + return + } + buffers[i] = buf + + go func(i int) { + defer wg.Done() + _, errs[i] = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{PartSize: 5 << 20}) + }(i) + } + wg.Wait() + for _, err := range errs { + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + } + + objectsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + var results []minio.ObjectInfo + for info := range objectsInfo { + if info.Err != nil { + logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err) + return + } + results = append(results, info) + } + + if len(results) != n { + logError(testName, function, args, startTime, "", "Unexpected number of Version elements in listing objects", nil) + return + } + + sort.Slice(results, func(i, j int) bool { + return results[i].Size < results[j].Size + }) + + sort.Slice(buffers, func(i, j int) bool { + return len(buffers[i]) < len(buffers[j]) + }) + + for i := 0; i < len(results); i++ { + opts := minio.GetObjectOptions{VersionID: results[i].VersionID} + reader, err := c.GetObject(context.Background(), bucketName, objectName, opts) + if err != nil { + logError(testName, function, args, startTime, "", "error during GET object", err) + return + } + statInfo, err := reader.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "error during calling reader.Stat()", err) + return + } + if statInfo.ETag != results[i].ETag { + logError(testName, function, args, startTime, "", "error during HEAD object, unexpected ETag", err) + return + } + if statInfo.LastModified.Unix() != results[i].LastModified.Unix() { + logError(testName, function, args, startTime, "", "error during HEAD object, unexpected Last-Modified", err) + return + } + if statInfo.Size != results[i].Size { + logError(testName, function, args, startTime, "", "error during HEAD object, unexpected Content-Length", err) + return + } + + tmpBuffer := bytes.NewBuffer([]byte{}) + _, err = io.Copy(tmpBuffer, reader) + if err != nil { + logError(testName, function, args, startTime, "", "unexpected io.Copy()", err) + return + } + + if !bytes.Equal(tmpBuffer.Bytes(), buffers[i]) { + logError(testName, function, args, startTime, "", "unexpected content of GetObject()", err) + return + } + } + + // Delete all objects and their versions as long as the bucket itself + if err = cleanupVersionedBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testCopyObjectWithVersioning() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject()" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + err = c.EnableVersioning(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "Enable versioning failed", err) + return + } + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + var testFiles = []string{"datafile-1-b", "datafile-10-kB"} + for _, testFile := range testFiles { + r := getDataReader(testFile) + buf, err := ioutil.ReadAll(r) + if err != nil { + logError(testName, function, args, startTime, "", "unexpected failure", err) + return + } + r.Close() + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + } + + objectsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + var infos []minio.ObjectInfo + for info := range objectsInfo { + if info.Err != nil { + logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err) + return + } + infos = append(infos, info) + } + + sort.Slice(infos, func(i, j int) bool { + return infos[i].Size < infos[j].Size + }) + + reader, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{VersionID: infos[0].VersionID}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject of the oldest version content failed", err) + return + } + + oldestContent, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "Reading the oldest object version failed", err) + return + } + + // Copy Source + srcOpts := minio.CopySrcOptions{ + Bucket: bucketName, + Object: objectName, + VersionID: infos[0].VersionID, + } + args["src"] = srcOpts + + dstOpts := minio.CopyDestOptions{ + Bucket: bucketName, + Object: objectName + "-copy", + } + args["dst"] = dstOpts + + // Perform the Copy + if _, err = c.CopyObject(context.Background(), dstOpts, srcOpts); err != nil { + logError(testName, function, args, startTime, "", "CopyObject failed", err) + return + } + + // Destination object + readerCopy, err := c.GetObject(context.Background(), bucketName, objectName+"-copy", minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + defer readerCopy.Close() + + newestContent, err := ioutil.ReadAll(readerCopy) + if err != nil { + logError(testName, function, args, startTime, "", "Reading from GetObject reader failed", err) + return + } + + if len(newestContent) == 0 || !bytes.Equal(oldestContent, newestContent) { + logError(testName, function, args, startTime, "", "Unexpected destination object content", err) + return + } + + // Delete all objects and their versions as long as the bucket itself + if err = cleanupVersionedBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testConcurrentCopyObjectWithVersioning() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject()" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + err = c.EnableVersioning(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "Enable versioning failed", err) + return + } + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + var testFiles = []string{"datafile-10-kB"} + for _, testFile := range testFiles { + r := getDataReader(testFile) + buf, err := ioutil.ReadAll(r) + if err != nil { + logError(testName, function, args, startTime, "", "unexpected failure", err) + return + } + r.Close() + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + } + + objectsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + var infos []minio.ObjectInfo + for info := range objectsInfo { + if info.Err != nil { + logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err) + return + } + infos = append(infos, info) + } + + sort.Slice(infos, func(i, j int) bool { + return infos[i].Size < infos[j].Size + }) + + reader, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{VersionID: infos[0].VersionID}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject of the oldest version content failed", err) + return + } + + oldestContent, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "Reading the oldest object version failed", err) + return + } + + // Copy Source + srcOpts := minio.CopySrcOptions{ + Bucket: bucketName, + Object: objectName, + VersionID: infos[0].VersionID, + } + args["src"] = srcOpts + + dstOpts := minio.CopyDestOptions{ + Bucket: bucketName, + Object: objectName + "-copy", + } + args["dst"] = dstOpts + + // Perform the Copy concurrently + const n = 10 + var wg sync.WaitGroup + wg.Add(n) + var errs [n]error + for i := 0; i < n; i++ { + go func(i int) { + defer wg.Done() + _, errs[i] = c.CopyObject(context.Background(), dstOpts, srcOpts) + }(i) + } + wg.Wait() + for _, err := range errs { + if err != nil { + logError(testName, function, args, startTime, "", "CopyObject failed", err) + return + } + } + + objectsInfo = c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: false, Prefix: dstOpts.Object}) + infos = []minio.ObjectInfo{} + for info := range objectsInfo { + // Destination object + readerCopy, err := c.GetObject(context.Background(), bucketName, objectName+"-copy", minio.GetObjectOptions{VersionID: info.VersionID}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + defer readerCopy.Close() + + newestContent, err := ioutil.ReadAll(readerCopy) + if err != nil { + logError(testName, function, args, startTime, "", "Reading from GetObject reader failed", err) + return + } + + if len(newestContent) == 0 || !bytes.Equal(oldestContent, newestContent) { + logError(testName, function, args, startTime, "", "Unexpected destination object content", err) + return + } + infos = append(infos, info) + } + + if len(infos) != n { + logError(testName, function, args, startTime, "", "Unexpected number of Version elements in listing objects", nil) + return + } + + // Delete all objects and their versions as long as the bucket itself + if err = cleanupVersionedBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testComposeObjectWithVersioning() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "ComposeObject()" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + err = c.EnableVersioning(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "Enable versioning failed", err) + return + } + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // var testFiles = []string{"datafile-5-MB", "datafile-10-kB"} + var testFiles = []string{"datafile-5-MB", "datafile-10-kB"} + var testFilesBytes [][]byte + + for _, testFile := range testFiles { + r := getDataReader(testFile) + buf, err := ioutil.ReadAll(r) + if err != nil { + logError(testName, function, args, startTime, "", "unexpected failure", err) + return + } + r.Close() + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + testFilesBytes = append(testFilesBytes, buf) + } + + objectsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + + var results []minio.ObjectInfo + for info := range objectsInfo { + if info.Err != nil { + logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err) + return + } + results = append(results, info) + } + + sort.SliceStable(results, func(i, j int) bool { + return results[i].Size > results[j].Size + }) + + // Source objects to concatenate. We also specify decryption + // key for each + src1 := minio.CopySrcOptions{ + Bucket: bucketName, + Object: objectName, + VersionID: results[0].VersionID, + } + + src2 := minio.CopySrcOptions{ + Bucket: bucketName, + Object: objectName, + VersionID: results[1].VersionID, + } + + dst := minio.CopyDestOptions{ + Bucket: bucketName, + Object: objectName + "-copy", + } + + _, err = c.ComposeObject(context.Background(), dst, src1, src2) + if err != nil { + logError(testName, function, args, startTime, "", "ComposeObject failed", err) + return + } + + // Destination object + readerCopy, err := c.GetObject(context.Background(), bucketName, objectName+"-copy", minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject of the copy object failed", err) + return + } + defer readerCopy.Close() + + copyContentBytes, err := ioutil.ReadAll(readerCopy) + if err != nil { + logError(testName, function, args, startTime, "", "Reading from the copy object reader failed", err) + return + } + + var expectedContent []byte + for _, fileBytes := range testFilesBytes { + expectedContent = append(expectedContent, fileBytes...) + } + + if len(copyContentBytes) == 0 || !bytes.Equal(copyContentBytes, expectedContent) { + logError(testName, function, args, startTime, "", "Unexpected destination object content", err) + return + } + + // Delete all objects and their versions as long as the bucket itself + if err = cleanupVersionedBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testRemoveObjectWithVersioning() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "DeleteObject()" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + err = c.EnableVersioning(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "Enable versioning failed", err) + return + } + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + _, err = c.PutObject(context.Background(), bucketName, objectName, getDataReader("datafile-10-kB"), int64(dataFileMap["datafile-10-kB"]), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + objectsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + var version minio.ObjectInfo + for info := range objectsInfo { + if info.Err != nil { + logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err) + return + } + version = info + break + } + + err = c.RemoveObject(context.Background(), bucketName, objectName, minio.RemoveObjectOptions{VersionID: version.VersionID}) + if err != nil { + logError(testName, function, args, startTime, "", "DeleteObject failed", err) + return + } + + objectsInfo = c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + for range objectsInfo { + logError(testName, function, args, startTime, "", "Unexpected versioning info, should not have any one ", err) + return + } + + err = c.RemoveBucket(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testRemoveObjectsWithVersioning() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "DeleteObjects()" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + err = c.EnableVersioning(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "Enable versioning failed", err) + return + } + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + _, err = c.PutObject(context.Background(), bucketName, objectName, getDataReader("datafile-10-kB"), int64(dataFileMap["datafile-10-kB"]), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + objectsVersions := make(chan minio.ObjectInfo) + go func() { + objectsVersionsInfo := c.ListObjects(context.Background(), bucketName, + minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + for info := range objectsVersionsInfo { + if info.Err != nil { + logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err) + return + } + objectsVersions <- info + } + close(objectsVersions) + }() + + removeErrors := c.RemoveObjects(context.Background(), bucketName, objectsVersions, minio.RemoveObjectsOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "DeleteObjects call failed", err) + return + } + + for e := range removeErrors { + if e.Err != nil { + logError(testName, function, args, startTime, "", "Single delete operation failed", err) + return + } + } + + objectsVersionsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + for range objectsVersionsInfo { + logError(testName, function, args, startTime, "", "Unexpected versioning info, should not have any one ", err) + return + } + + err = c.RemoveBucket(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testObjectTaggingWithVersioning() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "{Get,Set,Remove}ObjectTagging()" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + err = c.EnableVersioning(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "Enable versioning failed", err) + return + } + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + for _, file := range []string{"datafile-1-b", "datafile-10-kB"} { + _, err = c.PutObject(context.Background(), bucketName, objectName, getDataReader(file), int64(dataFileMap[file]), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + } + + versionsInfo := c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{WithVersions: true, Recursive: true}) + + var versions []minio.ObjectInfo + for info := range versionsInfo { + if info.Err != nil { + logError(testName, function, args, startTime, "", "Unexpected error during listing objects", err) + return + } + versions = append(versions, info) + } + + sort.SliceStable(versions, func(i, j int) bool { + return versions[i].Size < versions[j].Size + }) + + tagsV1 := map[string]string{"key1": "val1"} + t1, err := tags.MapToObjectTags(tagsV1) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectTagging (1) failed", err) + return + } + + err = c.PutObjectTagging(context.Background(), bucketName, objectName, t1, minio.PutObjectTaggingOptions{VersionID: versions[0].VersionID}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectTagging (1) failed", err) + return + } + + tagsV2 := map[string]string{"key2": "val2"} + t2, err := tags.MapToObjectTags(tagsV2) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectTagging (1) failed", err) + return + } + + err = c.PutObjectTagging(context.Background(), bucketName, objectName, t2, minio.PutObjectTaggingOptions{VersionID: versions[1].VersionID}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectTagging (2) failed", err) + return + } + + tagsEqual := func(tags1, tags2 map[string]string) bool { + for k1, v1 := range tags1 { + v2, found := tags2[k1] + if found { + if v1 != v2 { + return false + } + } + } + return true + } + + gotTagsV1, err := c.GetObjectTagging(context.Background(), bucketName, objectName, minio.GetObjectTaggingOptions{VersionID: versions[0].VersionID}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObjectTagging failed", err) + return + } + + if !tagsEqual(t1.ToMap(), gotTagsV1.ToMap()) { + logError(testName, function, args, startTime, "", "Unexpected tags content (1)", err) + return + } + + gotTagsV2, err := c.GetObjectTagging(context.Background(), bucketName, objectName, minio.GetObjectTaggingOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObjectTaggingContext failed", err) + return + } + + if !tagsEqual(t2.ToMap(), gotTagsV2.ToMap()) { + logError(testName, function, args, startTime, "", "Unexpected tags content (2)", err) + return + } + + err = c.RemoveObjectTagging(context.Background(), bucketName, objectName, minio.RemoveObjectTaggingOptions{VersionID: versions[0].VersionID}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectTagging (2) failed", err) + return + } + + emptyTags, err := c.GetObjectTagging(context.Background(), bucketName, objectName, + minio.GetObjectTaggingOptions{VersionID: versions[0].VersionID}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObjectTagging failed", err) + return + } + + if len(emptyTags.ToMap()) != 0 { + logError(testName, function, args, startTime, "", "Unexpected tags content (2)", err) + return + } + + // Delete all objects and their versions as long as the bucket itself + if err = cleanupVersionedBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test PutObject using a large data to trigger multipart readat +func testPutObjectWithMetadata() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PutObject(bucketName, objectName, reader,size, opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "opts": "minio.PutObjectOptions{UserMetadata: metadata, Progress: progress}", + } + + if !isFullMode() { + ignoredLog(testName, function, args, startTime, "Skipping functional tests for short/quick runs").Info() + return + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "Make bucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + bufSize := dataFileMap["datafile-129-MB"] + var reader = getDataReader("datafile-129-MB") + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Object custom metadata + customContentType := "custom/contenttype" + + args["metadata"] = map[string][]string{ + "Content-Type": {customContentType}, + "X-Amz-Meta-CustomKey": {"extra spaces in value"}, + } + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ + ContentType: customContentType}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes returned by PutObject does not match GetObject, expected "+string(bufSize)+" got "+string(st.Size), err) + return + } + if st.ContentType != customContentType && st.ContentType != "application/octet-stream" { + logError(testName, function, args, startTime, "", "ContentType does not match, expected "+customContentType+" got "+st.ContentType, err) + return + } + if err := crcMatchesName(r, "datafile-129-MB"); err != nil { + logError(testName, function, args, startTime, "", "data CRC check failed", err) + return + } + if err := r.Close(); err != nil { + logError(testName, function, args, startTime, "", "Object Close failed", err) + return + } + if err := r.Close(); err == nil { + logError(testName, function, args, startTime, "", "Object already closed, should respond with error", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testPutObjectWithContentLanguage() { + // initialize logging params + objectName := "test-object" + startTime := time.Now() + testName := getFuncName() + function := "PutObject(bucketName, objectName, reader, size, opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": objectName, + "size": -1, + "opts": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + data := []byte{} + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(data), int64(0), minio.PutObjectOptions{ + ContentLanguage: "en", + }) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + objInfo, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + + if objInfo.Metadata.Get("Content-Language") != "en" { + logError(testName, function, args, startTime, "", "Expected content-language 'en' doesn't match with StatObject return value", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test put object with streaming signature. +func testPutObjectStreaming() { + // initialize logging params + objectName := "test-object" + startTime := time.Now() + testName := getFuncName() + function := "PutObject(bucketName, objectName, reader,size,opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": objectName, + "size": -1, + "opts": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Upload an object. + sizes := []int64{0, 64*1024 - 1, 64 * 1024} + + for _, size := range sizes { + data := newRandomReader(size, size) + ui, err := c.PutObject(context.Background(), bucketName, objectName, data, int64(size), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectStreaming failed", err) + return + } + + if ui.Size != size { + logError(testName, function, args, startTime, "", "PutObjectStreaming result has unexpected size", nil) + return + } + + objInfo, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + if objInfo.Size != size { + logError(testName, function, args, startTime, "", "Unexpected size", err) + return + } + + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test get object seeker from the end, using whence set to '2'. +func testGetObjectSeekEnd() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate 33K of data. + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes read does not match, expected "+string(int64(bufSize))+" got "+string(st.Size), err) + return + } + + pos, err := r.Seek(-100, 2) + if err != nil { + logError(testName, function, args, startTime, "", "Object Seek failed", err) + return + } + if pos != st.Size-100 { + logError(testName, function, args, startTime, "", "Incorrect position", err) + return + } + buf2 := make([]byte, 100) + m, err := readFull(r, buf2) + if err != nil { + logError(testName, function, args, startTime, "", "Error reading through readFull", err) + return + } + if m != len(buf2) { + logError(testName, function, args, startTime, "", "Number of bytes dont match, expected "+string(len(buf2))+" got "+string(m), err) + return + } + hexBuf1 := fmt.Sprintf("%02x", buf[len(buf)-100:]) + hexBuf2 := fmt.Sprintf("%02x", buf2[:m]) + if hexBuf1 != hexBuf2 { + logError(testName, function, args, startTime, "", "Values at same index dont match", err) + return + } + pos, err = r.Seek(-100, 2) + if err != nil { + logError(testName, function, args, startTime, "", "Object Seek failed", err) + return + } + if pos != st.Size-100 { + logError(testName, function, args, startTime, "", "Incorrect position", err) + return + } + if err = r.Close(); err != nil { + logError(testName, function, args, startTime, "", "ObjectClose failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test get object reader to not throw error on being closed twice. +func testGetObjectClosedTwice() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate 33K of data. + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes in stat does not match, expected "+string(int64(bufSize))+" got "+string(st.Size), err) + return + } + if err := crcMatchesName(r, "datafile-33-kB"); err != nil { + logError(testName, function, args, startTime, "", "data CRC check failed", err) + return + } + if err := r.Close(); err != nil { + logError(testName, function, args, startTime, "", "Object Close failed", err) + return + } + if err := r.Close(); err == nil { + logError(testName, function, args, startTime, "", "Already closed object. No error returned", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test RemoveObjects request where context cancels after timeout +func testRemoveObjectsContext() { + // Initialize logging params. + startTime := time.Now() + testName := getFuncName() + function := "RemoveObjects(ctx, bucketName, objectsCh)" + args := map[string]interface{}{ + "bucketName": "", + } + + // Seed random based on current tie. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // Set user agent. + c.SetAppInfo("MinIO-go-FunctionalTest", "0.1.0") + // Enable tracing, write to stdout. + // c.TraceOn(os.Stderr) + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate put data. + r := bytes.NewReader(bytes.Repeat([]byte("a"), 8)) + + // Multi remove of 20 objects. + nrObjects := 20 + objectsCh := make(chan minio.ObjectInfo) + go func() { + defer close(objectsCh) + for i := 0; i < nrObjects; i++ { + objectName := "sample" + strconv.Itoa(i) + ".txt" + info, err := c.PutObject(context.Background(), bucketName, objectName, r, 8, + minio.PutObjectOptions{ContentType: "application/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + continue + } + objectsCh <- minio.ObjectInfo{ + Key: info.Key, + VersionID: info.VersionID, + } + } + }() + // Set context to cancel in 1 nanosecond. + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Nanosecond) + args["ctx"] = ctx + defer cancel() + + // Call RemoveObjects API with short timeout. + errorCh := c.RemoveObjects(ctx, bucketName, objectsCh, minio.RemoveObjectsOptions{}) + // Check for error. + select { + case r := <-errorCh: + if r.Err == nil { + logError(testName, function, args, startTime, "", "RemoveObjects should fail on short timeout", err) + return + } + } + // Set context with longer timeout. + ctx, cancel = context.WithTimeout(context.Background(), 1*time.Hour) + args["ctx"] = ctx + defer cancel() + // Perform RemoveObjects with the longer timeout. Expect the removals to succeed. + errorCh = c.RemoveObjects(ctx, bucketName, objectsCh, minio.RemoveObjectsOptions{}) + select { + case r, more := <-errorCh: + if more || r.Err != nil { + logError(testName, function, args, startTime, "", "Unexpected error", r.Err) + return + } + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test removing multiple objects with Remove API +func testRemoveMultipleObjects() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "RemoveObjects(bucketName, objectsCh)" + args := map[string]interface{}{ + "bucketName": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // Set user agent. + c.SetAppInfo("MinIO-go-FunctionalTest", "0.1.0") + + // Enable tracing, write to stdout. + // c.TraceOn(os.Stderr) + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + r := bytes.NewReader(bytes.Repeat([]byte("a"), 8)) + + // Multi remove of 1100 objects + nrObjects := 200 + + objectsCh := make(chan minio.ObjectInfo) + + go func() { + defer close(objectsCh) + // Upload objects and send them to objectsCh + for i := 0; i < nrObjects; i++ { + objectName := "sample" + strconv.Itoa(i) + ".txt" + info, err := c.PutObject(context.Background(), bucketName, objectName, r, 8, + minio.PutObjectOptions{ContentType: "application/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + continue + } + objectsCh <- minio.ObjectInfo{ + Key: info.Key, + VersionID: info.VersionID, + } + } + }() + + // Call RemoveObjects API + errorCh := c.RemoveObjects(context.Background(), bucketName, objectsCh, minio.RemoveObjectsOptions{}) + + // Check if errorCh doesn't receive any error + select { + case r, more := <-errorCh: + if more { + logError(testName, function, args, startTime, "", "Unexpected error", r.Err) + return + } + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests FPutObject of a big file to trigger multipart +func testFPutObjectMultipart() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "FPutObject(bucketName, objectName, fileName, opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "fileName": "", + "opts": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Upload 4 parts to utilize all 3 'workers' in multipart and still have a part to upload. + var fileName = getMintDataDirFilePath("datafile-129-MB") + if fileName == "" { + // Make a temp file with minPartSize bytes of data. + file, err := ioutil.TempFile(os.TempDir(), "FPutObjectTest") + if err != nil { + logError(testName, function, args, startTime, "", "TempFile creation failed", err) + return + } + // Upload 2 parts to utilize all 3 'workers' in multipart and still have a part to upload. + if _, err = io.Copy(file, getDataReader("datafile-129-MB")); err != nil { + logError(testName, function, args, startTime, "", "Copy failed", err) + return + } + if err = file.Close(); err != nil { + logError(testName, function, args, startTime, "", "File Close failed", err) + return + } + fileName = file.Name() + args["fileName"] = fileName + } + totalSize := dataFileMap["datafile-129-MB"] + // Set base object name + objectName := bucketName + "FPutObject" + "-standard" + args["objectName"] = objectName + + objectContentType := "testapplication/octet-stream" + args["objectContentType"] = objectContentType + + // Perform standard FPutObject with contentType provided (Expecting application/octet-stream) + _, err = c.FPutObject(context.Background(), bucketName, objectName, fileName, minio.PutObjectOptions{ContentType: objectContentType}) + if err != nil { + logError(testName, function, args, startTime, "", "FPutObject failed", err) + return + } + + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + objInfo, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Unexpected error", err) + return + } + if objInfo.Size != int64(totalSize) { + logError(testName, function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(totalSize))+" got "+string(objInfo.Size), err) + return + } + if objInfo.ContentType != objectContentType && objInfo.ContentType != "application/octet-stream" { + logError(testName, function, args, startTime, "", "ContentType doesn't match", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests FPutObject with null contentType (default = application/octet-stream) +func testFPutObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "FPutObject(bucketName, objectName, fileName, opts)" + + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "fileName": "", + "opts": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + location := "us-east-1" + + // Make a new bucket. + args["bucketName"] = bucketName + args["location"] = location + function = "MakeBucket(bucketName, location)" + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: location}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Upload 3 parts worth of data to use all 3 of multiparts 'workers' and have an extra part. + // Use different data in part for multipart tests to check parts are uploaded in correct order. + var fName = getMintDataDirFilePath("datafile-129-MB") + if fName == "" { + // Make a temp file with minPartSize bytes of data. + file, err := ioutil.TempFile(os.TempDir(), "FPutObjectTest") + if err != nil { + logError(testName, function, args, startTime, "", "TempFile creation failed", err) + return + } + + // Upload 3 parts to utilize all 3 'workers' in multipart and still have a part to upload. + if _, err = io.Copy(file, getDataReader("datafile-129-MB")); err != nil { + logError(testName, function, args, startTime, "", "File copy failed", err) + return + } + // Close the file pro-actively for windows. + if err = file.Close(); err != nil { + logError(testName, function, args, startTime, "", "File close failed", err) + return + } + defer os.Remove(file.Name()) + fName = file.Name() + } + + // Set base object name + function = "FPutObject(bucketName, objectName, fileName, opts)" + objectName := bucketName + "FPutObject" + args["objectName"] = objectName + "-standard" + args["fileName"] = fName + args["opts"] = minio.PutObjectOptions{ContentType: "application/octet-stream"} + + // Perform standard FPutObject with contentType provided (Expecting application/octet-stream) + ui, err := c.FPutObject(context.Background(), bucketName, objectName+"-standard", fName, minio.PutObjectOptions{ContentType: "application/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "FPutObject failed", err) + return + } + + if ui.Size != int64(dataFileMap["datafile-129-MB"]) { + logError(testName, function, args, startTime, "", "FPutObject returned an unexpected upload size", err) + return + } + + // Perform FPutObject with no contentType provided (Expecting application/octet-stream) + args["objectName"] = objectName + "-Octet" + _, err = c.FPutObject(context.Background(), bucketName, objectName+"-Octet", fName, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "File close failed", err) + return + } + + srcFile, err := os.Open(fName) + if err != nil { + logError(testName, function, args, startTime, "", "File open failed", err) + return + } + defer srcFile.Close() + // Add extension to temp file name + tmpFile, err := os.Create(fName + ".gtar") + if err != nil { + logError(testName, function, args, startTime, "", "File create failed", err) + return + } + _, err = io.Copy(tmpFile, srcFile) + if err != nil { + logError(testName, function, args, startTime, "", "File copy failed", err) + return + } + tmpFile.Close() + + // Perform FPutObject with no contentType provided (Expecting application/x-gtar) + args["objectName"] = objectName + "-GTar" + args["opts"] = minio.PutObjectOptions{} + _, err = c.FPutObject(context.Background(), bucketName, objectName+"-GTar", fName+".gtar", minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "FPutObject failed", err) + return + } + + // Check headers + function = "StatObject(bucketName, objectName, opts)" + args["objectName"] = objectName + "-standard" + rStandard, err := c.StatObject(context.Background(), bucketName, objectName+"-standard", minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + if rStandard.ContentType != "application/octet-stream" { + logError(testName, function, args, startTime, "", "ContentType does not match, expected application/octet-stream, got "+rStandard.ContentType, err) + return + } + + function = "StatObject(bucketName, objectName, opts)" + args["objectName"] = objectName + "-Octet" + rOctet, err := c.StatObject(context.Background(), bucketName, objectName+"-Octet", minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + if rOctet.ContentType != "application/octet-stream" { + logError(testName, function, args, startTime, "", "ContentType does not match, expected application/octet-stream, got "+rOctet.ContentType, err) + return + } + + function = "StatObject(bucketName, objectName, opts)" + args["objectName"] = objectName + "-GTar" + rGTar, err := c.StatObject(context.Background(), bucketName, objectName+"-GTar", minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + if rGTar.ContentType != "application/x-gtar" && rGTar.ContentType != "application/octet-stream" { + logError(testName, function, args, startTime, "", "ContentType does not match, expected application/x-gtar or application/octet-stream, got "+rGTar.ContentType, err) + return + } + + os.Remove(fName + ".gtar") + successLogger(testName, function, args, startTime).Info() +} + +// Tests FPutObject request when context cancels after timeout +func testFPutObjectContext() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "FPutObject(bucketName, objectName, fileName, opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "fileName": "", + "opts": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Upload 1 parts worth of data to use multipart upload. + // Use different data in part for multipart tests to check parts are uploaded in correct order. + var fName = getMintDataDirFilePath("datafile-1-MB") + if fName == "" { + // Make a temp file with 1 MiB bytes of data. + file, err := ioutil.TempFile(os.TempDir(), "FPutObjectContextTest") + if err != nil { + logError(testName, function, args, startTime, "", "TempFile creation failed", err) + return + } + + // Upload 1 parts to trigger multipart upload + if _, err = io.Copy(file, getDataReader("datafile-1-MB")); err != nil { + logError(testName, function, args, startTime, "", "File copy failed", err) + return + } + // Close the file pro-actively for windows. + if err = file.Close(); err != nil { + logError(testName, function, args, startTime, "", "File close failed", err) + return + } + defer os.Remove(file.Name()) + fName = file.Name() + } + + // Set base object name + objectName := bucketName + "FPutObjectContext" + args["objectName"] = objectName + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Nanosecond) + args["ctx"] = ctx + defer cancel() + + // Perform FPutObject with contentType provided (Expecting application/octet-stream) + _, err = c.FPutObject(ctx, bucketName, objectName+"-Shorttimeout", fName, minio.PutObjectOptions{ContentType: "application/octet-stream"}) + if err == nil { + logError(testName, function, args, startTime, "", "FPutObject should fail on short timeout", err) + return + } + ctx, cancel = context.WithTimeout(context.Background(), 1*time.Hour) + defer cancel() + // Perform FPutObject with a long timeout. Expect the put object to succeed + _, err = c.FPutObject(ctx, bucketName, objectName+"-Longtimeout", fName, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "FPutObject shouldn't fail on long timeout", err) + return + } + + _, err = c.StatObject(context.Background(), bucketName, objectName+"-Longtimeout", minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() + +} + +// Tests FPutObject request when context cancels after timeout +func testFPutObjectContextV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "FPutObjectContext(ctx, bucketName, objectName, fileName, opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "opts": "minio.PutObjectOptions{ContentType:objectContentType}", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Upload 1 parts worth of data to use multipart upload. + // Use different data in part for multipart tests to check parts are uploaded in correct order. + var fName = getMintDataDirFilePath("datafile-1-MB") + if fName == "" { + // Make a temp file with 1 MiB bytes of data. + file, err := ioutil.TempFile(os.TempDir(), "FPutObjectContextTest") + if err != nil { + logError(testName, function, args, startTime, "", "Temp file creation failed", err) + return + } + + // Upload 1 parts to trigger multipart upload + if _, err = io.Copy(file, getDataReader("datafile-1-MB")); err != nil { + logError(testName, function, args, startTime, "", "File copy failed", err) + return + } + + // Close the file pro-actively for windows. + if err = file.Close(); err != nil { + logError(testName, function, args, startTime, "", "File close failed", err) + return + } + defer os.Remove(file.Name()) + fName = file.Name() + } + + // Set base object name + objectName := bucketName + "FPutObjectContext" + args["objectName"] = objectName + + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Nanosecond) + args["ctx"] = ctx + defer cancel() + + // Perform FPutObject with contentType provided (Expecting application/octet-stream) + _, err = c.FPutObject(ctx, bucketName, objectName+"-Shorttimeout", fName, minio.PutObjectOptions{ContentType: "application/octet-stream"}) + if err == nil { + logError(testName, function, args, startTime, "", "FPutObject should fail on short timeout", err) + return + } + ctx, cancel = context.WithTimeout(context.Background(), 1*time.Hour) + defer cancel() + // Perform FPutObject with a long timeout. Expect the put object to succeed + _, err = c.FPutObject(ctx, bucketName, objectName+"-Longtimeout", fName, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "FPutObject shouldn't fail on longer timeout", err) + return + } + + _, err = c.StatObject(context.Background(), bucketName, objectName+"-Longtimeout", minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() + +} + +// Test validates putObject with context to see if request cancellation is honored. +func testPutObjectContext() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PutObject(ctx, bucketName, objectName, fileName, opts)" + args := map[string]interface{}{ + "ctx": "", + "bucketName": "", + "objectName": "", + "opts": "", + } + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("MinIO-go-FunctionalTest", "0.1.0") + + // Make a new bucket. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + args["bucketName"] = bucketName + + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket call failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + objectName := fmt.Sprintf("test-file-%v", rand.Uint32()) + args["objectName"] = objectName + + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Nanosecond) + cancel() + args["ctx"] = ctx + args["opts"] = minio.PutObjectOptions{ContentType: "binary/octet-stream"} + + _, err = c.PutObject(ctx, bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err == nil { + logError(testName, function, args, startTime, "", "PutObject should fail on short timeout", err) + return + } + + ctx, cancel = context.WithTimeout(context.Background(), 1*time.Hour) + args["ctx"] = ctx + + defer cancel() + reader = getDataReader("datafile-33-kB") + defer reader.Close() + _, err = c.PutObject(ctx, bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject with long timeout failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() + +} + +// Tests get object ReaderSeeker interface methods. +func testGetObjectReadSeekFunctional() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer func() { + // Delete all objects and buckets + if err = cleanupBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + }() + + // Generate 33K of data. + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + // Save the data + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat object failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(bufSize))+", got "+string(st.Size), err) + return + } + + // This following function helps us to compare data from the reader after seek + // with the data from the original buffer + cmpData := func(r io.Reader, start, end int) { + if end-start == 0 { + return + } + buffer := bytes.NewBuffer([]byte{}) + if _, err := io.CopyN(buffer, r, int64(bufSize)); err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "CopyN failed", err) + return + } + } + if !bytes.Equal(buf[start:end], buffer.Bytes()) { + logError(testName, function, args, startTime, "", "Incorrect read bytes v/s original buffer", err) + return + } + } + + // Generic seek error for errors other than io.EOF + seekErr := errors.New("seek error") + + testCases := []struct { + offset int64 + whence int + pos int64 + err error + shouldCmp bool + start int + end int + }{ + // Start from offset 0, fetch data and compare + {0, 0, 0, nil, true, 0, 0}, + // Start from offset 2048, fetch data and compare + {2048, 0, 2048, nil, true, 2048, bufSize}, + // Start from offset larger than possible + {int64(bufSize) + 1024, 0, 0, seekErr, false, 0, 0}, + // Move to offset 0 without comparing + {0, 0, 0, nil, false, 0, 0}, + // Move one step forward and compare + {1, 1, 1, nil, true, 1, bufSize}, + // Move larger than possible + {int64(bufSize), 1, 0, seekErr, false, 0, 0}, + // Provide negative offset with CUR_SEEK + {int64(-1), 1, 0, seekErr, false, 0, 0}, + // Test with whence SEEK_END and with positive offset + {1024, 2, int64(bufSize) - 1024, io.EOF, true, 0, 0}, + // Test with whence SEEK_END and with negative offset + {-1024, 2, int64(bufSize) - 1024, nil, true, bufSize - 1024, bufSize}, + // Test with whence SEEK_END and with large negative offset + {-int64(bufSize) * 2, 2, 0, seekErr, true, 0, 0}, + } + + for i, testCase := range testCases { + // Perform seek operation + n, err := r.Seek(testCase.offset, testCase.whence) + // We expect an error + if testCase.err == seekErr && err == nil { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", unexpected err value: expected: "+testCase.err.Error()+", found: "+err.Error(), err) + return + } + // We expect a specific error + if testCase.err != seekErr && testCase.err != err { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", unexpected err value: expected: "+testCase.err.Error()+", found: "+err.Error(), err) + return + } + // If we expect an error go to the next loop + if testCase.err != nil { + continue + } + // Check the returned seek pos + if n != testCase.pos { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", number of bytes seeked does not match, expected "+string(testCase.pos)+", got "+string(n), err) + return + } + // Compare only if shouldCmp is activated + if testCase.shouldCmp { + cmpData(r, testCase.start, testCase.end) + } + } + successLogger(testName, function, args, startTime).Info() +} + +// Tests get object ReaderAt interface methods. +func testGetObjectReadAtFunctional() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate 33K of data. + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + // Save the data + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + offset := int64(2048) + + // read directly + buf1 := make([]byte, 512) + buf2 := make([]byte, 512) + buf3 := make([]byte, 512) + buf4 := make([]byte, 512) + + // Test readAt before stat is called such that objectInfo doesn't change. + m, err := r.ReadAt(buf1, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf1) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf1))+", got "+string(m), err) + return + } + if !bytes.Equal(buf1, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + offset += 512 + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes in stat does not match, expected "+string(int64(bufSize))+", got "+string(st.Size), err) + return + } + + m, err = r.ReadAt(buf2, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf2) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf2))+", got "+string(m), err) + return + } + if !bytes.Equal(buf2, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + + offset += 512 + m, err = r.ReadAt(buf3, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf3) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf3))+", got "+string(m), err) + return + } + if !bytes.Equal(buf3, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + offset += 512 + m, err = r.ReadAt(buf4, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf4) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf4))+", got "+string(m), err) + return + } + if !bytes.Equal(buf4, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + + buf5 := make([]byte, len(buf)) + // Read the whole object. + m, err = r.ReadAt(buf5, 0) + if err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + } + if m != len(buf5) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf5))+", got "+string(m), err) + return + } + if !bytes.Equal(buf, buf5) { + logError(testName, function, args, startTime, "", "Incorrect data read in GetObject, than what was previously uploaded", err) + return + } + + buf6 := make([]byte, len(buf)+1) + // Read the whole object and beyond. + _, err = r.ReadAt(buf6, 0) + if err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + } + + successLogger(testName, function, args, startTime).Info() +} + +// Reproduces issue https://github.com/minio/minio-go/issues/1137 +func testGetObjectReadAtWhenEOFWasReached() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate 33K of data. + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + // Save the data + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // read directly + buf1 := make([]byte, len(buf)) + buf2 := make([]byte, 512) + + m, err := r.Read(buf1) + if err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "Read failed", err) + return + } + } + if m != len(buf1) { + logError(testName, function, args, startTime, "", "Read read shorter bytes before reaching EOF, expected "+string(len(buf1))+", got "+string(m), err) + return + } + if !bytes.Equal(buf1, buf) { + logError(testName, function, args, startTime, "", "Incorrect count of Read data", err) + return + } + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes in stat does not match, expected "+string(int64(bufSize))+", got "+string(st.Size), err) + return + } + + m, err = r.ReadAt(buf2, 512) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf2) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf2))+", got "+string(m), err) + return + } + if !bytes.Equal(buf2, buf[512:1024]) { + logError(testName, function, args, startTime, "", "Incorrect count of ReadAt data", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test Presigned Post Policy +func testPresignedPostPolicy() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PresignedPostPolicy(policy)" + args := map[string]interface{}{ + "policy": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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 in 'us-east-1' (source bucket). + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate 33K of data. + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + // Azure requires the key to not start with a number + metadataKey := randString(60, rand.NewSource(time.Now().UnixNano()), "user") + metadataValue := randString(60, rand.NewSource(time.Now().UnixNano()), "") + + buf, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + // Save the data + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + policy := minio.NewPostPolicy() + + if err := policy.SetBucket(""); err == nil { + logError(testName, function, args, startTime, "", "SetBucket did not fail for invalid conditions", err) + return + } + if err := policy.SetKey(""); err == nil { + logError(testName, function, args, startTime, "", "SetKey did not fail for invalid conditions", err) + return + } + if err := policy.SetKeyStartsWith(""); err == nil { + logError(testName, function, args, startTime, "", "SetKeyStartsWith did not fail for invalid conditions", err) + return + } + if err := policy.SetExpires(time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC)); err == nil { + logError(testName, function, args, startTime, "", "SetExpires did not fail for invalid conditions", err) + return + } + if err := policy.SetContentType(""); err == nil { + logError(testName, function, args, startTime, "", "SetContentType did not fail for invalid conditions", err) + return + } + if err := policy.SetContentTypeStartsWith(""); err == nil { + logError(testName, function, args, startTime, "", "SetContentTypeStartsWith did not fail for invalid conditions", err) + return + } + if err := policy.SetContentLengthRange(1024*1024, 1024); err == nil { + logError(testName, function, args, startTime, "", "SetContentLengthRange did not fail for invalid conditions", err) + return + } + if err := policy.SetUserMetadata("", ""); err == nil { + logError(testName, function, args, startTime, "", "SetUserMetadata did not fail for invalid conditions", err) + return + } + + policy.SetBucket(bucketName) + policy.SetKey(objectName) + policy.SetExpires(time.Now().UTC().AddDate(0, 0, 10)) // expires in 10 days + policy.SetContentType("binary/octet-stream") + policy.SetContentLengthRange(10, 1024*1024) + policy.SetUserMetadata(metadataKey, metadataValue) + args["policy"] = policy.String() + + presignedPostPolicyURL, formData, err := c.PresignedPostPolicy(context.Background(), policy) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedPostPolicy failed", err) + return + } + + var formBuf bytes.Buffer + writer := multipart.NewWriter(&formBuf) + for k, v := range formData { + writer.WriteField(k, v) + } + + // Get a 33KB file to upload and test if set post policy works + var filePath = getMintDataDirFilePath("datafile-33-kB") + if filePath == "" { + // Make a temp file with 33 KB data. + file, err := ioutil.TempFile(os.TempDir(), "PresignedPostPolicyTest") + if err != nil { + logError(testName, function, args, startTime, "", "TempFile creation failed", err) + return + } + if _, err = io.Copy(file, getDataReader("datafile-33-kB")); err != nil { + logError(testName, function, args, startTime, "", "Copy failed", err) + return + } + if err = file.Close(); err != nil { + logError(testName, function, args, startTime, "", "File Close failed", err) + return + } + filePath = file.Name() + } + + // add file to post request + f, err := os.Open(filePath) + defer f.Close() + if err != nil { + logError(testName, function, args, startTime, "", "File open failed", err) + return + } + w, err := writer.CreateFormFile("file", filePath) + if err != nil { + logError(testName, function, args, startTime, "", "CreateFormFile failed", err) + return + } + + _, err = io.Copy(w, f) + if err != nil { + logError(testName, function, args, startTime, "", "Copy failed", err) + return + } + writer.Close() + + transport, err := minio.DefaultTransport(mustParseBool(os.Getenv(enableHTTPS))) + if err != nil { + logError(testName, function, args, startTime, "", "DefaultTransport failed", err) + return + } + + httpClient := &http.Client{ + // Setting a sensible time out of 30secs to wait for response + // headers. Request is pro-actively canceled after 30secs + // with no response. + Timeout: 30 * time.Second, + Transport: transport, + } + + req, err := http.NewRequest(http.MethodPost, presignedPostPolicyURL.String(), bytes.NewReader(formBuf.Bytes())) + if err != nil { + logError(testName, function, args, startTime, "", "Http request failed", err) + return + } + + req.Header.Set("Content-Type", writer.FormDataContentType()) + + // make post request with correct form data + res, err := httpClient.Do(req) + if err != nil { + logError(testName, function, args, startTime, "", "Http request failed", err) + return + } + defer res.Body.Close() + if res.StatusCode != http.StatusNoContent { + logError(testName, function, args, startTime, "", "Http request failed", errors.New(res.Status)) + return + } + + // expected path should be absolute path of the object + var scheme string + if mustParseBool(os.Getenv(enableHTTPS)) { + scheme = "https://" + } else { + scheme = "http://" + } + + expectedLocation := scheme + os.Getenv(serverEndpoint) + "/" + bucketName + "/" + objectName + expectedLocationBucketDNS := scheme + bucketName + "." + os.Getenv(serverEndpoint) + "/" + objectName + + if val, ok := res.Header["Location"]; ok { + if val[0] != expectedLocation && val[0] != expectedLocationBucketDNS { + logError(testName, function, args, startTime, "", "Location in header response is incorrect", err) + return + } + } else { + logError(testName, function, args, startTime, "", "Location not found in header response", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests copy object +func testCopyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(dst, src)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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 in 'us-east-1' (source bucket). + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Make a new bucket in 'us-east-1' (destination bucket). + err = c.MakeBucket(context.Background(), bucketName+"-copy", minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName+"-copy", c) + + // Generate 33K of data. + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + // Check the various fields of source object against destination object. + objInfo, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + + // Copy Source + src := minio.CopySrcOptions{ + Bucket: bucketName, + Object: objectName, + // Set copy conditions. + MatchETag: objInfo.ETag, + MatchModifiedSince: time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC), + } + args["src"] = src + + dst := minio.CopyDestOptions{ + Bucket: bucketName + "-copy", + Object: objectName + "-copy", + } + + // Perform the Copy + if _, err = c.CopyObject(context.Background(), dst, src); err != nil { + logError(testName, function, args, startTime, "", "CopyObject failed", err) + return + } + + // Source object + r, err = c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + // Destination object + readerCopy, err := c.GetObject(context.Background(), bucketName+"-copy", objectName+"-copy", minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + // Check the various fields of source object against destination object. + objInfo, err = r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + objInfoCopy, err := readerCopy.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + if objInfo.Size != objInfoCopy.Size { + logError(testName, function, args, startTime, "", "Number of bytes does not match, expected "+string(objInfoCopy.Size)+", got "+string(objInfo.Size), err) + return + } + + if err := crcMatchesName(r, "datafile-33-kB"); err != nil { + logError(testName, function, args, startTime, "", "data CRC check failed", err) + return + } + if err := crcMatchesName(readerCopy, "datafile-33-kB"); err != nil { + logError(testName, function, args, startTime, "", "copy data CRC check failed", err) + return + } + // Close all the get readers before proceeding with CopyObject operations. + r.Close() + readerCopy.Close() + + // CopyObject again but with wrong conditions + src = minio.CopySrcOptions{ + Bucket: bucketName, + Object: objectName, + MatchUnmodifiedSince: time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC), + NoMatchETag: objInfo.ETag, + } + + // Perform the Copy which should fail + _, err = c.CopyObject(context.Background(), dst, src) + if err == nil { + logError(testName, function, args, startTime, "", "CopyObject did not fail for invalid conditions", err) + return + } + + src = minio.CopySrcOptions{ + Bucket: bucketName, + Object: objectName, + } + + dst = minio.CopyDestOptions{ + Bucket: bucketName, + Object: objectName, + ReplaceMetadata: true, + UserMetadata: map[string]string{ + "Copy": "should be same", + }, + } + args["dst"] = dst + args["src"] = src + + _, err = c.CopyObject(context.Background(), dst, src) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObject shouldn't fail", err) + return + } + + oi, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + + stOpts := minio.StatObjectOptions{} + stOpts.SetMatchETag(oi.ETag) + objInfo, err = c.StatObject(context.Background(), bucketName, objectName, stOpts) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObject ETag should match and not fail", err) + return + } + + if objInfo.Metadata.Get("x-amz-meta-copy") != "should be same" { + logError(testName, function, args, startTime, "", "CopyObject modified metadata should match", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests SSE-C get object ReaderSeeker interface methods. +func testSSECEncryptedGetObjectReadSeekFunctional() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer func() { + // Delete all objects and buckets + if err = cleanupBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + }() + + // Generate 129MiB of data. + bufSize := dataFileMap["datafile-129-MB"] + var reader = getDataReader("datafile-129-MB") + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + // Save the data + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ + ContentType: "binary/octet-stream", + ServerSideEncryption: encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+objectName)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{ + ServerSideEncryption: encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+objectName)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + defer r.Close() + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat object failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(bufSize))+", got "+string(st.Size), err) + return + } + + // This following function helps us to compare data from the reader after seek + // with the data from the original buffer + cmpData := func(r io.Reader, start, end int) { + if end-start == 0 { + return + } + buffer := bytes.NewBuffer([]byte{}) + if _, err := io.CopyN(buffer, r, int64(bufSize)); err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "CopyN failed", err) + return + } + } + if !bytes.Equal(buf[start:end], buffer.Bytes()) { + logError(testName, function, args, startTime, "", "Incorrect read bytes v/s original buffer", err) + return + } + } + + testCases := []struct { + offset int64 + whence int + pos int64 + err error + shouldCmp bool + start int + end int + }{ + // Start from offset 0, fetch data and compare + {0, 0, 0, nil, true, 0, 0}, + // Start from offset 2048, fetch data and compare + {2048, 0, 2048, nil, true, 2048, bufSize}, + // Start from offset larger than possible + {int64(bufSize) + 1024, 0, 0, io.EOF, false, 0, 0}, + // Move to offset 0 without comparing + {0, 0, 0, nil, false, 0, 0}, + // Move one step forward and compare + {1, 1, 1, nil, true, 1, bufSize}, + // Move larger than possible + {int64(bufSize), 1, 0, io.EOF, false, 0, 0}, + // Provide negative offset with CUR_SEEK + {int64(-1), 1, 0, fmt.Errorf("Negative position not allowed for 1"), false, 0, 0}, + // Test with whence SEEK_END and with positive offset + {1024, 2, 0, io.EOF, false, 0, 0}, + // Test with whence SEEK_END and with negative offset + {-1024, 2, int64(bufSize) - 1024, nil, true, bufSize - 1024, bufSize}, + // Test with whence SEEK_END and with large negative offset + {-int64(bufSize) * 2, 2, 0, fmt.Errorf("Seeking at negative offset not allowed for 2"), false, 0, 0}, + // Test with invalid whence + {0, 3, 0, fmt.Errorf("Invalid whence 3"), false, 0, 0}, + } + + for i, testCase := range testCases { + // Perform seek operation + n, err := r.Seek(testCase.offset, testCase.whence) + if err != nil && testCase.err == nil { + // We expected success. + logError(testName, function, args, startTime, "", + fmt.Sprintf("Test %d, unexpected err value: expected: %s, found: %s", i+1, testCase.err, err), err) + return + } + if err == nil && testCase.err != nil { + // We expected failure, but got success. + logError(testName, function, args, startTime, "", + fmt.Sprintf("Test %d, unexpected err value: expected: %s, found: %s", i+1, testCase.err, err), err) + return + } + if err != nil && testCase.err != nil { + if err.Error() != testCase.err.Error() { + // We expect a specific error + logError(testName, function, args, startTime, "", + fmt.Sprintf("Test %d, unexpected err value: expected: %s, found: %s", i+1, testCase.err, err), err) + return + } + } + // Check the returned seek pos + if n != testCase.pos { + logError(testName, function, args, startTime, "", + fmt.Sprintf("Test %d, number of bytes seeked does not match, expected %d, got %d", i+1, testCase.pos, n), err) + return + } + // Compare only if shouldCmp is activated + if testCase.shouldCmp { + cmpData(r, testCase.start, testCase.end) + } + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests SSE-S3 get object ReaderSeeker interface methods. +func testSSES3EncryptedGetObjectReadSeekFunctional() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer func() { + // Delete all objects and buckets + if err = cleanupBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + }() + + // Generate 129MiB of data. + bufSize := dataFileMap["datafile-129-MB"] + var reader = getDataReader("datafile-129-MB") + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + // Save the data + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ + ContentType: "binary/octet-stream", + ServerSideEncryption: encrypt.NewSSE(), + }) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + defer r.Close() + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat object failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(bufSize))+", got "+string(st.Size), err) + return + } + + // This following function helps us to compare data from the reader after seek + // with the data from the original buffer + cmpData := func(r io.Reader, start, end int) { + if end-start == 0 { + return + } + buffer := bytes.NewBuffer([]byte{}) + if _, err := io.CopyN(buffer, r, int64(bufSize)); err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "CopyN failed", err) + return + } + } + if !bytes.Equal(buf[start:end], buffer.Bytes()) { + logError(testName, function, args, startTime, "", "Incorrect read bytes v/s original buffer", err) + return + } + } + + testCases := []struct { + offset int64 + whence int + pos int64 + err error + shouldCmp bool + start int + end int + }{ + // Start from offset 0, fetch data and compare + {0, 0, 0, nil, true, 0, 0}, + // Start from offset 2048, fetch data and compare + {2048, 0, 2048, nil, true, 2048, bufSize}, + // Start from offset larger than possible + {int64(bufSize) + 1024, 0, 0, io.EOF, false, 0, 0}, + // Move to offset 0 without comparing + {0, 0, 0, nil, false, 0, 0}, + // Move one step forward and compare + {1, 1, 1, nil, true, 1, bufSize}, + // Move larger than possible + {int64(bufSize), 1, 0, io.EOF, false, 0, 0}, + // Provide negative offset with CUR_SEEK + {int64(-1), 1, 0, fmt.Errorf("Negative position not allowed for 1"), false, 0, 0}, + // Test with whence SEEK_END and with positive offset + {1024, 2, 0, io.EOF, false, 0, 0}, + // Test with whence SEEK_END and with negative offset + {-1024, 2, int64(bufSize) - 1024, nil, true, bufSize - 1024, bufSize}, + // Test with whence SEEK_END and with large negative offset + {-int64(bufSize) * 2, 2, 0, fmt.Errorf("Seeking at negative offset not allowed for 2"), false, 0, 0}, + // Test with invalid whence + {0, 3, 0, fmt.Errorf("Invalid whence 3"), false, 0, 0}, + } + + for i, testCase := range testCases { + // Perform seek operation + n, err := r.Seek(testCase.offset, testCase.whence) + if err != nil && testCase.err == nil { + // We expected success. + logError(testName, function, args, startTime, "", + fmt.Sprintf("Test %d, unexpected err value: expected: %s, found: %s", i+1, testCase.err, err), err) + return + } + if err == nil && testCase.err != nil { + // We expected failure, but got success. + logError(testName, function, args, startTime, "", + fmt.Sprintf("Test %d, unexpected err value: expected: %s, found: %s", i+1, testCase.err, err), err) + return + } + if err != nil && testCase.err != nil { + if err.Error() != testCase.err.Error() { + // We expect a specific error + logError(testName, function, args, startTime, "", + fmt.Sprintf("Test %d, unexpected err value: expected: %s, found: %s", i+1, testCase.err, err), err) + return + } + } + // Check the returned seek pos + if n != testCase.pos { + logError(testName, function, args, startTime, "", + fmt.Sprintf("Test %d, number of bytes seeked does not match, expected %d, got %d", i+1, testCase.pos, n), err) + return + } + // Compare only if shouldCmp is activated + if testCase.shouldCmp { + cmpData(r, testCase.start, testCase.end) + } + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests SSE-C get object ReaderAt interface methods. +func testSSECEncryptedGetObjectReadAtFunctional() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate 129MiB of data. + bufSize := dataFileMap["datafile-129-MB"] + var reader = getDataReader("datafile-129-MB") + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + // Save the data + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ + ContentType: "binary/octet-stream", + ServerSideEncryption: encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+objectName)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{ + ServerSideEncryption: encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+objectName)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + defer r.Close() + + offset := int64(2048) + + // read directly + buf1 := make([]byte, 512) + buf2 := make([]byte, 512) + buf3 := make([]byte, 512) + buf4 := make([]byte, 512) + + // Test readAt before stat is called such that objectInfo doesn't change. + m, err := r.ReadAt(buf1, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf1) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf1))+", got "+string(m), err) + return + } + if !bytes.Equal(buf1, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + offset += 512 + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes in stat does not match, expected "+string(int64(bufSize))+", got "+string(st.Size), err) + return + } + + m, err = r.ReadAt(buf2, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf2) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf2))+", got "+string(m), err) + return + } + if !bytes.Equal(buf2, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + offset += 512 + m, err = r.ReadAt(buf3, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf3) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf3))+", got "+string(m), err) + return + } + if !bytes.Equal(buf3, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + offset += 512 + m, err = r.ReadAt(buf4, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf4) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf4))+", got "+string(m), err) + return + } + if !bytes.Equal(buf4, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + + buf5 := make([]byte, len(buf)) + // Read the whole object. + m, err = r.ReadAt(buf5, 0) + if err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + } + if m != len(buf5) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf5))+", got "+string(m), err) + return + } + if !bytes.Equal(buf, buf5) { + logError(testName, function, args, startTime, "", "Incorrect data read in GetObject, than what was previously uploaded", err) + return + } + + buf6 := make([]byte, len(buf)+1) + // Read the whole object and beyond. + _, err = r.ReadAt(buf6, 0) + if err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests SSE-S3 get object ReaderAt interface methods. +func testSSES3EncryptedGetObjectReadAtFunctional() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate 129MiB of data. + bufSize := dataFileMap["datafile-129-MB"] + var reader = getDataReader("datafile-129-MB") + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + // Save the data + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ + ContentType: "binary/octet-stream", + ServerSideEncryption: encrypt.NewSSE(), + }) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + defer r.Close() + + offset := int64(2048) + + // read directly + buf1 := make([]byte, 512) + buf2 := make([]byte, 512) + buf3 := make([]byte, 512) + buf4 := make([]byte, 512) + + // Test readAt before stat is called such that objectInfo doesn't change. + m, err := r.ReadAt(buf1, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf1) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf1))+", got "+string(m), err) + return + } + if !bytes.Equal(buf1, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + offset += 512 + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes in stat does not match, expected "+string(int64(bufSize))+", got "+string(st.Size), err) + return + } + + m, err = r.ReadAt(buf2, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf2) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf2))+", got "+string(m), err) + return + } + if !bytes.Equal(buf2, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + offset += 512 + m, err = r.ReadAt(buf3, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf3) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf3))+", got "+string(m), err) + return + } + if !bytes.Equal(buf3, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + offset += 512 + m, err = r.ReadAt(buf4, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf4) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf4))+", got "+string(m), err) + return + } + if !bytes.Equal(buf4, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + + buf5 := make([]byte, len(buf)) + // Read the whole object. + m, err = r.ReadAt(buf5, 0) + if err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + } + if m != len(buf5) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf5))+", got "+string(m), err) + return + } + if !bytes.Equal(buf, buf5) { + logError(testName, function, args, startTime, "", "Incorrect data read in GetObject, than what was previously uploaded", err) + return + } + + buf6 := make([]byte, len(buf)+1) + // Read the whole object and beyond. + _, err = r.ReadAt(buf6, 0) + if err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + } + + successLogger(testName, function, args, startTime).Info() +} + +// testSSECEncryptionPutGet tests encryption with customer provided encryption keys +func testSSECEncryptionPutGet() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PutEncryptedObject(bucketName, objectName, reader, sse)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "sse": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + testCases := []struct { + buf []byte + }{ + {buf: bytes.Repeat([]byte("F"), 1)}, + {buf: bytes.Repeat([]byte("F"), 15)}, + {buf: bytes.Repeat([]byte("F"), 16)}, + {buf: bytes.Repeat([]byte("F"), 17)}, + {buf: bytes.Repeat([]byte("F"), 31)}, + {buf: bytes.Repeat([]byte("F"), 32)}, + {buf: bytes.Repeat([]byte("F"), 33)}, + {buf: bytes.Repeat([]byte("F"), 1024)}, + {buf: bytes.Repeat([]byte("F"), 1024*2)}, + {buf: bytes.Repeat([]byte("F"), 1024*1024)}, + } + + const password = "correct horse battery staple" // https://xkcd.com/936/ + + for i, testCase := range testCases { + // Generate a random object name + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Secured object + sse := encrypt.DefaultPBKDF([]byte(password), []byte(bucketName+objectName)) + args["sse"] = sse + + // Put encrypted data + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(testCase.buf), int64(len(testCase.buf)), minio.PutObjectOptions{ServerSideEncryption: sse}) + if err != nil { + logError(testName, function, args, startTime, "", "PutEncryptedObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{ServerSideEncryption: sse}) + if err != nil { + logError(testName, function, args, startTime, "", "GetEncryptedObject failed", err) + return + } + defer r.Close() + + // Compare the sent object with the received one + recvBuffer := bytes.NewBuffer([]byte{}) + if _, err = io.Copy(recvBuffer, r); err != nil { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", error: "+err.Error(), err) + return + } + if recvBuffer.Len() != len(testCase.buf) { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", Number of bytes of received object does not match, expected "+string(len(testCase.buf))+", got "+string(recvBuffer.Len()), err) + return + } + if !bytes.Equal(testCase.buf, recvBuffer.Bytes()) { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", Encrypted sent is not equal to decrypted, expected "+string(testCase.buf)+", got "+string(recvBuffer.Bytes()), err) + return + } + + successLogger(testName, function, args, startTime).Info() + + } + + successLogger(testName, function, args, startTime).Info() +} + +// TestEncryptionFPut tests encryption with customer specified encryption keys +func testSSECEncryptionFPut() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "FPutEncryptedObject(bucketName, objectName, filePath, contentType, sse)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "filePath": "", + "contentType": "", + "sse": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Object custom metadata + customContentType := "custom/contenttype" + args["metadata"] = customContentType + + testCases := []struct { + buf []byte + }{ + {buf: bytes.Repeat([]byte("F"), 0)}, + {buf: bytes.Repeat([]byte("F"), 1)}, + {buf: bytes.Repeat([]byte("F"), 15)}, + {buf: bytes.Repeat([]byte("F"), 16)}, + {buf: bytes.Repeat([]byte("F"), 17)}, + {buf: bytes.Repeat([]byte("F"), 31)}, + {buf: bytes.Repeat([]byte("F"), 32)}, + {buf: bytes.Repeat([]byte("F"), 33)}, + {buf: bytes.Repeat([]byte("F"), 1024)}, + {buf: bytes.Repeat([]byte("F"), 1024*2)}, + {buf: bytes.Repeat([]byte("F"), 1024*1024)}, + } + + const password = "correct horse battery staple" // https://xkcd.com/936/ + for i, testCase := range testCases { + // Generate a random object name + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Secured object + sse := encrypt.DefaultPBKDF([]byte(password), []byte(bucketName+objectName)) + args["sse"] = sse + + // Generate a random file name. + fileName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + file, err := os.Create(fileName) + if err != nil { + logError(testName, function, args, startTime, "", "file create failed", err) + return + } + _, err = file.Write(testCase.buf) + if err != nil { + logError(testName, function, args, startTime, "", "file write failed", err) + return + } + file.Close() + // Put encrypted data + if _, err = c.FPutObject(context.Background(), bucketName, objectName, fileName, minio.PutObjectOptions{ServerSideEncryption: sse}); err != nil { + logError(testName, function, args, startTime, "", "FPutEncryptedObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{ServerSideEncryption: sse}) + if err != nil { + logError(testName, function, args, startTime, "", "GetEncryptedObject failed", err) + return + } + defer r.Close() + + // Compare the sent object with the received one + recvBuffer := bytes.NewBuffer([]byte{}) + if _, err = io.Copy(recvBuffer, r); err != nil { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", error: "+err.Error(), err) + return + } + if recvBuffer.Len() != len(testCase.buf) { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", Number of bytes of received object does not match, expected "+string(len(testCase.buf))+", got "+string(recvBuffer.Len()), err) + return + } + if !bytes.Equal(testCase.buf, recvBuffer.Bytes()) { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", Encrypted sent is not equal to decrypted, expected "+string(testCase.buf)+", got "+string(recvBuffer.Bytes()), err) + return + } + + os.Remove(fileName) + } + + successLogger(testName, function, args, startTime).Info() +} + +// testSSES3EncryptionPutGet tests SSE-S3 encryption +func testSSES3EncryptionPutGet() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PutEncryptedObject(bucketName, objectName, reader, sse)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "sse": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + testCases := []struct { + buf []byte + }{ + {buf: bytes.Repeat([]byte("F"), 1)}, + {buf: bytes.Repeat([]byte("F"), 15)}, + {buf: bytes.Repeat([]byte("F"), 16)}, + {buf: bytes.Repeat([]byte("F"), 17)}, + {buf: bytes.Repeat([]byte("F"), 31)}, + {buf: bytes.Repeat([]byte("F"), 32)}, + {buf: bytes.Repeat([]byte("F"), 33)}, + {buf: bytes.Repeat([]byte("F"), 1024)}, + {buf: bytes.Repeat([]byte("F"), 1024*2)}, + {buf: bytes.Repeat([]byte("F"), 1024*1024)}, + } + + for i, testCase := range testCases { + // Generate a random object name + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Secured object + sse := encrypt.NewSSE() + args["sse"] = sse + + // Put encrypted data + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(testCase.buf), int64(len(testCase.buf)), minio.PutObjectOptions{ServerSideEncryption: sse}) + if err != nil { + logError(testName, function, args, startTime, "", "PutEncryptedObject failed", err) + return + } + + // Read the data back without any encryption headers + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetEncryptedObject failed", err) + return + } + defer r.Close() + + // Compare the sent object with the received one + recvBuffer := bytes.NewBuffer([]byte{}) + if _, err = io.Copy(recvBuffer, r); err != nil { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", error: "+err.Error(), err) + return + } + if recvBuffer.Len() != len(testCase.buf) { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", Number of bytes of received object does not match, expected "+string(len(testCase.buf))+", got "+string(recvBuffer.Len()), err) + return + } + if !bytes.Equal(testCase.buf, recvBuffer.Bytes()) { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", Encrypted sent is not equal to decrypted, expected "+string(testCase.buf)+", got "+string(recvBuffer.Bytes()), err) + return + } + + successLogger(testName, function, args, startTime).Info() + + } + + successLogger(testName, function, args, startTime).Info() +} + +// TestSSES3EncryptionFPut tests server side encryption +func testSSES3EncryptionFPut() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "FPutEncryptedObject(bucketName, objectName, filePath, contentType, sse)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "filePath": "", + "contentType": "", + "sse": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Object custom metadata + customContentType := "custom/contenttype" + args["metadata"] = customContentType + + testCases := []struct { + buf []byte + }{ + {buf: bytes.Repeat([]byte("F"), 0)}, + {buf: bytes.Repeat([]byte("F"), 1)}, + {buf: bytes.Repeat([]byte("F"), 15)}, + {buf: bytes.Repeat([]byte("F"), 16)}, + {buf: bytes.Repeat([]byte("F"), 17)}, + {buf: bytes.Repeat([]byte("F"), 31)}, + {buf: bytes.Repeat([]byte("F"), 32)}, + {buf: bytes.Repeat([]byte("F"), 33)}, + {buf: bytes.Repeat([]byte("F"), 1024)}, + {buf: bytes.Repeat([]byte("F"), 1024*2)}, + {buf: bytes.Repeat([]byte("F"), 1024*1024)}, + } + + for i, testCase := range testCases { + // Generate a random object name + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Secured object + sse := encrypt.NewSSE() + args["sse"] = sse + + // Generate a random file name. + fileName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + file, err := os.Create(fileName) + if err != nil { + logError(testName, function, args, startTime, "", "file create failed", err) + return + } + _, err = file.Write(testCase.buf) + if err != nil { + logError(testName, function, args, startTime, "", "file write failed", err) + return + } + file.Close() + // Put encrypted data + if _, err = c.FPutObject(context.Background(), bucketName, objectName, fileName, minio.PutObjectOptions{ServerSideEncryption: sse}); err != nil { + logError(testName, function, args, startTime, "", "FPutEncryptedObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetEncryptedObject failed", err) + return + } + defer r.Close() + + // Compare the sent object with the received one + recvBuffer := bytes.NewBuffer([]byte{}) + if _, err = io.Copy(recvBuffer, r); err != nil { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", error: "+err.Error(), err) + return + } + if recvBuffer.Len() != len(testCase.buf) { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", Number of bytes of received object does not match, expected "+string(len(testCase.buf))+", got "+string(recvBuffer.Len()), err) + return + } + if !bytes.Equal(testCase.buf, recvBuffer.Bytes()) { + logError(testName, function, args, startTime, "", "Test "+string(i+1)+", Encrypted sent is not equal to decrypted, expected "+string(testCase.buf)+", got "+string(recvBuffer.Bytes()), err) + return + } + + os.Remove(fileName) + } + + successLogger(testName, function, args, startTime).Info() +} + +func testBucketNotification() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "SetBucketNotification(bucketName)" + args := map[string]interface{}{ + "bucketName": "", + } + + if os.Getenv("NOTIFY_BUCKET") == "" || + os.Getenv("NOTIFY_SERVICE") == "" || + os.Getenv("NOTIFY_REGION") == "" || + os.Getenv("NOTIFY_ACCOUNTID") == "" || + os.Getenv("NOTIFY_RESOURCE") == "" { + ignoredLog(testName, function, args, startTime, "Skipped notification test as it is not configured").Info() + return + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // Enable to debug + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("MinIO-go-FunctionalTest", "0.1.0") + + bucketName := os.Getenv("NOTIFY_BUCKET") + args["bucketName"] = bucketName + + topicArn := notification.NewArn("aws", os.Getenv("NOTIFY_SERVICE"), os.Getenv("NOTIFY_REGION"), os.Getenv("NOTIFY_ACCOUNTID"), os.Getenv("NOTIFY_RESOURCE")) + queueArn := notification.NewArn("aws", "dummy-service", "dummy-region", "dummy-accountid", "dummy-resource") + + topicConfig := notification.NewConfig(topicArn) + topicConfig.AddEvents(notification.ObjectCreatedAll, notification.ObjectRemovedAll) + topicConfig.AddFilterSuffix("jpg") + + queueConfig := notification.NewConfig(queueArn) + queueConfig.AddEvents(notification.ObjectCreatedAll) + queueConfig.AddFilterPrefix("photos/") + + config := notification.Configuration{} + config.AddTopic(topicConfig) + + // Add the same topicConfig again, should have no effect + // because it is duplicated + config.AddTopic(topicConfig) + if len(config.TopicConfigs) != 1 { + logError(testName, function, args, startTime, "", "Duplicate entry added", err) + return + } + + // Add and remove a queue config + config.AddQueue(queueConfig) + config.RemoveQueueByArn(queueArn) + + err = c.SetBucketNotification(context.Background(), bucketName, config) + if err != nil { + logError(testName, function, args, startTime, "", "SetBucketNotification failed", err) + return + } + + config, err = c.GetBucketNotification(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "GetBucketNotification failed", err) + return + } + + if len(config.TopicConfigs) != 1 { + logError(testName, function, args, startTime, "", "Topic config is empty", err) + return + } + + if config.TopicConfigs[0].Filter.S3Key.FilterRules[0].Value != "jpg" { + logError(testName, function, args, startTime, "", "Couldn't get the suffix", err) + return + } + + err = c.RemoveAllBucketNotification(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "RemoveAllBucketNotification failed", err) + return + } + + // Delete all objects and buckets + if err = cleanupBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests comprehensive list of all methods. +func testFunctional() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "testFunctional()" + functionAll := "" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, nil, startTime, "", "MinIO client object creation failed", err) + return + } + + // 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. + function = "MakeBucket(bucketName, region)" + functionAll = "MakeBucket(bucketName, region)" + args["bucketName"] = bucketName + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + + defer cleanupBucket(bucketName, c) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + // Generate a random file name. + fileName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + file, err := os.Create(fileName) + if err != nil { + logError(testName, function, args, startTime, "", "File creation failed", err) + return + } + for i := 0; i < 3; i++ { + buf := make([]byte, rand.Intn(1<<19)) + _, err = file.Write(buf) + if err != nil { + logError(testName, function, args, startTime, "", "File write failed", err) + return + } + } + file.Close() + + // Verify if bucket exits and you have access. + var exists bool + function = "BucketExists(bucketName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + } + exists, err = c.BucketExists(context.Background(), bucketName) + + if err != nil { + logError(testName, function, args, startTime, "", "BucketExists failed", err) + return + } + if !exists { + logError(testName, function, args, startTime, "", "Could not find the bucket", err) + return + } + + // Asserting the default bucket policy. + function = "GetBucketPolicy(ctx, bucketName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + } + nilPolicy, err := c.GetBucketPolicy(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "GetBucketPolicy failed", err) + return + } + if nilPolicy != "" { + logError(testName, function, args, startTime, "", "policy should be set to nil", err) + return + } + + // Set the bucket policy to 'public readonly'. + function = "SetBucketPolicy(bucketName, readOnlyPolicy)" + functionAll += ", " + function + + readOnlyPolicy := `{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:ListBucket"],"Resource":["arn:aws:s3:::` + bucketName + `"]}]}` + args = map[string]interface{}{ + "bucketName": bucketName, + "bucketPolicy": readOnlyPolicy, + } + + err = c.SetBucketPolicy(context.Background(), bucketName, readOnlyPolicy) + if err != nil { + logError(testName, function, args, startTime, "", "SetBucketPolicy failed", err) + return + } + // should return policy `readonly`. + function = "GetBucketPolicy(ctx, bucketName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + } + _, err = c.GetBucketPolicy(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "GetBucketPolicy failed", err) + return + } + + // Make the bucket 'public writeonly'. + function = "SetBucketPolicy(bucketName, writeOnlyPolicy)" + functionAll += ", " + function + + writeOnlyPolicy := `{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:ListBucketMultipartUploads"],"Resource":["arn:aws:s3:::` + bucketName + `"]}]}` + args = map[string]interface{}{ + "bucketName": bucketName, + "bucketPolicy": writeOnlyPolicy, + } + err = c.SetBucketPolicy(context.Background(), bucketName, writeOnlyPolicy) + + if err != nil { + logError(testName, function, args, startTime, "", "SetBucketPolicy failed", err) + return + } + // should return policy `writeonly`. + function = "GetBucketPolicy(ctx, bucketName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + } + + _, err = c.GetBucketPolicy(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "GetBucketPolicy failed", err) + return + } + + // Make the bucket 'public read/write'. + function = "SetBucketPolicy(bucketName, readWritePolicy)" + functionAll += ", " + function + + readWritePolicy := `{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:ListBucket","s3:ListBucketMultipartUploads"],"Resource":["arn:aws:s3:::` + bucketName + `"]}]}` + + args = map[string]interface{}{ + "bucketName": bucketName, + "bucketPolicy": readWritePolicy, + } + err = c.SetBucketPolicy(context.Background(), bucketName, readWritePolicy) + + if err != nil { + logError(testName, function, args, startTime, "", "SetBucketPolicy failed", err) + return + } + // should return policy `readwrite`. + function = "GetBucketPolicy(bucketName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + } + _, err = c.GetBucketPolicy(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "GetBucketPolicy failed", err) + return + } + + // List all buckets. + function = "ListBuckets()" + functionAll += ", " + function + args = nil + buckets, err := c.ListBuckets(context.Background()) + + if len(buckets) == 0 { + logError(testName, function, args, startTime, "", "Found bucket list to be empty", err) + return + } + if err != nil { + logError(testName, function, args, startTime, "", "ListBuckets failed", err) + return + } + + // Verify if previously created bucket is listed in list buckets. + bucketFound := false + for _, bucket := range buckets { + if bucket.Name == bucketName { + bucketFound = true + } + } + + // If bucket not found error out. + if !bucketFound { + logError(testName, function, args, startTime, "", "Bucket: "+bucketName+" not found", err) + return + } + + objectName := bucketName + "unique" + + // Generate data + buf := bytes.Repeat([]byte("f"), 1<<19) + + function = "PutObject(bucketName, objectName, reader, contentType)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "contentType": "", + } + + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName + "-nolength", + "contentType": "binary/octet-stream", + } + + _, err = c.PutObject(context.Background(), bucketName, objectName+"-nolength", bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Instantiate a done channel to close all listing. + doneCh := make(chan struct{}) + defer close(doneCh) + + objFound := false + isRecursive := true // Recursive is true. + + function = "ListObjects(bucketName, objectName, isRecursive, doneCh)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "isRecursive": isRecursive, + } + + for obj := range c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{UseV1: true, Prefix: objectName, Recursive: true}) { + if obj.Key == objectName { + objFound = true + break + } + } + if !objFound { + logError(testName, function, args, startTime, "", "Object "+objectName+" not found", err) + return + } + + objFound = false + isRecursive = true // Recursive is true. + function = "ListObjects()" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "isRecursive": isRecursive, + } + + for obj := range c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{Prefix: objectName, Recursive: isRecursive}) { + if obj.Key == objectName { + objFound = true + break + } + } + if !objFound { + logError(testName, function, args, startTime, "", "Object "+objectName+" not found", err) + return + } + + incompObjNotFound := true + + function = "ListIncompleteUploads(bucketName, objectName, isRecursive, doneCh)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "isRecursive": isRecursive, + } + + for objIncompl := range c.ListIncompleteUploads(context.Background(), bucketName, objectName, isRecursive) { + if objIncompl.Key != "" { + incompObjNotFound = false + break + } + } + if !incompObjNotFound { + logError(testName, function, args, startTime, "", "Unexpected dangling incomplete upload found", err) + return + } + + function = "GetObject(bucketName, objectName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + } + newReader, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + newReadBytes, err := ioutil.ReadAll(newReader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + if !bytes.Equal(newReadBytes, buf) { + logError(testName, function, args, startTime, "", "GetObject bytes mismatch", err) + return + } + newReader.Close() + + function = "FGetObject(bucketName, objectName, fileName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "fileName": fileName + "-f", + } + err = c.FGetObject(context.Background(), bucketName, objectName, fileName+"-f", minio.GetObjectOptions{}) + + if err != nil { + logError(testName, function, args, startTime, "", "FGetObject failed", err) + return + } + + function = "PresignedHeadObject(bucketName, objectName, expires, reqParams)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": "", + "expires": 3600 * time.Second, + } + if _, err = c.PresignedHeadObject(context.Background(), bucketName, "", 3600*time.Second, nil); err == nil { + logError(testName, function, args, startTime, "", "PresignedHeadObject success", err) + return + } + + // Generate presigned HEAD object url. + function = "PresignedHeadObject(bucketName, objectName, expires, reqParams)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "expires": 3600 * time.Second, + } + presignedHeadURL, err := c.PresignedHeadObject(context.Background(), bucketName, objectName, 3600*time.Second, nil) + + if err != nil { + logError(testName, function, args, startTime, "", "PresignedHeadObject failed", err) + return + } + + transport, err := minio.DefaultTransport(mustParseBool(os.Getenv(enableHTTPS))) + if err != nil { + logError(testName, function, args, startTime, "", "DefaultTransport failed", err) + return + } + + httpClient := &http.Client{ + // Setting a sensible time out of 30secs to wait for response + // headers. Request is pro-actively canceled after 30secs + // with no response. + Timeout: 30 * time.Second, + Transport: transport, + } + + req, err := http.NewRequest(http.MethodHead, presignedHeadURL.String(), nil) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedHeadObject request was incorrect", err) + return + } + + // Verify if presigned url works. + resp, err := httpClient.Do(req) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedHeadObject response incorrect", err) + return + } + if resp.StatusCode != http.StatusOK { + logError(testName, function, args, startTime, "", "PresignedHeadObject response incorrect, status "+string(resp.StatusCode), err) + return + } + if resp.Header.Get("ETag") == "" { + logError(testName, function, args, startTime, "", "PresignedHeadObject response incorrect", err) + return + } + resp.Body.Close() + + function = "PresignedGetObject(bucketName, objectName, expires, reqParams)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": "", + "expires": 3600 * time.Second, + } + _, err = c.PresignedGetObject(context.Background(), bucketName, "", 3600*time.Second, nil) + if err == nil { + logError(testName, function, args, startTime, "", "PresignedGetObject success", err) + return + } + + // Generate presigned GET object url. + function = "PresignedGetObject(bucketName, objectName, expires, reqParams)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "expires": 3600 * time.Second, + } + presignedGetURL, err := c.PresignedGetObject(context.Background(), bucketName, objectName, 3600*time.Second, nil) + + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject failed", err) + return + } + + // Verify if presigned url works. + req, err = http.NewRequest(http.MethodGet, presignedGetURL.String(), nil) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject request incorrect", err) + return + } + + resp, err = httpClient.Do(req) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject response incorrect", err) + return + } + if resp.StatusCode != http.StatusOK { + logError(testName, function, args, startTime, "", "PresignedGetObject response incorrect, status "+string(resp.StatusCode), err) + return + } + newPresignedBytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject response incorrect", err) + return + } + resp.Body.Close() + if !bytes.Equal(newPresignedBytes, buf) { + logError(testName, function, args, startTime, "", "PresignedGetObject response incorrect", err) + return + } + + // Set request parameters. + reqParams := make(url.Values) + reqParams.Set("response-content-disposition", "attachment; filename=\"test.txt\"") + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "expires": 3600 * time.Second, + "reqParams": reqParams, + } + presignedGetURL, err = c.PresignedGetObject(context.Background(), bucketName, objectName, 3600*time.Second, reqParams) + + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject failed", err) + return + } + + // Verify if presigned url works. + req, err = http.NewRequest(http.MethodGet, presignedGetURL.String(), nil) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject request incorrect", err) + return + } + + resp, err = httpClient.Do(req) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject response incorrect", err) + return + } + if resp.StatusCode != http.StatusOK { + logError(testName, function, args, startTime, "", "PresignedGetObject response incorrect, status "+string(resp.StatusCode), err) + return + } + newPresignedBytes, err = ioutil.ReadAll(resp.Body) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject response incorrect", err) + return + } + if !bytes.Equal(newPresignedBytes, buf) { + logError(testName, function, args, startTime, "", "Bytes mismatch for presigned GET URL", err) + return + } + if resp.Header.Get("Content-Disposition") != "attachment; filename=\"test.txt\"" { + logError(testName, function, args, startTime, "", "wrong Content-Disposition received "+string(resp.Header.Get("Content-Disposition")), err) + return + } + + function = "PresignedPutObject(bucketName, objectName, expires)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": "", + "expires": 3600 * time.Second, + } + _, err = c.PresignedPutObject(context.Background(), bucketName, "", 3600*time.Second) + if err == nil { + logError(testName, function, args, startTime, "", "PresignedPutObject success", err) + return + } + + function = "PresignedPutObject(bucketName, objectName, expires)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName + "-presigned", + "expires": 3600 * time.Second, + } + presignedPutURL, err := c.PresignedPutObject(context.Background(), bucketName, objectName+"-presigned", 3600*time.Second) + + if err != nil { + logError(testName, function, args, startTime, "", "PresignedPutObject failed", err) + return + } + + buf = bytes.Repeat([]byte("g"), 1<<19) + + req, err = http.NewRequest(http.MethodPut, presignedPutURL.String(), bytes.NewReader(buf)) + if err != nil { + logError(testName, function, args, startTime, "", "Couldn't make HTTP request with PresignedPutObject URL", err) + return + } + + resp, err = httpClient.Do(req) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedPutObject failed", err) + return + } + + newReader, err = c.GetObject(context.Background(), bucketName, objectName+"-presigned", minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject after PresignedPutObject failed", err) + return + } + + newReadBytes, err = ioutil.ReadAll(newReader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll after GetObject failed", err) + return + } + + if !bytes.Equal(newReadBytes, buf) { + logError(testName, function, args, startTime, "", "Bytes mismatch", err) + return + } + + function = "RemoveObject(bucketName, objectName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + } + err = c.RemoveObject(context.Background(), bucketName, objectName, minio.RemoveObjectOptions{}) + + if err != nil { + logError(testName, function, args, startTime, "", "RemoveObject failed", err) + return + } + args["objectName"] = objectName + "-f" + err = c.RemoveObject(context.Background(), bucketName, objectName+"-f", minio.RemoveObjectOptions{}) + + if err != nil { + logError(testName, function, args, startTime, "", "RemoveObject failed", err) + return + } + + args["objectName"] = objectName + "-nolength" + err = c.RemoveObject(context.Background(), bucketName, objectName+"-nolength", minio.RemoveObjectOptions{}) + + if err != nil { + logError(testName, function, args, startTime, "", "RemoveObject failed", err) + return + } + + args["objectName"] = objectName + "-presigned" + err = c.RemoveObject(context.Background(), bucketName, objectName+"-presigned", minio.RemoveObjectOptions{}) + + if err != nil { + logError(testName, function, args, startTime, "", "RemoveObject failed", err) + return + } + + function = "RemoveBucket(bucketName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + } + err = c.RemoveBucket(context.Background(), bucketName) + + if err != nil { + logError(testName, function, args, startTime, "", "RemoveBucket failed", err) + return + } + err = c.RemoveBucket(context.Background(), bucketName) + if err == nil { + logError(testName, function, args, startTime, "", "RemoveBucket did not fail for invalid bucket name", err) + return + } + if err.Error() != "The specified bucket does not exist" { + logError(testName, function, args, startTime, "", "RemoveBucket failed", err) + return + } + + os.Remove(fileName) + os.Remove(fileName + "-f") + successLogger(testName, functionAll, args, startTime).Info() +} + +// Test for validating GetObject Reader* methods functioning when the +// object is modified in the object store. +func testGetObjectModified() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("MinIO-go-FunctionalTest", "0.1.0") + + // Make a new bucket. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + args["bucketName"] = bucketName + + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Upload an object. + objectName := "myobject" + args["objectName"] = objectName + content := "helloworld" + _, err = c.PutObject(context.Background(), bucketName, objectName, strings.NewReader(content), int64(len(content)), minio.PutObjectOptions{ContentType: "application/text"}) + if err != nil { + logError(testName, function, args, startTime, "", "Failed to upload "+objectName+", to bucket "+bucketName, err) + return + } + + defer c.RemoveObject(context.Background(), bucketName, objectName, minio.RemoveObjectOptions{}) + + reader, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "Failed to GetObject "+objectName+", from bucket "+bucketName, err) + return + } + defer reader.Close() + + // Read a few bytes of the object. + b := make([]byte, 5) + n, err := reader.ReadAt(b, 0) + if err != nil { + logError(testName, function, args, startTime, "", "Failed to read object "+objectName+", from bucket "+bucketName+" at an offset", err) + return + } + + // Upload different contents to the same object while object is being read. + newContent := "goodbyeworld" + _, err = c.PutObject(context.Background(), bucketName, objectName, strings.NewReader(newContent), int64(len(newContent)), minio.PutObjectOptions{ContentType: "application/text"}) + if err != nil { + logError(testName, function, args, startTime, "", "Failed to upload "+objectName+", to bucket "+bucketName, err) + return + } + + // Confirm that a Stat() call in between doesn't change the Object's cached etag. + _, err = reader.Stat() + expectedError := "At least one of the pre-conditions you specified did not hold" + if err.Error() != expectedError { + logError(testName, function, args, startTime, "", "Expected Stat to fail with error "+expectedError+", but received "+err.Error(), err) + return + } + + // Read again only to find object contents have been modified since last read. + _, err = reader.ReadAt(b, int64(n)) + if err.Error() != expectedError { + logError(testName, function, args, startTime, "", "Expected ReadAt to fail with error "+expectedError+", but received "+err.Error(), err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test validates putObject to upload a file seeked at a given offset. +func testPutObjectUploadSeekedObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PutObject(bucketName, objectName, fileToUpload, contentType)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "fileToUpload": "", + "contentType": "binary/octet-stream", + } + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("MinIO-go-FunctionalTest", "0.1.0") + + // Make a new bucket. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + args["bucketName"] = bucketName + + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, c) + + var tempfile *os.File + + if fileName := getMintDataDirFilePath("datafile-100-kB"); fileName != "" { + tempfile, err = os.Open(fileName) + if err != nil { + logError(testName, function, args, startTime, "", "File open failed", err) + return + } + args["fileToUpload"] = fileName + } else { + tempfile, err = ioutil.TempFile("", "minio-go-upload-test-") + if err != nil { + logError(testName, function, args, startTime, "", "TempFile create failed", err) + return + } + args["fileToUpload"] = tempfile.Name() + + // Generate 100kB data + if _, err = io.Copy(tempfile, getDataReader("datafile-100-kB")); err != nil { + logError(testName, function, args, startTime, "", "File copy failed", err) + return + } + + defer os.Remove(tempfile.Name()) + + // Seek back to the beginning of the file. + tempfile.Seek(0, 0) + } + var length = 100 * humanize.KiByte + objectName := fmt.Sprintf("test-file-%v", rand.Uint32()) + args["objectName"] = objectName + + offset := length / 2 + if _, err = tempfile.Seek(int64(offset), 0); err != nil { + logError(testName, function, args, startTime, "", "TempFile seek failed", err) + return + } + + _, err = c.PutObject(context.Background(), bucketName, objectName, tempfile, int64(length-offset), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + tempfile.Close() + + obj, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + defer obj.Close() + + n, err := obj.Seek(int64(offset), 0) + if err != nil { + logError(testName, function, args, startTime, "", "Seek failed", err) + return + } + if n != int64(offset) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Invalid offset returned, expected %d got %d", int64(offset), n), err) + return + } + + _, err = c.PutObject(context.Background(), bucketName, objectName+"getobject", obj, int64(length-offset), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + st, err := c.StatObject(context.Background(), bucketName, objectName+"getobject", minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + if st.Size != int64(length-offset) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Invalid offset returned, expected %d got %d", int64(length-offset), n), err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests bucket re-create errors. +func testMakeBucketErrorV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "MakeBucket(bucketName, region)" + args := map[string]interface{}{ + "bucketName": "", + "region": "eu-west-1", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + + // 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-") + region := "eu-west-1" + args["bucketName"] = bucketName + args["region"] = region + + // Make a new bucket in 'eu-west-1'. + if err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: region}); err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + if err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: region}); err == nil { + logError(testName, function, args, startTime, "", "MakeBucket did not fail for existing bucket name", err) + return + } + // Verify valid error response from server. + if minio.ToErrorResponse(err).Code != "BucketAlreadyExists" && + minio.ToErrorResponse(err).Code != "BucketAlreadyOwnedByYou" { + logError(testName, function, args, startTime, "", "Invalid error returned by server", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test get object reader to not throw error on being closed twice. +func testGetObjectClosedTwiceV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "MakeBucket(bucketName, region)" + args := map[string]interface{}{ + "bucketName": "", + "region": "eu-west-1", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate 33K of data. + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes does not match, expected "+string(bufSize)+" got "+string(st.Size), err) + return + } + if err := r.Close(); err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + if err := r.Close(); err == nil { + logError(testName, function, args, startTime, "", "Object is already closed, should return error", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests FPutObject hidden contentType setting +func testFPutObjectV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "FPutObject(bucketName, objectName, fileName, opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "fileName": "", + "opts": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Make a temp file with 11*1024*1024 bytes of data. + file, err := ioutil.TempFile(os.TempDir(), "FPutObjectTest") + if err != nil { + logError(testName, function, args, startTime, "", "TempFile creation failed", err) + return + } + + r := bytes.NewReader(bytes.Repeat([]byte("b"), 11*1024*1024)) + n, err := io.CopyN(file, r, 11*1024*1024) + if err != nil { + logError(testName, function, args, startTime, "", "Copy failed", err) + return + } + if n != int64(11*1024*1024) { + logError(testName, function, args, startTime, "", "Number of bytes does not match, expected "+string(int64(11*1024*1024))+" got "+string(n), err) + return + } + + // Close the file pro-actively for windows. + err = file.Close() + if err != nil { + logError(testName, function, args, startTime, "", "File close failed", err) + return + } + + // Set base object name + objectName := bucketName + "FPutObject" + args["objectName"] = objectName + args["fileName"] = file.Name() + + // Perform standard FPutObject with contentType provided (Expecting application/octet-stream) + _, err = c.FPutObject(context.Background(), bucketName, objectName+"-standard", file.Name(), minio.PutObjectOptions{ContentType: "application/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "FPutObject failed", err) + return + } + + // Perform FPutObject with no contentType provided (Expecting application/octet-stream) + args["objectName"] = objectName + "-Octet" + args["contentType"] = "" + + _, err = c.FPutObject(context.Background(), bucketName, objectName+"-Octet", file.Name(), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "FPutObject failed", err) + return + } + + // Add extension to temp file name + fileName := file.Name() + err = os.Rename(fileName, fileName+".gtar") + if err != nil { + logError(testName, function, args, startTime, "", "Rename failed", err) + return + } + + // Perform FPutObject with no contentType provided (Expecting application/x-gtar) + args["objectName"] = objectName + "-Octet" + args["contentType"] = "" + args["fileName"] = fileName + ".gtar" + + _, err = c.FPutObject(context.Background(), bucketName, objectName+"-GTar", fileName+".gtar", minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "FPutObject failed", err) + return + } + + // Check headers and sizes + rStandard, err := c.StatObject(context.Background(), bucketName, objectName+"-standard", minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + + if rStandard.Size != 11*1024*1024 { + logError(testName, function, args, startTime, "", "Unexpected size", nil) + return + } + + if rStandard.ContentType != "application/octet-stream" { + logError(testName, function, args, startTime, "", "Content-Type headers mismatched, expected: application/octet-stream , got "+rStandard.ContentType, err) + return + } + + rOctet, err := c.StatObject(context.Background(), bucketName, objectName+"-Octet", minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + if rOctet.ContentType != "application/octet-stream" { + logError(testName, function, args, startTime, "", "Content-Type headers mismatched, expected: application/octet-stream , got "+rOctet.ContentType, err) + return + } + + if rOctet.Size != 11*1024*1024 { + logError(testName, function, args, startTime, "", "Unexpected size", nil) + return + } + + rGTar, err := c.StatObject(context.Background(), bucketName, objectName+"-GTar", minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + if rGTar.Size != 11*1024*1024 { + logError(testName, function, args, startTime, "", "Unexpected size", nil) + return + } + if rGTar.ContentType != "application/x-gtar" && rGTar.ContentType != "application/octet-stream" { + logError(testName, function, args, startTime, "", "Content-Type headers mismatched, expected: application/x-gtar , got "+rGTar.ContentType, err) + return + } + + os.Remove(fileName + ".gtar") + successLogger(testName, function, args, startTime).Info() +} + +// Tests various bucket supported formats. +func testMakeBucketRegionsV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "MakeBucket(bucketName, region)" + args := map[string]interface{}{ + "bucketName": "", + "region": "eu-west-1", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket in 'eu-central-1'. + if err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "eu-west-1"}); err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + if err = cleanupBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed while removing bucket recursively", err) + return + } + + // Make a new bucket with '.' in its name, in 'us-west-2'. This + // request is internally staged into a path style instead of + // virtual host style. + if err = c.MakeBucket(context.Background(), bucketName+".withperiod", minio.MakeBucketOptions{Region: "us-west-2"}); err != nil { + args["bucketName"] = bucketName + ".withperiod" + args["region"] = "us-west-2" + logError(testName, function, args, startTime, "", "MakeBucket test with a bucket name with period, '.', failed", err) + return + } + + // Delete all objects and buckets + if err = cleanupBucket(bucketName+".withperiod", c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed while removing bucket recursively", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests get object ReaderSeeker interface methods. +func testGetObjectReadSeekFunctionalV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate 33K of data. + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + // Save the data. + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + defer r.Close() + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes in stat does not match, expected "+string(int64(bufSize))+" got "+string(st.Size), err) + return + } + + offset := int64(2048) + n, err := r.Seek(offset, 0) + if err != nil { + logError(testName, function, args, startTime, "", "Seek failed", err) + return + } + if n != offset { + logError(testName, function, args, startTime, "", "Number of seeked bytes does not match, expected "+string(offset)+" got "+string(n), err) + return + } + n, err = r.Seek(0, 1) + if err != nil { + logError(testName, function, args, startTime, "", "Seek failed", err) + return + } + if n != offset { + logError(testName, function, args, startTime, "", "Number of seeked bytes does not match, expected "+string(offset)+" got "+string(n), err) + return + } + _, err = r.Seek(offset, 2) + if err == nil { + logError(testName, function, args, startTime, "", "Seek on positive offset for whence '2' should error out", err) + return + } + n, err = r.Seek(-offset, 2) + if err != nil { + logError(testName, function, args, startTime, "", "Seek failed", err) + return + } + if n != st.Size-offset { + logError(testName, function, args, startTime, "", "Number of seeked bytes does not match, expected "+string(st.Size-offset)+" got "+string(n), err) + return + } + + var buffer1 bytes.Buffer + if _, err = io.CopyN(&buffer1, r, st.Size); err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "Copy failed", err) + return + } + } + if !bytes.Equal(buf[len(buf)-int(offset):], buffer1.Bytes()) { + logError(testName, function, args, startTime, "", "Incorrect read bytes v/s original buffer", err) + return + } + + // Seek again and read again. + n, err = r.Seek(offset-1, 0) + if err != nil { + logError(testName, function, args, startTime, "", "Seek failed", err) + return + } + if n != (offset - 1) { + logError(testName, function, args, startTime, "", "Number of seeked bytes does not match, expected "+string(offset-1)+" got "+string(n), err) + return + } + + var buffer2 bytes.Buffer + if _, err = io.CopyN(&buffer2, r, st.Size); err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "Copy failed", err) + return + } + } + // Verify now lesser bytes. + if !bytes.Equal(buf[2047:], buffer2.Bytes()) { + logError(testName, function, args, startTime, "", "Incorrect read bytes v/s original buffer", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests get object ReaderAt interface methods. +func testGetObjectReadAtFunctionalV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(bucketName, objectName)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate 33K of data. + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + buf, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + + // Save the data + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Read the data back + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + defer r.Close() + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes does not match, expected "+string(bufSize)+" got "+string(st.Size), err) + return + } + + offset := int64(2048) + + // Read directly + buf2 := make([]byte, 512) + buf3 := make([]byte, 512) + buf4 := make([]byte, 512) + + m, err := r.ReadAt(buf2, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf2) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf2))+" got "+string(m), err) + return + } + if !bytes.Equal(buf2, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + offset += 512 + m, err = r.ReadAt(buf3, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf3) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf3))+" got "+string(m), err) + return + } + if !bytes.Equal(buf3, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + offset += 512 + m, err = r.ReadAt(buf4, offset) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + if m != len(buf4) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf4))+" got "+string(m), err) + return + } + if !bytes.Equal(buf4, buf[offset:offset+512]) { + logError(testName, function, args, startTime, "", "Incorrect read between two ReadAt from same offset", err) + return + } + + buf5 := make([]byte, bufSize) + // Read the whole object. + m, err = r.ReadAt(buf5, 0) + if err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + } + if m != len(buf5) { + logError(testName, function, args, startTime, "", "ReadAt read shorter bytes before reaching EOF, expected "+string(len(buf5))+" got "+string(m), err) + return + } + if !bytes.Equal(buf, buf5) { + logError(testName, function, args, startTime, "", "Incorrect data read in GetObject, than what was previously uploaded", err) + return + } + + buf6 := make([]byte, bufSize+1) + // Read the whole object and beyond. + _, err = r.ReadAt(buf6, 0) + if err != nil { + if err != io.EOF { + logError(testName, function, args, startTime, "", "ReadAt failed", err) + return + } + } + + successLogger(testName, function, args, startTime).Info() +} + +// Tests copy object +func testCopyObjectV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + + // 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 in 'us-east-1' (source bucket). + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, c) + + // Make a new bucket in 'us-east-1' (destination bucket). + err = c.MakeBucket(context.Background(), bucketName+"-copy", minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName+"-copy", c) + + // Generate 33K of data. + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + r, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + // Check the various fields of source object against destination object. + objInfo, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + r.Close() + + // Copy Source + src := minio.CopySrcOptions{ + Bucket: bucketName, + Object: objectName, + MatchModifiedSince: time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC), + MatchETag: objInfo.ETag, + } + args["source"] = src + + // Set copy conditions. + dst := minio.CopyDestOptions{ + Bucket: bucketName + "-copy", + Object: objectName + "-copy", + } + args["destination"] = dst + + // Perform the Copy + _, err = c.CopyObject(context.Background(), dst, src) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObject failed", err) + return + } + + // Source object + r, err = c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + // Destination object + readerCopy, err := c.GetObject(context.Background(), bucketName+"-copy", objectName+"-copy", minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + // Check the various fields of source object against destination object. + objInfo, err = r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + objInfoCopy, err := readerCopy.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + if objInfo.Size != objInfoCopy.Size { + logError(testName, function, args, startTime, "", "Number of bytes does not match, expected "+string(objInfoCopy.Size)+" got "+string(objInfo.Size), err) + return + } + + // Close all the readers. + r.Close() + readerCopy.Close() + + // CopyObject again but with wrong conditions + src = minio.CopySrcOptions{ + Bucket: bucketName, + Object: objectName, + MatchUnmodifiedSince: time.Date(2014, time.April, 0, 0, 0, 0, 0, time.UTC), + NoMatchETag: objInfo.ETag, + } + + // Perform the Copy which should fail + _, err = c.CopyObject(context.Background(), dst, src) + if err == nil { + logError(testName, function, args, startTime, "", "CopyObject did not fail for invalid conditions", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testComposeObjectErrorCasesWrapper(c *minio.Client) { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "ComposeObject(destination, sourceList)" + args := map[string]interface{}{} + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + + // Make a new bucket in 'us-east-1' (source bucket). + err := c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Test that more than 10K source objects cannot be + // concatenated. + srcArr := [10001]minio.CopySrcOptions{} + srcSlice := srcArr[:] + dst := minio.CopyDestOptions{ + Bucket: bucketName, + Object: "object", + } + + args["destination"] = dst + // Just explain about srcArr in args["sourceList"] + // to stop having 10,001 null headers logged + args["sourceList"] = "source array of 10,001 elements" + if _, err := c.ComposeObject(context.Background(), dst, srcSlice...); err == nil { + logError(testName, function, args, startTime, "", "Expected error in ComposeObject", err) + return + } else if err.Error() != "There must be as least one and up to 10000 source objects." { + logError(testName, function, args, startTime, "", "Got unexpected error", err) + return + } + + // Create a source with invalid offset spec and check that + // error is returned: + // 1. Create the source object. + const badSrcSize = 5 * 1024 * 1024 + buf := bytes.Repeat([]byte("1"), badSrcSize) + _, err = c.PutObject(context.Background(), bucketName, "badObject", bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + // 2. Set invalid range spec on the object (going beyond + // object size) + badSrc := minio.CopySrcOptions{ + Bucket: bucketName, + Object: "badObject", + MatchRange: true, + Start: 1, + End: badSrcSize, + } + + // 3. ComposeObject call should fail. + if _, err := c.ComposeObject(context.Background(), dst, badSrc); err == nil { + logError(testName, function, args, startTime, "", "ComposeObject expected to fail", err) + return + } else if !strings.Contains(err.Error(), "has invalid segment-to-copy") { + logError(testName, function, args, startTime, "", "Got invalid error", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test expected error cases +func testComposeObjectErrorCasesV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "ComposeObject(destination, sourceList)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + + testComposeObjectErrorCasesWrapper(c) +} + +func testComposeMultipleSources(c *minio.Client) { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "ComposeObject(destination, sourceList)" + args := map[string]interface{}{ + "destination": "", + "sourceList": "", + } + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + // Make a new bucket in 'us-east-1' (source bucket). + err := c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Upload a small source object + const srcSize = 1024 * 1024 * 5 + buf := bytes.Repeat([]byte("1"), srcSize) + _, err = c.PutObject(context.Background(), bucketName, "srcObject", bytes.NewReader(buf), int64(srcSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // We will append 10 copies of the object. + srcs := []minio.CopySrcOptions{} + for i := 0; i < 10; i++ { + srcs = append(srcs, minio.CopySrcOptions{ + Bucket: bucketName, + Object: "srcObject", + }) + } + + // make the last part very small + srcs[9].MatchRange = true + + args["sourceList"] = srcs + + dst := minio.CopyDestOptions{ + Bucket: bucketName, + Object: "dstObject", + } + args["destination"] = dst + + ui, err := c.ComposeObject(context.Background(), dst, srcs...) + if err != nil { + logError(testName, function, args, startTime, "", "ComposeObject failed", err) + return + } + + if ui.Size != 9*srcSize+1 { + logError(testName, function, args, startTime, "", "ComposeObject returned unexpected size", err) + return + } + + objProps, err := c.StatObject(context.Background(), bucketName, "dstObject", minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + + if objProps.Size != 9*srcSize+1 { + logError(testName, function, args, startTime, "", "Size mismatched! Expected "+string(10000*srcSize)+" got "+string(objProps.Size), err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test concatenating multiple 10K objects V2 +func testCompose10KSourcesV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "ComposeObject(destination, sourceList)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + + testComposeMultipleSources(c) +} + +func testEncryptedEmptyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PutObject(bucketName, objectName, reader, objectSize, opts)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + args["bucketName"] = bucketName + // Make a new bucket in 'us-east-1' (source bucket). + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + sse := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"object")) + + // 1. create an sse-c encrypted object to copy by uploading + const srcSize = 0 + var buf []byte // Empty buffer + args["objectName"] = "object" + _, err = c.PutObject(context.Background(), bucketName, "object", bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ServerSideEncryption: sse}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + + // 2. Test CopyObject for an empty object + src := minio.CopySrcOptions{ + Bucket: bucketName, + Object: "object", + Encryption: sse, + } + + dst := minio.CopyDestOptions{ + Bucket: bucketName, + Object: "new-object", + Encryption: sse, + } + + if _, err = c.CopyObject(context.Background(), dst, src); err != nil { + function = "CopyObject(dst, src)" + logError(testName, function, map[string]interface{}{}, startTime, "", "CopyObject failed", err) + return + } + + // 3. Test Key rotation + newSSE := encrypt.DefaultPBKDF([]byte("Don't Panic"), []byte(bucketName+"new-object")) + src = minio.CopySrcOptions{ + Bucket: bucketName, + Object: "new-object", + Encryption: sse, + } + + dst = minio.CopyDestOptions{ + Bucket: bucketName, + Object: "new-object", + Encryption: newSSE, + } + + if _, err = c.CopyObject(context.Background(), dst, src); err != nil { + function = "CopyObject(dst, src)" + logError(testName, function, map[string]interface{}{}, startTime, "", "CopyObject with key rotation failed", err) + return + } + + // 4. Download the object. + reader, err := c.GetObject(context.Background(), bucketName, "new-object", minio.GetObjectOptions{ServerSideEncryption: newSSE}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + defer reader.Close() + + decBytes, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, map[string]interface{}{}, startTime, "", "ReadAll failed", err) + return + } + if !bytes.Equal(decBytes, buf) { + logError(testName, function, map[string]interface{}{}, startTime, "", "Downloaded object doesn't match the empty encrypted object", err) + return + } + + delete(args, "objectName") + successLogger(testName, function, args, startTime).Info() +} + +func testEncryptedCopyObjectWrapper(c *minio.Client, bucketName string, sseSrc, sseDst encrypt.ServerSide) { + // initialize logging params + startTime := time.Now() + testName := getFuncNameLoc(2) + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + var srcEncryption, dstEncryption encrypt.ServerSide + + // Make a new bucket in 'us-east-1' (source bucket). + err := c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // 1. create an sse-c encrypted object to copy by uploading + const srcSize = 1024 * 1024 + buf := bytes.Repeat([]byte("abcde"), srcSize) // gives a buffer of 5MiB + _, err = c.PutObject(context.Background(), bucketName, "srcObject", bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ + ServerSideEncryption: sseSrc, + }) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + + if sseSrc != nil && sseSrc.Type() != encrypt.S3 { + srcEncryption = sseSrc + } + + // 2. copy object and change encryption key + src := minio.CopySrcOptions{ + Bucket: bucketName, + Object: "srcObject", + Encryption: srcEncryption, + } + args["source"] = src + + dst := minio.CopyDestOptions{ + Bucket: bucketName, + Object: "dstObject", + Encryption: sseDst, + } + args["destination"] = dst + + _, err = c.CopyObject(context.Background(), dst, src) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObject failed", err) + return + } + + if sseDst != nil && sseDst.Type() != encrypt.S3 { + dstEncryption = sseDst + } + // 3. get copied object and check if content is equal + coreClient := minio.Core{c} + reader, _, _, err := coreClient.GetObject(context.Background(), bucketName, "dstObject", minio.GetObjectOptions{ServerSideEncryption: dstEncryption}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + decBytes, err := ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + if !bytes.Equal(decBytes, buf) { + logError(testName, function, args, startTime, "", "Downloaded object mismatched for encrypted object", err) + return + } + reader.Close() + + // Test key rotation for source object in-place. + var newSSE encrypt.ServerSide + if sseSrc != nil && sseSrc.Type() == encrypt.SSEC { + newSSE = encrypt.DefaultPBKDF([]byte("Don't Panic"), []byte(bucketName+"srcObject")) // replace key + } + if sseSrc != nil && sseSrc.Type() == encrypt.S3 { + newSSE = encrypt.NewSSE() + } + if newSSE != nil { + dst = minio.CopyDestOptions{ + Bucket: bucketName, + Object: "srcObject", + Encryption: newSSE, + } + args["destination"] = dst + + _, err = c.CopyObject(context.Background(), dst, src) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObject failed", err) + return + } + + // Get copied object and check if content is equal + reader, _, _, err = coreClient.GetObject(context.Background(), bucketName, "srcObject", minio.GetObjectOptions{ServerSideEncryption: newSSE}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + decBytes, err = ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + if !bytes.Equal(decBytes, buf) { + logError(testName, function, args, startTime, "", "Downloaded object mismatched for encrypted object", err) + return + } + reader.Close() + + // Test in-place decryption. + dst = minio.CopyDestOptions{ + Bucket: bucketName, + Object: "srcObject", + } + args["destination"] = dst + + src = minio.CopySrcOptions{ + Bucket: bucketName, + Object: "srcObject", + Encryption: newSSE, + } + args["source"] = src + _, err = c.CopyObject(context.Background(), dst, src) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObject Key rotation failed", err) + return + } + } + + // Get copied decrypted object and check if content is equal + reader, _, _, err = coreClient.GetObject(context.Background(), bucketName, "srcObject", minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + defer reader.Close() + + decBytes, err = ioutil.ReadAll(reader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + if !bytes.Equal(decBytes, buf) { + logError(testName, function, args, startTime, "", "Downloaded object mismatched for encrypted object", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test encrypted copy object +func testUnencryptedToSSECCopyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + + sseDst := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"dstObject")) + // c.TraceOn(os.Stderr) + testEncryptedCopyObjectWrapper(c, bucketName, nil, sseDst) +} + +// Test encrypted copy object +func testUnencryptedToSSES3CopyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + + var sseSrc encrypt.ServerSide + sseDst := encrypt.NewSSE() + // c.TraceOn(os.Stderr) + testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst) +} + +// Test encrypted copy object +func testUnencryptedToUnencryptedCopyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + + var sseSrc, sseDst encrypt.ServerSide + // c.TraceOn(os.Stderr) + testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst) +} + +// Test encrypted copy object +func testEncryptedSSECToSSECCopyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + + sseSrc := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"srcObject")) + sseDst := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"dstObject")) + // c.TraceOn(os.Stderr) + testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst) +} + +// Test encrypted copy object +func testEncryptedSSECToSSES3CopyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + + sseSrc := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"srcObject")) + sseDst := encrypt.NewSSE() + // c.TraceOn(os.Stderr) + testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst) +} + +// Test encrypted copy object +func testEncryptedSSECToUnencryptedCopyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + + sseSrc := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"srcObject")) + var sseDst encrypt.ServerSide + // c.TraceOn(os.Stderr) + testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst) +} + +// Test encrypted copy object +func testEncryptedSSES3ToSSECCopyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + + sseSrc := encrypt.NewSSE() + sseDst := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"dstObject")) + // c.TraceOn(os.Stderr) + testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst) +} + +// Test encrypted copy object +func testEncryptedSSES3ToSSES3CopyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + + sseSrc := encrypt.NewSSE() + sseDst := encrypt.NewSSE() + // c.TraceOn(os.Stderr) + testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst) +} + +// Test encrypted copy object +func testEncryptedSSES3ToUnencryptedCopyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + + sseSrc := encrypt.NewSSE() + var sseDst encrypt.ServerSide + // c.TraceOn(os.Stderr) + testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst) +} + +// Test encrypted copy object +func testEncryptedCopyObjectV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + + sseSrc := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"srcObject")) + sseDst := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+"dstObject")) + // c.TraceOn(os.Stderr) + testEncryptedCopyObjectWrapper(c, bucketName, sseSrc, sseDst) +} + +func testDecryptedCopyObject() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v2 client object creation failed", err) + return + } + + bucketName, objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-"), "object" + if err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}); err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + encryption := encrypt.DefaultPBKDF([]byte("correct horse battery staple"), []byte(bucketName+objectName)) + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(bytes.Repeat([]byte("a"), 1024*1024)), 1024*1024, minio.PutObjectOptions{ + ServerSideEncryption: encryption, + }) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + + src := minio.CopySrcOptions{ + Bucket: bucketName, + Object: objectName, + Encryption: encrypt.SSECopy(encryption), + } + args["source"] = src + + dst := minio.CopyDestOptions{ + Bucket: bucketName, + Object: "decrypted-" + objectName, + } + args["destination"] = dst + + if _, err = c.CopyObject(context.Background(), dst, src); err != nil { + logError(testName, function, args, startTime, "", "CopyObject failed", err) + return + } + if _, err = c.GetObject(context.Background(), bucketName, "decrypted-"+objectName, minio.GetObjectOptions{}); err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + successLogger(testName, function, args, startTime).Info() +} + +func testSSECMultipartEncryptedToSSECCopyObjectPart() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObjectPart(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + client, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Instantiate new core client object. + c := minio.Core{client} + + // 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(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, client) + // Make a buffer with 6MB of data + buf := bytes.Repeat([]byte("abcdef"), 1024*1024) + + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + password := "correct horse battery staple" + srcencryption := encrypt.DefaultPBKDF([]byte(password), []byte(bucketName+objectName)) + + // Upload a 6MB object using multipart mechanism + uploadID, err := c.NewMultipartUpload(context.Background(), bucketName, objectName, minio.PutObjectOptions{ServerSideEncryption: srcencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "NewMultipartUpload call failed", err) + return + } + + var completeParts []minio.CompletePart + + part, err := c.PutObjectPart(context.Background(), bucketName, objectName, uploadID, 1, bytes.NewReader(buf[:5*1024*1024]), 5*1024*1024, "", "", srcencryption) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectPart call failed", err) + return + } + completeParts = append(completeParts, minio.CompletePart{PartNumber: part.PartNumber, ETag: part.ETag}) + + part, err = c.PutObjectPart(context.Background(), bucketName, objectName, uploadID, 2, bytes.NewReader(buf[5*1024*1024:]), 1024*1024, "", "", srcencryption) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectPart call failed", err) + return + } + completeParts = append(completeParts, minio.CompletePart{PartNumber: part.PartNumber, ETag: part.ETag}) + + // Complete the multipart upload + _, err = c.CompleteMultipartUpload(context.Background(), bucketName, objectName, uploadID, completeParts, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err) + return + } + + // Stat the object and check its length matches + objInfo, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{ServerSideEncryption: srcencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + destBucketName := bucketName + destObjectName := objectName + "-dest" + dstencryption := encrypt.DefaultPBKDF([]byte(password), []byte(destBucketName+destObjectName)) + + uploadID, err = c.NewMultipartUpload(context.Background(), destBucketName, destObjectName, minio.PutObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "NewMultipartUpload call failed", err) + return + } + + // Content of the destination object will be two copies of + // `objectName` concatenated, followed by first byte of + // `objectName`. + metadata := make(map[string]string) + header := make(http.Header) + encrypt.SSECopy(srcencryption).Marshal(header) + dstencryption.Marshal(header) + for k, v := range header { + metadata[k] = v[0] + } + + metadata["x-amz-copy-source-if-match"] = objInfo.ETag + + // First of three parts + fstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 1, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Second of three parts + sndPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 2, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Last of three parts + lstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 3, 0, 1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Complete the multipart upload + _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err) + return + } + + // Stat the object and check its length matches + objInfo, err = c.StatObject(context.Background(), destBucketName, destObjectName, minio.StatObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if objInfo.Size != (6*1024*1024)*2+1 { + logError(testName, function, args, startTime, "", "Destination object has incorrect size!", err) + return + } + + // Now we read the data back + getOpts := minio.GetObjectOptions{ServerSideEncryption: dstencryption} + getOpts.SetRange(0, 6*1024*1024-1) + r, _, _, err := c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf := make([]byte, 6*1024*1024) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf, buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in first 6MB", err) + return + } + + getOpts.SetRange(6*1024*1024, 0) + r, _, _, err = c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf = make([]byte, 6*1024*1024+1) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf[:6*1024*1024], buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in second 6MB", err) + return + } + if getBuf[6*1024*1024] != buf[0] { + logError(testName, function, args, startTime, "", "Got unexpected data in last byte of copied object!", err) + return + } + + successLogger(testName, function, args, startTime).Info() + + // Do not need to remove destBucketName its same as bucketName. +} + +// Test Core CopyObjectPart implementation +func testSSECEncryptedToSSECCopyObjectPart() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObjectPart(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + client, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Instantiate new core client object. + c := minio.Core{client} + + // 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(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, client) + // 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()), "") + password := "correct horse battery staple" + srcencryption := encrypt.DefaultPBKDF([]byte(password), []byte(bucketName+objectName)) + putmetadata := map[string]string{ + "Content-Type": "binary/octet-stream", + } + opts := minio.PutObjectOptions{ + UserMetadata: putmetadata, + ServerSideEncryption: srcencryption, + } + uploadInfo, err := c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", opts) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{ServerSideEncryption: srcencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if st.Size != int64(len(buf)) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Error: number of bytes does not match, want %v, got %v\n", len(buf), st.Size), err) + return + } + + destBucketName := bucketName + destObjectName := objectName + "-dest" + dstencryption := encrypt.DefaultPBKDF([]byte(password), []byte(destBucketName+destObjectName)) + + uploadID, err := c.NewMultipartUpload(context.Background(), destBucketName, destObjectName, minio.PutObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "NewMultipartUpload call failed", err) + return + } + + // Content of the destination object will be two copies of + // `objectName` concatenated, followed by first byte of + // `objectName`. + metadata := make(map[string]string) + header := make(http.Header) + encrypt.SSECopy(srcencryption).Marshal(header) + dstencryption.Marshal(header) + for k, v := range header { + metadata[k] = v[0] + } + + metadata["x-amz-copy-source-if-match"] = uploadInfo.ETag + + // First of three parts + fstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 1, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Second of three parts + sndPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 2, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Last of three parts + lstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 3, 0, 1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Complete the multipart upload + _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err) + return + } + + // Stat the object and check its length matches + objInfo, err := c.StatObject(context.Background(), destBucketName, destObjectName, minio.StatObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if objInfo.Size != (5*1024*1024)*2+1 { + logError(testName, function, args, startTime, "", "Destination object has incorrect size!", err) + return + } + + // Now we read the data back + getOpts := minio.GetObjectOptions{ServerSideEncryption: dstencryption} + getOpts.SetRange(0, 5*1024*1024-1) + r, _, _, err := c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf := make([]byte, 5*1024*1024) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf, buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in first 5MB", err) + return + } + + getOpts.SetRange(5*1024*1024, 0) + r, _, _, err = c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf = make([]byte, 5*1024*1024+1) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf[:5*1024*1024], buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in second 5MB", err) + return + } + if getBuf[5*1024*1024] != buf[0] { + logError(testName, function, args, startTime, "", "Got unexpected data in last byte of copied object!", err) + return + } + + successLogger(testName, function, args, startTime).Info() + + // Do not need to remove destBucketName its same as bucketName. +} + +// Test Core CopyObjectPart implementation for SSEC encrypted to unencrypted copy +func testSSECEncryptedToUnencryptedCopyPart() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObjectPart(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + client, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Instantiate new core client object. + c := minio.Core{client} + + // 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(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, client) + // 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()), "") + password := "correct horse battery staple" + srcencryption := encrypt.DefaultPBKDF([]byte(password), []byte(bucketName+objectName)) + + opts := minio.PutObjectOptions{ + UserMetadata: map[string]string{ + "Content-Type": "binary/octet-stream", + }, + ServerSideEncryption: srcencryption, + } + uploadInfo, err := c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", opts) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{ServerSideEncryption: srcencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if st.Size != int64(len(buf)) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Error: number of bytes does not match, want %v, got %v\n", len(buf), st.Size), err) + return + } + + destBucketName := bucketName + destObjectName := objectName + "-dest" + var dstencryption encrypt.ServerSide + + uploadID, err := c.NewMultipartUpload(context.Background(), destBucketName, destObjectName, minio.PutObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "NewMultipartUpload call failed", err) + return + } + + // Content of the destination object will be two copies of + // `objectName` concatenated, followed by first byte of + // `objectName`. + metadata := make(map[string]string) + header := make(http.Header) + encrypt.SSECopy(srcencryption).Marshal(header) + for k, v := range header { + metadata[k] = v[0] + } + + metadata["x-amz-copy-source-if-match"] = uploadInfo.ETag + + // First of three parts + fstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 1, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Second of three parts + sndPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 2, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Last of three parts + lstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 3, 0, 1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Complete the multipart upload + _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err) + return + } + + // Stat the object and check its length matches + objInfo, err := c.StatObject(context.Background(), destBucketName, destObjectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if objInfo.Size != (5*1024*1024)*2+1 { + logError(testName, function, args, startTime, "", "Destination object has incorrect size!", err) + return + } + + // Now we read the data back + getOpts := minio.GetObjectOptions{} + getOpts.SetRange(0, 5*1024*1024-1) + r, _, _, err := c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf := make([]byte, 5*1024*1024) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf, buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in first 5MB", err) + return + } + + getOpts.SetRange(5*1024*1024, 0) + r, _, _, err = c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf = make([]byte, 5*1024*1024+1) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf[:5*1024*1024], buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in second 5MB", err) + return + } + if getBuf[5*1024*1024] != buf[0] { + logError(testName, function, args, startTime, "", "Got unexpected data in last byte of copied object!", err) + return + } + + successLogger(testName, function, args, startTime).Info() + + // Do not need to remove destBucketName its same as bucketName. +} + +// Test Core CopyObjectPart implementation for SSEC encrypted to SSE-S3 encrypted copy +func testSSECEncryptedToSSES3CopyObjectPart() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObjectPart(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + client, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Instantiate new core client object. + c := minio.Core{client} + + // 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(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, client) + // 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()), "") + password := "correct horse battery staple" + srcencryption := encrypt.DefaultPBKDF([]byte(password), []byte(bucketName+objectName)) + putmetadata := map[string]string{ + "Content-Type": "binary/octet-stream", + } + opts := minio.PutObjectOptions{ + UserMetadata: putmetadata, + ServerSideEncryption: srcencryption, + } + + uploadInfo, err := c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", opts) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{ServerSideEncryption: srcencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if st.Size != int64(len(buf)) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Error: number of bytes does not match, want %v, got %v\n", len(buf), st.Size), err) + return + } + + destBucketName := bucketName + destObjectName := objectName + "-dest" + dstencryption := encrypt.NewSSE() + + uploadID, err := c.NewMultipartUpload(context.Background(), destBucketName, destObjectName, minio.PutObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "NewMultipartUpload call failed", err) + return + } + + // Content of the destination object will be two copies of + // `objectName` concatenated, followed by first byte of + // `objectName`. + metadata := make(map[string]string) + header := make(http.Header) + encrypt.SSECopy(srcencryption).Marshal(header) + dstencryption.Marshal(header) + + for k, v := range header { + metadata[k] = v[0] + } + + metadata["x-amz-copy-source-if-match"] = uploadInfo.ETag + + // First of three parts + fstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 1, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Second of three parts + sndPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 2, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Last of three parts + lstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 3, 0, 1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Complete the multipart upload + _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err) + return + } + + // Stat the object and check its length matches + objInfo, err := c.StatObject(context.Background(), destBucketName, destObjectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if objInfo.Size != (5*1024*1024)*2+1 { + logError(testName, function, args, startTime, "", "Destination object has incorrect size!", err) + return + } + + // Now we read the data back + getOpts := minio.GetObjectOptions{} + getOpts.SetRange(0, 5*1024*1024-1) + r, _, _, err := c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf := make([]byte, 5*1024*1024) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf, buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in first 5MB", err) + return + } + + getOpts.SetRange(5*1024*1024, 0) + r, _, _, err = c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf = make([]byte, 5*1024*1024+1) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf[:5*1024*1024], buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in second 5MB", err) + return + } + if getBuf[5*1024*1024] != buf[0] { + logError(testName, function, args, startTime, "", "Got unexpected data in last byte of copied object!", err) + return + } + + successLogger(testName, function, args, startTime).Info() + + // Do not need to remove destBucketName its same as bucketName. +} + +// Test Core CopyObjectPart implementation for unencrypted to SSEC encryption copy part +func testUnencryptedToSSECCopyObjectPart() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObjectPart(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + client, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Instantiate new core client object. + c := minio.Core{client} + + // 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(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, client) + // 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()), "") + password := "correct horse battery staple" + putmetadata := map[string]string{ + "Content-Type": "binary/octet-stream", + } + opts := minio.PutObjectOptions{ + UserMetadata: putmetadata, + } + uploadInfo, err := c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", opts) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if st.Size != int64(len(buf)) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Error: number of bytes does not match, want %v, got %v\n", len(buf), st.Size), err) + return + } + + destBucketName := bucketName + destObjectName := objectName + "-dest" + dstencryption := encrypt.DefaultPBKDF([]byte(password), []byte(destBucketName+destObjectName)) + + uploadID, err := c.NewMultipartUpload(context.Background(), destBucketName, destObjectName, minio.PutObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "NewMultipartUpload call failed", err) + return + } + + // Content of the destination object will be two copies of + // `objectName` concatenated, followed by first byte of + // `objectName`. + metadata := make(map[string]string) + header := make(http.Header) + dstencryption.Marshal(header) + for k, v := range header { + metadata[k] = v[0] + } + + metadata["x-amz-copy-source-if-match"] = uploadInfo.ETag + + // First of three parts + fstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 1, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Second of three parts + sndPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 2, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Last of three parts + lstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 3, 0, 1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Complete the multipart upload + _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err) + return + } + + // Stat the object and check its length matches + objInfo, err := c.StatObject(context.Background(), destBucketName, destObjectName, minio.StatObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if objInfo.Size != (5*1024*1024)*2+1 { + logError(testName, function, args, startTime, "", "Destination object has incorrect size!", err) + return + } + + // Now we read the data back + getOpts := minio.GetObjectOptions{ServerSideEncryption: dstencryption} + getOpts.SetRange(0, 5*1024*1024-1) + r, _, _, err := c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf := make([]byte, 5*1024*1024) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf, buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in first 5MB", err) + return + } + + getOpts.SetRange(5*1024*1024, 0) + r, _, _, err = c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf = make([]byte, 5*1024*1024+1) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf[:5*1024*1024], buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in second 5MB", err) + return + } + if getBuf[5*1024*1024] != buf[0] { + logError(testName, function, args, startTime, "", "Got unexpected data in last byte of copied object!", err) + return + } + + successLogger(testName, function, args, startTime).Info() + + // Do not need to remove destBucketName its same as bucketName. +} + +// Test Core CopyObjectPart implementation for unencrypted to unencrypted copy +func testUnencryptedToUnencryptedCopyPart() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObjectPart(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + client, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Instantiate new core client object. + c := minio.Core{client} + + // 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(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, client) + // 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()), "") + putmetadata := map[string]string{ + "Content-Type": "binary/octet-stream", + } + opts := minio.PutObjectOptions{ + UserMetadata: putmetadata, + } + uploadInfo, err := c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", opts) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if st.Size != int64(len(buf)) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Error: number of bytes does not match, want %v, got %v\n", len(buf), st.Size), err) + return + } + + destBucketName := bucketName + destObjectName := objectName + "-dest" + + uploadID, err := c.NewMultipartUpload(context.Background(), destBucketName, destObjectName, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "NewMultipartUpload call failed", err) + return + } + + // Content of the destination object will be two copies of + // `objectName` concatenated, followed by first byte of + // `objectName`. + metadata := make(map[string]string) + header := make(http.Header) + for k, v := range header { + metadata[k] = v[0] + } + + metadata["x-amz-copy-source-if-match"] = uploadInfo.ETag + + // First of three parts + fstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 1, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Second of three parts + sndPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 2, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Last of three parts + lstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 3, 0, 1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Complete the multipart upload + _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err) + return + } + + // Stat the object and check its length matches + objInfo, err := c.StatObject(context.Background(), destBucketName, destObjectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if objInfo.Size != (5*1024*1024)*2+1 { + logError(testName, function, args, startTime, "", "Destination object has incorrect size!", err) + return + } + + // Now we read the data back + getOpts := minio.GetObjectOptions{} + getOpts.SetRange(0, 5*1024*1024-1) + r, _, _, err := c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf := make([]byte, 5*1024*1024) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf, buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in first 5MB", err) + return + } + + getOpts.SetRange(5*1024*1024, 0) + r, _, _, err = c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf = make([]byte, 5*1024*1024+1) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf[:5*1024*1024], buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in second 5MB", err) + return + } + if getBuf[5*1024*1024] != buf[0] { + logError(testName, function, args, startTime, "", "Got unexpected data in last byte of copied object!", err) + return + } + + successLogger(testName, function, args, startTime).Info() + + // Do not need to remove destBucketName its same as bucketName. +} + +// Test Core CopyObjectPart implementation for unencrypted to SSE-S3 encrypted copy +func testUnencryptedToSSES3CopyObjectPart() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObjectPart(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + client, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Instantiate new core client object. + c := minio.Core{client} + + // 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(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, client) + // 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()), "") + opts := minio.PutObjectOptions{ + UserMetadata: map[string]string{ + "Content-Type": "binary/octet-stream", + }, + } + uploadInfo, err := c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", opts) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if st.Size != int64(len(buf)) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Error: number of bytes does not match, want %v, got %v\n", len(buf), st.Size), err) + return + } + + destBucketName := bucketName + destObjectName := objectName + "-dest" + dstencryption := encrypt.NewSSE() + + uploadID, err := c.NewMultipartUpload(context.Background(), destBucketName, destObjectName, minio.PutObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "NewMultipartUpload call failed", err) + return + } + + // Content of the destination object will be two copies of + // `objectName` concatenated, followed by first byte of + // `objectName`. + metadata := make(map[string]string) + header := make(http.Header) + dstencryption.Marshal(header) + + for k, v := range header { + metadata[k] = v[0] + } + + metadata["x-amz-copy-source-if-match"] = uploadInfo.ETag + + // First of three parts + fstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 1, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Second of three parts + sndPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 2, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Last of three parts + lstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 3, 0, 1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Complete the multipart upload + _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err) + return + } + + // Stat the object and check its length matches + objInfo, err := c.StatObject(context.Background(), destBucketName, destObjectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if objInfo.Size != (5*1024*1024)*2+1 { + logError(testName, function, args, startTime, "", "Destination object has incorrect size!", err) + return + } + + // Now we read the data back + getOpts := minio.GetObjectOptions{} + getOpts.SetRange(0, 5*1024*1024-1) + r, _, _, err := c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf := make([]byte, 5*1024*1024) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf, buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in first 5MB", err) + return + } + + getOpts.SetRange(5*1024*1024, 0) + r, _, _, err = c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf = make([]byte, 5*1024*1024+1) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf[:5*1024*1024], buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in second 5MB", err) + return + } + if getBuf[5*1024*1024] != buf[0] { + logError(testName, function, args, startTime, "", "Got unexpected data in last byte of copied object!", err) + return + } + + successLogger(testName, function, args, startTime).Info() + + // Do not need to remove destBucketName its same as bucketName. +} + +// Test Core CopyObjectPart implementation for SSE-S3 to SSEC encryption copy part +func testSSES3EncryptedToSSECCopyObjectPart() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObjectPart(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + client, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Instantiate new core client object. + c := minio.Core{client} + + // 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(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, client) + // 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()), "") + password := "correct horse battery staple" + srcEncryption := encrypt.NewSSE() + opts := minio.PutObjectOptions{ + UserMetadata: map[string]string{ + "Content-Type": "binary/octet-stream", + }, + ServerSideEncryption: srcEncryption, + } + uploadInfo, err := c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", opts) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{ServerSideEncryption: srcEncryption}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if st.Size != int64(len(buf)) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Error: number of bytes does not match, want %v, got %v\n", len(buf), st.Size), err) + return + } + + destBucketName := bucketName + destObjectName := objectName + "-dest" + dstencryption := encrypt.DefaultPBKDF([]byte(password), []byte(destBucketName+destObjectName)) + + uploadID, err := c.NewMultipartUpload(context.Background(), destBucketName, destObjectName, minio.PutObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "NewMultipartUpload call failed", err) + return + } + + // Content of the destination object will be two copies of + // `objectName` concatenated, followed by first byte of + // `objectName`. + metadata := make(map[string]string) + header := make(http.Header) + dstencryption.Marshal(header) + for k, v := range header { + metadata[k] = v[0] + } + + metadata["x-amz-copy-source-if-match"] = uploadInfo.ETag + + // First of three parts + fstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 1, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Second of three parts + sndPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 2, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Last of three parts + lstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 3, 0, 1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Complete the multipart upload + _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err) + return + } + + // Stat the object and check its length matches + objInfo, err := c.StatObject(context.Background(), destBucketName, destObjectName, minio.StatObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if objInfo.Size != (5*1024*1024)*2+1 { + logError(testName, function, args, startTime, "", "Destination object has incorrect size!", err) + return + } + + // Now we read the data back + getOpts := minio.GetObjectOptions{ServerSideEncryption: dstencryption} + getOpts.SetRange(0, 5*1024*1024-1) + r, _, _, err := c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf := make([]byte, 5*1024*1024) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf, buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in first 5MB", err) + return + } + + getOpts.SetRange(5*1024*1024, 0) + r, _, _, err = c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf = make([]byte, 5*1024*1024+1) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf[:5*1024*1024], buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in second 5MB", err) + return + } + if getBuf[5*1024*1024] != buf[0] { + logError(testName, function, args, startTime, "", "Got unexpected data in last byte of copied object!", err) + return + } + + successLogger(testName, function, args, startTime).Info() + + // Do not need to remove destBucketName its same as bucketName. +} + +// Test Core CopyObjectPart implementation for unencrypted to unencrypted copy +func testSSES3EncryptedToUnencryptedCopyPart() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObjectPart(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + client, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Instantiate new core client object. + c := minio.Core{client} + + // 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(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, client) + // 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()), "") + srcEncryption := encrypt.NewSSE() + opts := minio.PutObjectOptions{ + UserMetadata: map[string]string{ + "Content-Type": "binary/octet-stream", + }, + ServerSideEncryption: srcEncryption, + } + uploadInfo, err := c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", opts) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{ServerSideEncryption: srcEncryption}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if st.Size != int64(len(buf)) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Error: number of bytes does not match, want %v, got %v\n", len(buf), st.Size), err) + return + } + + destBucketName := bucketName + destObjectName := objectName + "-dest" + + uploadID, err := c.NewMultipartUpload(context.Background(), destBucketName, destObjectName, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "NewMultipartUpload call failed", err) + return + } + + // Content of the destination object will be two copies of + // `objectName` concatenated, followed by first byte of + // `objectName`. + metadata := make(map[string]string) + header := make(http.Header) + for k, v := range header { + metadata[k] = v[0] + } + + metadata["x-amz-copy-source-if-match"] = uploadInfo.ETag + + // First of three parts + fstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 1, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Second of three parts + sndPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 2, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Last of three parts + lstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 3, 0, 1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Complete the multipart upload + _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err) + return + } + + // Stat the object and check its length matches + objInfo, err := c.StatObject(context.Background(), destBucketName, destObjectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if objInfo.Size != (5*1024*1024)*2+1 { + logError(testName, function, args, startTime, "", "Destination object has incorrect size!", err) + return + } + + // Now we read the data back + getOpts := minio.GetObjectOptions{} + getOpts.SetRange(0, 5*1024*1024-1) + r, _, _, err := c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf := make([]byte, 5*1024*1024) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf, buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in first 5MB", err) + return + } + + getOpts.SetRange(5*1024*1024, 0) + r, _, _, err = c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf = make([]byte, 5*1024*1024+1) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf[:5*1024*1024], buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in second 5MB", err) + return + } + if getBuf[5*1024*1024] != buf[0] { + logError(testName, function, args, startTime, "", "Got unexpected data in last byte of copied object!", err) + return + } + + successLogger(testName, function, args, startTime).Info() + + // Do not need to remove destBucketName its same as bucketName. +} + +// Test Core CopyObjectPart implementation for unencrypted to SSE-S3 encrypted copy +func testSSES3EncryptedToSSES3CopyObjectPart() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObjectPart(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + client, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Instantiate new core client object. + c := minio.Core{client} + + // 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(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, client) + // 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()), "") + srcEncryption := encrypt.NewSSE() + opts := minio.PutObjectOptions{ + UserMetadata: map[string]string{ + "Content-Type": "binary/octet-stream", + }, + ServerSideEncryption: srcEncryption, + } + + uploadInfo, err := c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), "", "", opts) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{ServerSideEncryption: srcEncryption}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + if st.Size != int64(len(buf)) { + logError(testName, function, args, startTime, "", fmt.Sprintf("Error: number of bytes does not match, want %v, got %v\n", len(buf), st.Size), err) + return + } + + destBucketName := bucketName + destObjectName := objectName + "-dest" + dstencryption := encrypt.NewSSE() + + uploadID, err := c.NewMultipartUpload(context.Background(), destBucketName, destObjectName, minio.PutObjectOptions{ServerSideEncryption: dstencryption}) + if err != nil { + logError(testName, function, args, startTime, "", "NewMultipartUpload call failed", err) + return + } + + // Content of the destination object will be two copies of + // `objectName` concatenated, followed by first byte of + // `objectName`. + metadata := make(map[string]string) + header := make(http.Header) + dstencryption.Marshal(header) + + for k, v := range header { + metadata[k] = v[0] + } + + metadata["x-amz-copy-source-if-match"] = uploadInfo.ETag + + // First of three parts + fstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 1, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Second of three parts + sndPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 2, 0, -1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Last of three parts + lstPart, err := c.CopyObjectPart(context.Background(), bucketName, objectName, destBucketName, destObjectName, uploadID, 3, 0, 1, metadata) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObjectPart call failed", err) + return + } + + // Complete the multipart upload + _, err = c.CompleteMultipartUpload(context.Background(), destBucketName, destObjectName, uploadID, []minio.CompletePart{fstPart, sndPart, lstPart}, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "CompleteMultipartUpload call failed", err) + return + } + + // Stat the object and check its length matches + objInfo, err := c.StatObject(context.Background(), destBucketName, destObjectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject call failed", err) + return + } + + if objInfo.Size != (5*1024*1024)*2+1 { + logError(testName, function, args, startTime, "", "Destination object has incorrect size!", err) + return + } + + // Now we read the data back + getOpts := minio.GetObjectOptions{} + getOpts.SetRange(0, 5*1024*1024-1) + r, _, _, err := c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf := make([]byte, 5*1024*1024) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf, buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in first 5MB", err) + return + } + + getOpts.SetRange(5*1024*1024, 0) + r, _, _, err = c.GetObject(context.Background(), destBucketName, destObjectName, getOpts) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject call failed", err) + return + } + getBuf = make([]byte, 5*1024*1024+1) + _, err = readFull(r, getBuf) + if err != nil { + logError(testName, function, args, startTime, "", "Read buffer failed", err) + return + } + if !bytes.Equal(getBuf[:5*1024*1024], buf) { + logError(testName, function, args, startTime, "", "Got unexpected data in second 5MB", err) + return + } + if getBuf[5*1024*1024] != buf[0] { + logError(testName, function, args, startTime, "", "Got unexpected data in last byte of copied object!", err) + return + } + + successLogger(testName, function, args, startTime).Info() + + // Do not need to remove destBucketName its same as bucketName. +} +func testUserMetadataCopying() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + // c.TraceOn(os.Stderr) + testUserMetadataCopyingWrapper(c) +} + +func testUserMetadataCopyingWrapper(c *minio.Client) { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + // Make a new bucket in 'us-east-1' (source bucket). + err := c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + fetchMeta := func(object string) (h http.Header) { + objInfo, err := c.StatObject(context.Background(), bucketName, object, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + h = make(http.Header) + for k, vs := range objInfo.Metadata { + if strings.HasPrefix(strings.ToLower(k), "x-amz-meta-") { + h.Add(k, vs[0]) + } + } + return h + } + + // 1. create a client encrypted object to copy by uploading + const srcSize = 1024 * 1024 + buf := bytes.Repeat([]byte("abcde"), srcSize) // gives a buffer of 5MiB + metadata := make(http.Header) + metadata.Set("x-amz-meta-myheader", "myvalue") + m := make(map[string]string) + m["x-amz-meta-myheader"] = "myvalue" + _, err = c.PutObject(context.Background(), bucketName, "srcObject", + bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{UserMetadata: m}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectWithMetadata failed", err) + return + } + if !reflect.DeepEqual(metadata, fetchMeta("srcObject")) { + logError(testName, function, args, startTime, "", "Metadata match failed", err) + return + } + + // 2. create source + src := minio.CopySrcOptions{ + Bucket: bucketName, + Object: "srcObject", + } + + // 2.1 create destination with metadata set + dst1 := minio.CopyDestOptions{ + Bucket: bucketName, + Object: "dstObject-1", + UserMetadata: map[string]string{"notmyheader": "notmyvalue"}, + ReplaceMetadata: true, + } + + // 3. Check that copying to an object with metadata set resets + // the headers on the copy. + args["source"] = src + args["destination"] = dst1 + _, err = c.CopyObject(context.Background(), dst1, src) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObject failed", err) + return + } + + expectedHeaders := make(http.Header) + expectedHeaders.Set("x-amz-meta-notmyheader", "notmyvalue") + if !reflect.DeepEqual(expectedHeaders, fetchMeta("dstObject-1")) { + logError(testName, function, args, startTime, "", "Metadata match failed", err) + return + } + + // 4. create destination with no metadata set and same source + dst2 := minio.CopyDestOptions{ + Bucket: bucketName, + Object: "dstObject-2", + } + + // 5. Check that copying to an object with no metadata set, + // copies metadata. + args["source"] = src + args["destination"] = dst2 + _, err = c.CopyObject(context.Background(), dst2, src) + if err != nil { + logError(testName, function, args, startTime, "", "CopyObject failed", err) + return + } + + expectedHeaders = metadata + if !reflect.DeepEqual(expectedHeaders, fetchMeta("dstObject-2")) { + logError(testName, function, args, startTime, "", "Metadata match failed", err) + return + } + + // 6. Compose a pair of sources. + dst3 := minio.CopyDestOptions{ + Bucket: bucketName, + Object: "dstObject-3", + ReplaceMetadata: true, + } + + function = "ComposeObject(destination, sources)" + args["source"] = []minio.CopySrcOptions{src, src} + args["destination"] = dst3 + _, err = c.ComposeObject(context.Background(), dst3, src, src) + if err != nil { + logError(testName, function, args, startTime, "", "ComposeObject failed", err) + return + } + + // Check that no headers are copied in this case + if !reflect.DeepEqual(make(http.Header), fetchMeta("dstObject-3")) { + logError(testName, function, args, startTime, "", "Metadata match failed", err) + return + } + + // 7. Compose a pair of sources with dest user metadata set. + dst4 := minio.CopyDestOptions{ + Bucket: bucketName, + Object: "dstObject-4", + UserMetadata: map[string]string{"notmyheader": "notmyvalue"}, + ReplaceMetadata: true, + } + + function = "ComposeObject(destination, sources)" + args["source"] = []minio.CopySrcOptions{src, src} + args["destination"] = dst4 + _, err = c.ComposeObject(context.Background(), dst4, src, src) + if err != nil { + logError(testName, function, args, startTime, "", "ComposeObject failed", err) + return + } + + // Check that no headers are copied in this case + expectedHeaders = make(http.Header) + expectedHeaders.Set("x-amz-meta-notmyheader", "notmyvalue") + if !reflect.DeepEqual(expectedHeaders, fetchMeta("dstObject-4")) { + logError(testName, function, args, startTime, "", "Metadata match failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testUserMetadataCopyingV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "CopyObject(destination, source)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v2 object creation failed", err) + return + } + + // c.TraceOn(os.Stderr) + testUserMetadataCopyingWrapper(c) +} + +func testStorageClassMetadataPutObject() { + // initialize logging params + startTime := time.Now() + function := "testStorageClassMetadataPutObject()" + args := map[string]interface{}{} + testName := getFuncName() + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + // Make a new bucket in 'us-east-1' (source bucket). + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + fetchMeta := func(object string) (h http.Header) { + objInfo, err := c.StatObject(context.Background(), bucketName, object, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + h = make(http.Header) + for k, vs := range objInfo.Metadata { + if strings.HasPrefix(strings.ToLower(k), "x-amz-storage-class") { + for _, v := range vs { + h.Add(k, v) + } + } + } + return h + } + + metadata := make(http.Header) + metadata.Set("x-amz-storage-class", "REDUCED_REDUNDANCY") + + emptyMetadata := make(http.Header) + + const srcSize = 1024 * 1024 + buf := bytes.Repeat([]byte("abcde"), srcSize) // gives a buffer of 1MiB + + _, err = c.PutObject(context.Background(), bucketName, "srcObjectRRSClass", + bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{StorageClass: "REDUCED_REDUNDANCY"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Get the returned metadata + returnedMeta := fetchMeta("srcObjectRRSClass") + + // The response metada should either be equal to metadata (with REDUCED_REDUNDANCY) or emptyMetadata (in case of gateways) + if !reflect.DeepEqual(metadata, returnedMeta) && !reflect.DeepEqual(emptyMetadata, returnedMeta) { + logError(testName, function, args, startTime, "", "Metadata match failed", err) + return + } + + metadata = make(http.Header) + metadata.Set("x-amz-storage-class", "STANDARD") + + _, err = c.PutObject(context.Background(), bucketName, "srcObjectSSClass", + bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{StorageClass: "STANDARD"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + if reflect.DeepEqual(metadata, fetchMeta("srcObjectSSClass")) { + logError(testName, function, args, startTime, "", "Metadata verification failed, STANDARD storage class should not be a part of response metadata", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testStorageClassInvalidMetadataPutObject() { + // initialize logging params + startTime := time.Now() + function := "testStorageClassInvalidMetadataPutObject()" + args := map[string]interface{}{} + testName := getFuncName() + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + // Make a new bucket in 'us-east-1' (source bucket). + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + const srcSize = 1024 * 1024 + buf := bytes.Repeat([]byte("abcde"), srcSize) // gives a buffer of 1MiB + + _, err = c.PutObject(context.Background(), bucketName, "srcObjectRRSClass", + bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{StorageClass: "INVALID_STORAGE_CLASS"}) + if err == nil { + logError(testName, function, args, startTime, "", "PutObject with invalid storage class passed, was expected to fail", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +func testStorageClassMetadataCopyObject() { + // initialize logging params + startTime := time.Now() + function := "testStorageClassMetadataCopyObject()" + args := map[string]interface{}{} + testName := getFuncName() + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO v4 client object creation failed", err) + return + } + + // Generate a new random bucket name. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test") + // Make a new bucket in 'us-east-1' (source bucket). + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + fetchMeta := func(object string) (h http.Header) { + objInfo, err := c.StatObject(context.Background(), bucketName, object, minio.StatObjectOptions{}) + args["bucket"] = bucketName + args["object"] = object + if err != nil { + logError(testName, function, args, startTime, "", "Stat failed", err) + return + } + h = make(http.Header) + for k, vs := range objInfo.Metadata { + if strings.HasPrefix(strings.ToLower(k), "x-amz-storage-class") { + for _, v := range vs { + h.Add(k, v) + } + } + } + return h + } + + metadata := make(http.Header) + metadata.Set("x-amz-storage-class", "REDUCED_REDUNDANCY") + + emptyMetadata := make(http.Header) + + const srcSize = 1024 * 1024 + buf := bytes.Repeat([]byte("abcde"), srcSize) + + // Put an object with RRS Storage class + _, err = c.PutObject(context.Background(), bucketName, "srcObjectRRSClass", + bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{StorageClass: "REDUCED_REDUNDANCY"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Make server side copy of object uploaded in previous step + src := minio.CopySrcOptions{ + Bucket: bucketName, + Object: "srcObjectRRSClass", + } + dst := minio.CopyDestOptions{ + Bucket: bucketName, + Object: "srcObjectRRSClassCopy", + } + if _, err = c.CopyObject(context.Background(), dst, src); err != nil { + logError(testName, function, args, startTime, "", "CopyObject failed on RRS", err) + return + } + + // Get the returned metadata + returnedMeta := fetchMeta("srcObjectRRSClassCopy") + + // The response metada should either be equal to metadata (with REDUCED_REDUNDANCY) or emptyMetadata (in case of gateways) + if !reflect.DeepEqual(metadata, returnedMeta) && !reflect.DeepEqual(emptyMetadata, returnedMeta) { + logError(testName, function, args, startTime, "", "Metadata match failed", err) + return + } + + metadata = make(http.Header) + metadata.Set("x-amz-storage-class", "STANDARD") + + // Put an object with Standard Storage class + _, err = c.PutObject(context.Background(), bucketName, "srcObjectSSClass", + bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{StorageClass: "STANDARD"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Make server side copy of object uploaded in previous step + src = minio.CopySrcOptions{ + Bucket: bucketName, + Object: "srcObjectSSClass", + } + dst = minio.CopyDestOptions{ + Bucket: bucketName, + Object: "srcObjectSSClassCopy", + } + if _, err = c.CopyObject(context.Background(), dst, src); err != nil { + logError(testName, function, args, startTime, "", "CopyObject failed on SS", err) + return + } + // Fetch the meta data of copied object + if reflect.DeepEqual(metadata, fetchMeta("srcObjectSSClassCopy")) { + logError(testName, function, args, startTime, "", "Metadata verification failed, STANDARD storage class should not be a part of response metadata", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test put object with size -1 byte object. +func testPutObjectNoLengthV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PutObject(bucketName, objectName, reader, size, opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "size": -1, + "opts": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v2 object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + objectName := bucketName + "unique" + args["objectName"] = objectName + + bufSize := dataFileMap["datafile-129-MB"] + var reader = getDataReader("datafile-129-MB") + defer reader.Close() + args["size"] = bufSize + + // Upload an object. + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, -1, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectWithSize failed", err) + return + } + + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Expected upload object size "+string(bufSize)+" got "+string(st.Size), err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test put objects of unknown size. +func testPutObjectsUnknownV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PutObject(bucketName, objectName, reader,size,opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "size": "", + "opts": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v2 object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Issues are revealed by trying to upload multiple files of unknown size + // sequentially (on 4GB machines) + for i := 1; i <= 4; i++ { + // Simulate that we could be receiving byte slices of data that we want + // to upload as a file + rpipe, wpipe := io.Pipe() + defer rpipe.Close() + go func() { + b := []byte("test") + wpipe.Write(b) + wpipe.Close() + }() + + // Upload the object. + objectName := fmt.Sprintf("%sunique%d", bucketName, i) + args["objectName"] = objectName + + ui, err := c.PutObject(context.Background(), bucketName, objectName, rpipe, -1, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectStreaming failed", err) + return + } + + if ui.Size != 4 { + logError(testName, function, args, startTime, "", "Expected upload object size "+string(4)+" got "+string(ui.Size), nil) + return + } + + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObjectStreaming failed", err) + return + } + + if st.Size != int64(4) { + logError(testName, function, args, startTime, "", "Expected upload object size "+string(4)+" got "+string(st.Size), err) + return + } + + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test put object with 0 byte object. +func testPutObject0ByteV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PutObject(bucketName, objectName, reader, size, opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectName": "", + "size": 0, + "opts": "", + } + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v2 object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + objectName := bucketName + "unique" + args["objectName"] = objectName + args["opts"] = minio.PutObjectOptions{} + + // Upload an object. + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader([]byte("")), 0, minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObjectWithSize failed", err) + return + } + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObjectWithSize failed", err) + return + } + if st.Size != 0 { + logError(testName, function, args, startTime, "", "Expected upload object size 0 but got "+string(st.Size), err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test expected error cases +func testComposeObjectErrorCases() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "ComposeObject(destination, sourceList)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + testComposeObjectErrorCasesWrapper(c) +} + +// Test concatenating multiple 10K objects V4 +func testCompose10KSources() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "ComposeObject(destination, sourceList)" + args := map[string]interface{}{} + + // Instantiate new minio client object + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client object creation failed", err) + return + } + + testComposeMultipleSources(c) +} + +// Tests comprehensive list of all methods. +func testFunctionalV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "testFunctionalV2()" + functionAll := "" + args := map[string]interface{}{} + + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v2 object creation failed", err) + return + } + + // 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-") + location := "us-east-1" + // Make a new bucket. + function = "MakeBucket(bucketName, location)" + functionAll = "MakeBucket(bucketName, location)" + args = map[string]interface{}{ + "bucketName": bucketName, + "location": location, + } + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: location}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + // Generate a random file name. + fileName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + file, err := os.Create(fileName) + if err != nil { + logError(testName, function, args, startTime, "", "file create failed", err) + return + } + for i := 0; i < 3; i++ { + buf := make([]byte, rand.Intn(1<<19)) + _, err = file.Write(buf) + if err != nil { + logError(testName, function, args, startTime, "", "file write failed", err) + return + } + } + file.Close() + + // Verify if bucket exits and you have access. + var exists bool + function = "BucketExists(bucketName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + } + exists, err = c.BucketExists(context.Background(), bucketName) + if err != nil { + logError(testName, function, args, startTime, "", "BucketExists failed", err) + return + } + if !exists { + logError(testName, function, args, startTime, "", "Could not find existing bucket "+bucketName, err) + return + } + + // Make the bucket 'public read/write'. + function = "SetBucketPolicy(bucketName, bucketPolicy)" + functionAll += ", " + function + + readWritePolicy := `{"Version": "2012-10-17","Statement": [{"Action": ["s3:ListBucketMultipartUploads", "s3:ListBucket"],"Effect": "Allow","Principal": {"AWS": ["*"]},"Resource": ["arn:aws:s3:::` + bucketName + `"],"Sid": ""}]}` + + args = map[string]interface{}{ + "bucketName": bucketName, + "bucketPolicy": readWritePolicy, + } + err = c.SetBucketPolicy(context.Background(), bucketName, readWritePolicy) + + if err != nil { + logError(testName, function, args, startTime, "", "SetBucketPolicy failed", err) + return + } + + // List all buckets. + function = "ListBuckets()" + functionAll += ", " + function + args = nil + buckets, err := c.ListBuckets(context.Background()) + if len(buckets) == 0 { + logError(testName, function, args, startTime, "", "List buckets cannot be empty", err) + return + } + if err != nil { + logError(testName, function, args, startTime, "", "ListBuckets failed", err) + return + } + + // Verify if previously created bucket is listed in list buckets. + bucketFound := false + for _, bucket := range buckets { + if bucket.Name == bucketName { + bucketFound = true + } + } + + // If bucket not found error out. + if !bucketFound { + logError(testName, function, args, startTime, "", "Bucket "+bucketName+"not found", err) + return + } + + objectName := bucketName + "unique" + + // Generate data + buf := bytes.Repeat([]byte("n"), rand.Intn(1<<19)) + + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "contentType": "", + } + _, err = c.PutObject(context.Background(), bucketName, objectName, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + st, err := c.StatObject(context.Background(), bucketName, objectName, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + if st.Size != int64(len(buf)) { + logError(testName, function, args, startTime, "", "Expected uploaded object length "+string(len(buf))+" got "+string(st.Size), err) + return + } + + objectNameNoLength := objectName + "-nolength" + args["objectName"] = objectNameNoLength + _, err = c.PutObject(context.Background(), bucketName, objectNameNoLength, bytes.NewReader(buf), int64(len(buf)), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + st, err = c.StatObject(context.Background(), bucketName, objectNameNoLength, minio.StatObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "StatObject failed", err) + return + } + if st.Size != int64(len(buf)) { + logError(testName, function, args, startTime, "", "Expected uploaded object length "+string(len(buf))+" got "+string(st.Size), err) + return + } + + // Instantiate a done channel to close all listing. + doneCh := make(chan struct{}) + defer close(doneCh) + + objFound := false + isRecursive := true // Recursive is true. + function = "ListObjects(bucketName, objectName, isRecursive, doneCh)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "isRecursive": isRecursive, + } + for obj := range c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{UseV1: true, Prefix: objectName, Recursive: isRecursive}) { + if obj.Key == objectName { + objFound = true + break + } + } + if !objFound { + logError(testName, function, args, startTime, "", "Could not find existing object "+objectName, err) + return + } + + incompObjNotFound := true + function = "ListIncompleteUploads(bucketName, objectName, isRecursive, doneCh)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "isRecursive": isRecursive, + } + for objIncompl := range c.ListIncompleteUploads(context.Background(), bucketName, objectName, isRecursive) { + if objIncompl.Key != "" { + incompObjNotFound = false + break + } + } + if !incompObjNotFound { + logError(testName, function, args, startTime, "", "Unexpected dangling incomplete upload found", err) + return + } + + function = "GetObject(bucketName, objectName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + } + newReader, err := c.GetObject(context.Background(), bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + newReadBytes, err := ioutil.ReadAll(newReader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + newReader.Close() + + if !bytes.Equal(newReadBytes, buf) { + logError(testName, function, args, startTime, "", "Bytes mismatch", err) + return + } + + function = "FGetObject(bucketName, objectName, fileName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "fileName": fileName + "-f", + } + err = c.FGetObject(context.Background(), bucketName, objectName, fileName+"-f", minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "FgetObject failed", err) + return + } + + // Generate presigned HEAD object url. + function = "PresignedHeadObject(bucketName, objectName, expires, reqParams)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "expires": 3600 * time.Second, + } + presignedHeadURL, err := c.PresignedHeadObject(context.Background(), bucketName, objectName, 3600*time.Second, nil) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedHeadObject failed", err) + return + } + + transport, err := minio.DefaultTransport(mustParseBool(os.Getenv(enableHTTPS))) + if err != nil { + logError(testName, function, args, startTime, "", "DefaultTransport failed", err) + return + } + + httpClient := &http.Client{ + // Setting a sensible time out of 30secs to wait for response + // headers. Request is pro-actively canceled after 30secs + // with no response. + Timeout: 30 * time.Second, + Transport: transport, + } + + req, err := http.NewRequest(http.MethodHead, presignedHeadURL.String(), nil) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedHeadObject URL head request failed", err) + return + } + + // Verify if presigned url works. + resp, err := httpClient.Do(req) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedHeadObject URL head request failed", err) + return + } + if resp.StatusCode != http.StatusOK { + logError(testName, function, args, startTime, "", "PresignedHeadObject URL returns status "+string(resp.StatusCode), err) + return + } + if resp.Header.Get("ETag") == "" { + logError(testName, function, args, startTime, "", "Got empty ETag", err) + return + } + resp.Body.Close() + + // Generate presigned GET object url. + function = "PresignedGetObject(bucketName, objectName, expires, reqParams)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName, + "expires": 3600 * time.Second, + } + presignedGetURL, err := c.PresignedGetObject(context.Background(), bucketName, objectName, 3600*time.Second, nil) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject failed", err) + return + } + + // Verify if presigned url works. + req, err = http.NewRequest(http.MethodGet, presignedGetURL.String(), nil) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject request incorrect", err) + return + } + + resp, err = httpClient.Do(req) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject response incorrect", err) + return + } + + if resp.StatusCode != http.StatusOK { + logError(testName, function, args, startTime, "", "PresignedGetObject URL returns status "+string(resp.StatusCode), err) + return + } + newPresignedBytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + resp.Body.Close() + if !bytes.Equal(newPresignedBytes, buf) { + logError(testName, function, args, startTime, "", "Bytes mismatch", err) + return + } + + // Set request parameters. + reqParams := make(url.Values) + reqParams.Set("response-content-disposition", "attachment; filename=\"test.txt\"") + // Generate presigned GET object url. + args["reqParams"] = reqParams + presignedGetURL, err = c.PresignedGetObject(context.Background(), bucketName, objectName, 3600*time.Second, reqParams) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject failed", err) + return + } + + // Verify if presigned url works. + req, err = http.NewRequest(http.MethodGet, presignedGetURL.String(), nil) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject request incorrect", err) + return + } + + resp, err = httpClient.Do(req) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedGetObject response incorrect", err) + return + } + + if resp.StatusCode != http.StatusOK { + logError(testName, function, args, startTime, "", "PresignedGetObject URL returns status "+string(resp.StatusCode), err) + return + } + newPresignedBytes, err = ioutil.ReadAll(resp.Body) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + if !bytes.Equal(newPresignedBytes, buf) { + logError(testName, function, args, startTime, "", "Bytes mismatch", err) + return + } + // Verify content disposition. + if resp.Header.Get("Content-Disposition") != "attachment; filename=\"test.txt\"" { + logError(testName, function, args, startTime, "", "wrong Content-Disposition received ", err) + return + } + + function = "PresignedPutObject(bucketName, objectName, expires)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName + "-presigned", + "expires": 3600 * time.Second, + } + presignedPutURL, err := c.PresignedPutObject(context.Background(), bucketName, objectName+"-presigned", 3600*time.Second) + if err != nil { + logError(testName, function, args, startTime, "", "PresignedPutObject failed", err) + return + } + + // Generate data more than 32K + buf = bytes.Repeat([]byte("1"), rand.Intn(1<<10)+32*1024) + + req, err = http.NewRequest(http.MethodPut, presignedPutURL.String(), bytes.NewReader(buf)) + if err != nil { + logError(testName, function, args, startTime, "", "HTTP request to PresignedPutObject URL failed", err) + return + } + + resp, err = httpClient.Do(req) + if err != nil { + logError(testName, function, args, startTime, "", "HTTP request to PresignedPutObject URL failed", err) + return + } + + function = "GetObject(bucketName, objectName)" + functionAll += ", " + function + args = map[string]interface{}{ + "bucketName": bucketName, + "objectName": objectName + "-presigned", + } + newReader, err = c.GetObject(context.Background(), bucketName, objectName+"-presigned", minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + newReadBytes, err = ioutil.ReadAll(newReader) + if err != nil { + logError(testName, function, args, startTime, "", "ReadAll failed", err) + return + } + newReader.Close() + + if !bytes.Equal(newReadBytes, buf) { + logError(testName, function, args, startTime, "", "Bytes mismatch", err) + return + } + + os.Remove(fileName) + os.Remove(fileName + "-f") + successLogger(testName, functionAll, args, startTime).Info() +} + +// Test get object with GetObject with context +func testGetObjectContext() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(ctx, bucketName, objectName)" + args := map[string]interface{}{ + "ctx": "", + "bucketName": "", + "objectName": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v4 object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Nanosecond) + args["ctx"] = ctx + cancel() + + r, err := c.GetObject(ctx, bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed unexpectedly", err) + return + } + + if _, err = r.Stat(); err == nil { + logError(testName, function, args, startTime, "", "GetObject should fail on short timeout", err) + return + } + r.Close() + + ctx, cancel = context.WithTimeout(context.Background(), 1*time.Hour) + args["ctx"] = ctx + defer cancel() + + // Read the data back + r, err = c.GetObject(ctx, bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed", err) + return + } + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "object Stat call failed", err) + return + } + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes in stat does not match: want "+string(bufSize)+", got"+string(st.Size), err) + return + } + if err := r.Close(); err != nil { + logError(testName, function, args, startTime, "", "object Close() call failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() + +} + +// Test get object with FGetObject with a user provided context +func testFGetObjectContext() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "FGetObject(ctx, bucketName, objectName, fileName)" + args := map[string]interface{}{ + "ctx": "", + "bucketName": "", + "objectName": "", + "fileName": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v4 object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + bufSize := dataFileMap["datafile-1-MB"] + var reader = getDataReader("datafile-1-MB") + defer reader.Close() + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Nanosecond) + args["ctx"] = ctx + defer cancel() + + fileName := "tempfile-context" + args["fileName"] = fileName + // Read the data back + err = c.FGetObject(ctx, bucketName, objectName, fileName+"-f", minio.GetObjectOptions{}) + if err == nil { + logError(testName, function, args, startTime, "", "FGetObject should fail on short timeout", err) + return + } + ctx, cancel = context.WithTimeout(context.Background(), 1*time.Hour) + defer cancel() + + // Read the data back + err = c.FGetObject(ctx, bucketName, objectName, fileName+"-fcontext", minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "FGetObject with long timeout failed", err) + return + } + if err = os.Remove(fileName + "-fcontext"); err != nil { + logError(testName, function, args, startTime, "", "Remove file failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() + +} + +// Test get object with GetObject with a user provided context +func testGetObjectRanges() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(ctx, bucketName, objectName, fileName)" + args := map[string]interface{}{ + "ctx": "", + "bucketName": "", + "objectName": "", + "fileName": "", + } + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute) + defer cancel() + + rng := rand.NewSource(time.Now().UnixNano()) + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v4 object creation failed", err) + return + } + + // 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, rng, "minio-go-test-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + bufSize := dataFileMap["datafile-129-MB"] + var reader = getDataReader("datafile-129-MB") + defer reader.Close() + // Save the data + objectName := randString(60, rng, "") + args["objectName"] = objectName + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + // Read the data back + tests := []struct { + start int64 + end int64 + }{ + { + start: 1024, + end: 1024 + 1<<20, + }, + { + start: 20e6, + end: 20e6 + 10000, + }, + { + start: 40e6, + end: 40e6 + 10000, + }, + { + start: 60e6, + end: 60e6 + 10000, + }, + { + start: 80e6, + end: 80e6 + 10000, + }, + { + start: 120e6, + end: int64(bufSize), + }, + } + for _, test := range tests { + wantRC := getDataReader("datafile-129-MB") + io.CopyN(ioutil.Discard, wantRC, test.start) + want := mustCrcReader(io.LimitReader(wantRC, test.end-test.start+1)) + opts := minio.GetObjectOptions{} + opts.SetRange(test.start, test.end) + args["opts"] = fmt.Sprintf("%+v", test) + obj, err := c.GetObject(ctx, bucketName, objectName, opts) + if err != nil { + logError(testName, function, args, startTime, "", "FGetObject with long timeout failed", err) + return + } + err = crcMatches(obj, want) + if err != nil { + logError(testName, function, args, startTime, "", fmt.Sprintf("GetObject offset %d -> %d", test.start, test.end), err) + return + } + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test get object ACLs with GetObjectACL with custom provided context +func testGetObjectACLContext() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObjectACL(ctx, bucketName, objectName)" + args := map[string]interface{}{ + "ctx": "", + "bucketName": "", + "objectName": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // skipping region functional tests for non s3 runs + if os.Getenv(serverEndpoint) != "s3.amazonaws.com" { + ignoredLog(testName, function, args, startTime, "Skipped region functional tests for non s3 runs").Info() + return + } + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v4 object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + bufSize := dataFileMap["datafile-1-MB"] + var reader = getDataReader("datafile-1-MB") + defer reader.Close() + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Add meta data to add a canned acl + metaData := map[string]string{ + "X-Amz-Acl": "public-read-write", + } + + _, err = c.PutObject(context.Background(), bucketName, + objectName, reader, int64(bufSize), + minio.PutObjectOptions{ + ContentType: "binary/octet-stream", + UserMetadata: metaData, + }) + + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) + args["ctx"] = ctx + defer cancel() + + // Read the data back + objectInfo, getObjectACLErr := c.GetObjectACL(ctx, bucketName, objectName) + if getObjectACLErr != nil { + logError(testName, function, args, startTime, "", "GetObjectACL failed. ", getObjectACLErr) + return + } + + s, ok := objectInfo.Metadata["X-Amz-Acl"] + if !ok { + logError(testName, function, args, startTime, "", "GetObjectACL fail unable to find \"X-Amz-Acl\"", nil) + return + } + + if len(s) != 1 { + logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Acl\" canned acl expected \"1\" got "+fmt.Sprintf(`"%d"`, len(s)), nil) + return + } + + if s[0] != "public-read-write" { + logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Acl\" expected \"public-read-write\" but got"+fmt.Sprintf("%q", s[0]), nil) + return + } + + bufSize = dataFileMap["datafile-1-MB"] + var reader2 = getDataReader("datafile-1-MB") + defer reader2.Close() + // Save the data + objectName = randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Add meta data to add a canned acl + metaData = map[string]string{ + "X-Amz-Grant-Read": "id=fooread@minio.go", + "X-Amz-Grant-Write": "id=foowrite@minio.go", + } + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader2, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream", UserMetadata: metaData}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject failed", err) + return + } + + ctx, cancel = context.WithTimeout(context.Background(), 10*time.Second) + args["ctx"] = ctx + defer cancel() + + // Read the data back + objectInfo, getObjectACLErr = c.GetObjectACL(ctx, bucketName, objectName) + if getObjectACLErr == nil { + logError(testName, function, args, startTime, "", "GetObjectACL fail", getObjectACLErr) + return + } + + if len(objectInfo.Metadata) != 3 { + logError(testName, function, args, startTime, "", "GetObjectACL fail expected \"3\" ACLs but got "+fmt.Sprintf(`"%d"`, len(objectInfo.Metadata)), nil) + return + } + + s, ok = objectInfo.Metadata["X-Amz-Grant-Read"] + if !ok { + logError(testName, function, args, startTime, "", "GetObjectACL fail unable to find \"X-Amz-Grant-Read\"", nil) + return + } + + if len(s) != 1 { + logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Grant-Read\" acl expected \"1\" got "+fmt.Sprintf(`"%d"`, len(s)), nil) + return + } + + if s[0] != "fooread@minio.go" { + logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Grant-Read\" acl expected \"fooread@minio.go\" got "+fmt.Sprintf("%q", s), nil) + return + } + + s, ok = objectInfo.Metadata["X-Amz-Grant-Write"] + if !ok { + logError(testName, function, args, startTime, "", "GetObjectACL fail unable to find \"X-Amz-Grant-Write\"", nil) + return + } + + if len(s) != 1 { + logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Grant-Write\" acl expected \"1\" got "+fmt.Sprintf(`"%d"`, len(s)), nil) + return + } + + if s[0] != "foowrite@minio.go" { + logError(testName, function, args, startTime, "", "GetObjectACL fail \"X-Amz-Grant-Write\" acl expected \"foowrite@minio.go\" got "+fmt.Sprintf("%q", s), nil) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// Test validates putObject with context to see if request cancellation is honored for V2. +func testPutObjectContextV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "PutObject(ctx, bucketName, objectName, reader, size, opts)" + args := map[string]interface{}{ + "ctx": "", + "bucketName": "", + "objectName": "", + "size": "", + "opts": "", + } + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v2 object creation failed", err) + return + } + + // Enable tracing, write to stderr. + // c.TraceOn(os.Stderr) + + // Set user agent. + c.SetAppInfo("MinIO-go-FunctionalTest", "0.1.0") + + // Make a new bucket. + bucketName := randString(60, rand.NewSource(time.Now().UnixNano()), "minio-go-test-") + args["bucketName"] = bucketName + + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + defer cleanupBucket(bucketName, c) + bufSize := dataFileMap["datatfile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + + objectName := fmt.Sprintf("test-file-%v", rand.Uint32()) + args["objectName"] = objectName + + ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second) + args["ctx"] = ctx + args["size"] = bufSize + defer cancel() + + _, err = c.PutObject(ctx, bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject with short timeout failed", err) + return + } + + ctx, cancel = context.WithTimeout(context.Background(), 1*time.Hour) + args["ctx"] = ctx + + defer cancel() + reader = getDataReader("datafile-33-kB") + defer reader.Close() + _, err = c.PutObject(ctx, bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject with long timeout failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() + +} + +// Test get object with GetObject with custom context +func testGetObjectContextV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "GetObject(ctx, bucketName, objectName)" + args := map[string]interface{}{ + "ctx": "", + "bucketName": "", + "objectName": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v2 object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Nanosecond) + args["ctx"] = ctx + cancel() + + r, err := c.GetObject(ctx, bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject failed unexpectedly", err) + return + } + if _, err = r.Stat(); err == nil { + logError(testName, function, args, startTime, "", "GetObject should fail on short timeout", err) + return + } + r.Close() + + ctx, cancel = context.WithTimeout(context.Background(), 1*time.Hour) + defer cancel() + + // Read the data back + r, err = c.GetObject(ctx, bucketName, objectName, minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "GetObject shouldn't fail on longer timeout", err) + return + } + + st, err := r.Stat() + if err != nil { + logError(testName, function, args, startTime, "", "object Stat call failed", err) + return + } + if st.Size != int64(bufSize) { + logError(testName, function, args, startTime, "", "Number of bytes in stat does not match, expected "+string(bufSize)+" got "+string(st.Size), err) + return + } + if err := r.Close(); err != nil { + logError(testName, function, args, startTime, "", " object Close() call failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() + +} + +// Test get object with FGetObject with custom context +func testFGetObjectContextV2() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "FGetObject(ctx, bucketName, objectName,fileName)" + args := map[string]interface{}{ + "ctx": "", + "bucketName": "", + "objectName": "", + "fileName": "", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV2(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v2 object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket call failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + bufSize := dataFileMap["datatfile-1-MB"] + var reader = getDataReader("datafile-1-MB") + defer reader.Close() + // Save the data + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + _, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{ContentType: "binary/octet-stream"}) + if err != nil { + logError(testName, function, args, startTime, "", "PutObject call failed", err) + return + } + + ctx, cancel := context.WithTimeout(context.Background(), 1*time.Nanosecond) + args["ctx"] = ctx + defer cancel() + + fileName := "tempfile-context" + args["fileName"] = fileName + + // Read the data back + err = c.FGetObject(ctx, bucketName, objectName, fileName+"-f", minio.GetObjectOptions{}) + if err == nil { + logError(testName, function, args, startTime, "", "FGetObject should fail on short timeout", err) + return + } + ctx, cancel = context.WithTimeout(context.Background(), 1*time.Hour) + defer cancel() + + // Read the data back + err = c.FGetObject(ctx, bucketName, objectName, fileName+"-fcontext", minio.GetObjectOptions{}) + if err != nil { + logError(testName, function, args, startTime, "", "FGetObject call shouldn't fail on long timeout", err) + return + } + + if err = os.Remove(fileName + "-fcontext"); err != nil { + logError(testName, function, args, startTime, "", "Remove file failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() + +} + +// Test list object v1 and V2 +func testListObjects() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "ListObjects(bucketName, objectPrefix, recursive, doneCh)" + args := map[string]interface{}{ + "bucketName": "", + "objectPrefix": "", + "recursive": "true", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v4 object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1"}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + defer cleanupBucket(bucketName, c) + + testObjects := []struct { + name string + storageClass string + }{ + // Special characters + {"foo bar", "STANDARD"}, + {"foo-%", "STANDARD"}, + {"random-object-1", "STANDARD"}, + {"random-object-2", "REDUCED_REDUNDANCY"}, + } + + for i, object := range testObjects { + bufSize := dataFileMap["datafile-33-kB"] + var reader = getDataReader("datafile-33-kB") + defer reader.Close() + _, err = c.PutObject(context.Background(), bucketName, object.name, reader, int64(bufSize), + minio.PutObjectOptions{ContentType: "binary/octet-stream", StorageClass: object.storageClass}) + if err != nil { + logError(testName, function, args, startTime, "", fmt.Sprintf("PutObject %d call failed", i+1), err) + return + } + } + + testList := func(listFn func(context.Context, string, minio.ListObjectsOptions) <-chan minio.ObjectInfo, bucket string, opts minio.ListObjectsOptions) { + var objCursor int + + // check for object name and storage-class from listing object result + for objInfo := range listFn(context.Background(), bucket, opts) { + if objInfo.Err != nil { + logError(testName, function, args, startTime, "", "ListObjects failed unexpectedly", err) + return + } + if objInfo.Key != testObjects[objCursor].name { + logError(testName, function, args, startTime, "", "ListObjects does not return expected object name", err) + return + } + if objInfo.StorageClass != testObjects[objCursor].storageClass { + // Ignored as Gateways (Azure/GCS etc) wont return storage class + ignoredLog(testName, function, args, startTime, "ListObjects doesn't return expected storage class").Info() + } + objCursor++ + } + + if objCursor != len(testObjects) { + logError(testName, function, args, startTime, "", "ListObjects returned unexpected number of items", errors.New("")) + return + } + } + + testList(c.ListObjects, bucketName, minio.ListObjectsOptions{Recursive: true, UseV1: true}) + testList(c.ListObjects, bucketName, minio.ListObjectsOptions{Recursive: true}) + testList(c.ListObjects, bucketName, minio.ListObjectsOptions{Recursive: true, WithMetadata: true}) + + successLogger(testName, function, args, startTime).Info() +} + +// Test deleting multiple objects with object retention set in Governance mode +func testRemoveObjects() { + // initialize logging params + startTime := time.Now() + testName := getFuncName() + function := "RemoveObjects(bucketName, objectsCh, opts)" + args := map[string]interface{}{ + "bucketName": "", + "objectPrefix": "", + "recursive": "true", + } + // Seed random based on current time. + rand.Seed(time.Now().Unix()) + + // Instantiate new minio client object. + c, err := minio.New(os.Getenv(serverEndpoint), + &minio.Options{ + Creds: credentials.NewStaticV4(os.Getenv(accessKey), os.Getenv(secretKey), ""), + Secure: mustParseBool(os.Getenv(enableHTTPS)), + }) + if err != nil { + logError(testName, function, args, startTime, "", "MinIO client v4 object creation failed", err) + return + } + + // 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-") + args["bucketName"] = bucketName + objectName := randString(60, rand.NewSource(time.Now().UnixNano()), "") + args["objectName"] = objectName + + // Make a new bucket. + err = c.MakeBucket(context.Background(), bucketName, minio.MakeBucketOptions{Region: "us-east-1", ObjectLocking: true}) + if err != nil { + logError(testName, function, args, startTime, "", "MakeBucket failed", err) + return + } + + bufSize := dataFileMap["datafile-129-MB"] + var reader = getDataReader("datafile-129-MB") + defer reader.Close() + + n, err := c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{}) + if err != nil { + log.Fatalln(err) + } + log.Println("Uploaded", objectName, " of size: ", n, "to bucket: ", bucketName, "Successfully.") + + // Replace with smaller... + bufSize = dataFileMap["datafile-10-kB"] + reader = getDataReader("datafile-10-kB") + defer reader.Close() + + n, err = c.PutObject(context.Background(), bucketName, objectName, reader, int64(bufSize), minio.PutObjectOptions{}) + if err != nil { + log.Fatalln(err) + } + log.Println("Uploaded", objectName, " of size: ", n, "to bucket: ", bucketName, "Successfully.") + + t := time.Date(2030, time.April, 25, 14, 0, 0, 0, time.UTC) + m := minio.RetentionMode(minio.Governance) + opts := minio.PutObjectRetentionOptions{ + GovernanceBypass: false, + RetainUntilDate: &t, + Mode: &m, + } + err = c.PutObjectRetention(context.Background(), bucketName, objectName, opts) + if err != nil { + log.Fatalln(err) + } + + objectsCh := make(chan minio.ObjectInfo) + // 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 c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{UseV1: true, Recursive: true}) { + if object.Err != nil { + log.Fatalln(object.Err) + } + objectsCh <- object + } + }() + + for rErr := range c.RemoveObjects(context.Background(), bucketName, objectsCh, minio.RemoveObjectsOptions{}) { + // Error is expected here because Retention is set on the object + // and RemoveObjects is called without Bypass Governance + if rErr.Err == nil { + logError(testName, function, args, startTime, "", "Expected error during deletion", nil) + return + } + } + + objectsCh1 := make(chan minio.ObjectInfo) + + // Send object names that are needed to be removed to objectsCh + go func() { + defer close(objectsCh1) + // List all objects from a bucket-name with a matching prefix. + for object := range c.ListObjects(context.Background(), bucketName, minio.ListObjectsOptions{UseV1: true, Recursive: true}) { + if object.Err != nil { + log.Fatalln(object.Err) + } + objectsCh1 <- object + } + }() + + opts1 := minio.RemoveObjectsOptions{ + GovernanceBypass: true, + } + + for rErr := range c.RemoveObjects(context.Background(), bucketName, objectsCh1, opts1) { + // Error is not expected here because Retention is set on the object + // and RemoveObjects is called with Bypass Governance + logError(testName, function, args, startTime, "", "Error detected during deletion", rErr.Err) + return + } + + // Delete all objects and buckets + if err = cleanupVersionedBucket(bucketName, c); err != nil { + logError(testName, function, args, startTime, "", "CleanupBucket failed", err) + return + } + + successLogger(testName, function, args, startTime).Info() +} + +// 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 +} + +func main() { + // Output to stdout instead of the default stderr + log.SetOutput(os.Stdout) + // create custom formatter + mintFormatter := mintJSONFormatter{} + // set custom formatter + log.SetFormatter(&mintFormatter) + // log Info or above -- success cases are Info level, failures are Fatal level + log.SetLevel(log.InfoLevel) + + tls := mustParseBool(os.Getenv(enableHTTPS)) + kms := mustParseBool(os.Getenv(enableKMS)) + if os.Getenv(enableKMS) == "" { + // Default to KMS tests. + kms = true + } + // execute tests + if isFullMode() { + testMakeBucketErrorV2() + testGetObjectClosedTwiceV2() + testFPutObjectV2() + testMakeBucketRegionsV2() + testGetObjectReadSeekFunctionalV2() + testGetObjectReadAtFunctionalV2() + testGetObjectRanges() + testCopyObjectV2() + testFunctionalV2() + testComposeObjectErrorCasesV2() + testCompose10KSourcesV2() + testUserMetadataCopyingV2() + testPutObject0ByteV2() + testPutObjectNoLengthV2() + testPutObjectsUnknownV2() + testGetObjectContextV2() + testFPutObjectContextV2() + testFGetObjectContextV2() + testPutObjectContextV2() + testPutObjectWithVersioning() + testMakeBucketError() + testMakeBucketRegions() + testPutObjectWithMetadata() + testPutObjectReadAt() + testPutObjectStreaming() + testGetObjectSeekEnd() + testGetObjectClosedTwice() + testRemoveMultipleObjects() + testFPutObjectMultipart() + testFPutObject() + testGetObjectReadSeekFunctional() + testGetObjectReadAtFunctional() + testGetObjectReadAtWhenEOFWasReached() + testPresignedPostPolicy() + testCopyObject() + testComposeObjectErrorCases() + testCompose10KSources() + testUserMetadataCopying() + testBucketNotification() + testFunctional() + testGetObjectModified() + testPutObjectUploadSeekedObject() + testGetObjectContext() + testFPutObjectContext() + testFGetObjectContext() + testGetObjectACLContext() + testPutObjectContext() + testStorageClassMetadataPutObject() + testStorageClassInvalidMetadataPutObject() + testStorageClassMetadataCopyObject() + testPutObjectWithContentLanguage() + testListObjects() + testRemoveObjects() + testListObjectVersions() + testStatObjectWithVersioning() + testGetObjectWithVersioning() + testCopyObjectWithVersioning() + testConcurrentCopyObjectWithVersioning() + testComposeObjectWithVersioning() + testRemoveObjectWithVersioning() + testRemoveObjectsWithVersioning() + testObjectTaggingWithVersioning() + + // SSE-C tests will only work over TLS connection. + if tls { + testSSECEncryptionPutGet() + testSSECEncryptionFPut() + testSSECEncryptedGetObjectReadAtFunctional() + testSSECEncryptedGetObjectReadSeekFunctional() + testEncryptedCopyObjectV2() + testEncryptedSSECToSSECCopyObject() + testEncryptedSSECToUnencryptedCopyObject() + testUnencryptedToSSECCopyObject() + testUnencryptedToUnencryptedCopyObject() + testEncryptedEmptyObject() + testDecryptedCopyObject() + testSSECEncryptedToSSECCopyObjectPart() + testSSECMultipartEncryptedToSSECCopyObjectPart() + testSSECEncryptedToUnencryptedCopyPart() + testUnencryptedToSSECCopyObjectPart() + testUnencryptedToUnencryptedCopyPart() + testEncryptedSSECToSSES3CopyObject() + testEncryptedSSES3ToSSECCopyObject() + testSSECEncryptedToSSES3CopyObjectPart() + testSSES3EncryptedToSSECCopyObjectPart() + } + + // KMS tests + if kms { + testSSES3EncryptionPutGet() + testSSES3EncryptionFPut() + testSSES3EncryptedGetObjectReadAtFunctional() + testSSES3EncryptedGetObjectReadSeekFunctional() + testEncryptedSSES3ToSSES3CopyObject() + testEncryptedSSES3ToUnencryptedCopyObject() + testUnencryptedToSSES3CopyObject() + testUnencryptedToSSES3CopyObjectPart() + testSSES3EncryptedToUnencryptedCopyPart() + testSSES3EncryptedToSSES3CopyObjectPart() + } + } else { + testFunctional() + testFunctionalV2() + } +} diff --git a/vendor/github.com/minio/minio-go/v7/go.mod b/vendor/github.com/minio/minio-go/v7/go.mod index 0e859303a9..92590e971e 100644 --- a/vendor/github.com/minio/minio-go/v7/go.mod +++ b/vendor/github.com/minio/minio-go/v7/go.mod @@ -1,8 +1,9 @@ module github.com/minio/minio-go/v7 -go 1.12 +go 1.14 require ( + github.com/dustin/go-humanize v1.0.0 github.com/google/uuid v1.1.1 github.com/json-iterator/go v1.1.10 github.com/klauspost/cpuid v1.3.1 // indirect @@ -13,9 +14,10 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.1 // indirect github.com/rs/xid v1.2.1 + github.com/sirupsen/logrus v1.8.1 github.com/smartystreets/goconvey v1.6.4 // indirect github.com/stretchr/testify v1.4.0 // indirect - golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 + golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f golang.org/x/net v0.0.0-20200707034311-ab3426394381 golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae // indirect golang.org/x/text v0.3.3 // indirect diff --git a/vendor/github.com/minio/minio-go/v7/go.sum b/vendor/github.com/minio/minio-go/v7/go.sum index 92c700dbdc..0e8248ffff 100644 --- a/vendor/github.com/minio/minio-go/v7/go.sum +++ b/vendor/github.com/minio/minio-go/v7/go.sum @@ -1,6 +1,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -10,7 +12,6 @@ github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/klauspost/cpuid v1.2.3 h1:CCtW0xUnWGVINKvE/WWOYKdsPV6mawAtvQuSl8guwQs= github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s= github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= @@ -25,11 +26,9 @@ github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKU github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -37,30 +36,32 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 h1:DZhuSZLsGlFL4CmhA8BcRA0mnthyA/nZ00AqCUo7vHg= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f h1:aZp0e2vLN4MToVqnjNEYEtrEA8RH8U8FN1CU7JgqsPU= +golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20200707034311-ab3426394381 h1:VXak5I6aEWmAXeQjA+QSZzlgNrpq9mjcfDemuexIKsU= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae h1:Ih9Yo4hSPImZOpfGuA4bR/ORKTAbhZo2AbWNRCnevdo= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= diff --git a/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go b/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go index 2ec0afc190..b532bcb60c 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/credentials/iam_aws.go @@ -59,6 +59,10 @@ const ( defaultECSRoleEndpoint = "http://169.254.170.2" defaultSTSRoleEndpoint = "https://sts.amazonaws.com" defaultIAMSecurityCredsPath = "/latest/meta-data/iam/security-credentials/" + tokenRequestTTLHeader = "X-aws-ec2-metadata-token-ttl-seconds" + tokenPath = "/latest/api/token" + tokenTTL = "21600" + tokenRequestHeader = "X-aws-ec2-metadata-token" ) // NewIAM returns a pointer to a new Credentials object wrapping the IAM. @@ -75,6 +79,7 @@ func NewIAM(endpoint string) *Credentials { // Error will be returned if the request fails, or unable to extract // the desired func (m *IAM) Retrieve() (Value, error) { + token := os.Getenv("AWS_CONTAINER_AUTHORIZATION_TOKEN") var roleCreds ec2RoleCredRespBody var err error @@ -120,7 +125,7 @@ func (m *IAM) Retrieve() (Value, error) { os.Getenv("AWS_CONTAINER_CREDENTIALS_RELATIVE_URI")) } - roleCreds, err = getEcsTaskCredentials(m.Client, endpoint) + roleCreds, err = getEcsTaskCredentials(m.Client, endpoint, token) case len(os.Getenv("AWS_CONTAINER_CREDENTIALS_FULL_URI")) > 0: if len(endpoint) == 0 { @@ -134,7 +139,7 @@ func (m *IAM) Retrieve() (Value, error) { } } - roleCreds, err = getEcsTaskCredentials(m.Client, endpoint) + roleCreds, err = getEcsTaskCredentials(m.Client, endpoint, token) default: roleCreds, err = getCredentials(m.Client, endpoint) @@ -192,11 +197,14 @@ func getIAMRoleURL(endpoint string) (*url.URL, error) { // with the current EC2 service. If there are no credentials, // or there is an error making or receiving the request. // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html -func listRoleNames(client *http.Client, u *url.URL) ([]string, error) { +func listRoleNames(client *http.Client, u *url.URL, token string) ([]string, error) { req, err := http.NewRequest(http.MethodGet, u.String(), nil) if err != nil { return nil, err } + if token != "" { + req.Header.Add(tokenRequestHeader, token) + } resp, err := client.Do(req) if err != nil { return nil, err @@ -219,12 +227,16 @@ func listRoleNames(client *http.Client, u *url.URL) ([]string, error) { return credsList, nil } -func getEcsTaskCredentials(client *http.Client, endpoint string) (ec2RoleCredRespBody, error) { +func getEcsTaskCredentials(client *http.Client, endpoint string, token string) (ec2RoleCredRespBody, error) { req, err := http.NewRequest(http.MethodGet, endpoint, nil) if err != nil { return ec2RoleCredRespBody{}, err } + if token != "" { + req.Header.Set("Authorization", token) + } + resp, err := client.Do(req) if err != nil { return ec2RoleCredRespBody{}, err @@ -242,12 +254,35 @@ func getEcsTaskCredentials(client *http.Client, endpoint string) (ec2RoleCredRes return respCreds, nil } +func fetchIMDSToken(client *http.Client, endpoint string) (string, error) { + req, err := http.NewRequest(http.MethodPut, endpoint+tokenPath, nil) + if err != nil { + return "", err + } + req.Header.Add(tokenRequestTTLHeader, tokenTTL) + resp, err := client.Do(req) + if err != nil { + return "", err + } + defer resp.Body.Close() + data, err := ioutil.ReadAll(resp.Body) + if err != nil { + return "", err + } + if resp.StatusCode != http.StatusOK { + return "", errors.New(resp.Status) + } + return string(data), nil +} + // getCredentials - obtains the credentials from the IAM role name associated with // the current EC2 service. // // If the credentials cannot be found, or there is an error // reading the response an error will be returned. func getCredentials(client *http.Client, endpoint string) (ec2RoleCredRespBody, error) { + // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html + token, _ := fetchIMDSToken(client, endpoint) // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html u, err := getIAMRoleURL(endpoint) @@ -256,7 +291,7 @@ func getCredentials(client *http.Client, endpoint string) (ec2RoleCredRespBody, } // http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html - roleNames, err := listRoleNames(client, u) + roleNames, err := listRoleNames(client, u, token) if err != nil { return ec2RoleCredRespBody{}, err } @@ -280,6 +315,9 @@ func getCredentials(client *http.Client, endpoint string) (ec2RoleCredRespBody, if err != nil { return ec2RoleCredRespBody{}, err } + if token != "" { + req.Header.Add(tokenRequestHeader, token) + } resp, err := client.Do(req) if err != nil { diff --git a/vendor/github.com/minio/minio-go/v7/pkg/lifecycle/lifecycle.go b/vendor/github.com/minio/minio-go/v7/pkg/lifecycle/lifecycle.go index 48e91b38ed..b6f9601bbc 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/lifecycle/lifecycle.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/lifecycle/lifecycle.go @@ -81,10 +81,15 @@ func (n NoncurrentVersionTransition) IsDaysNull() bool { return n.NoncurrentDays == ExpirationDays(0) } +// IsStorageClassEmpty returns true if storage class field is empty +func (n NoncurrentVersionTransition) IsStorageClassEmpty() bool { + return n.StorageClass == "" +} + // MarshalXML is extended to leave out // <NoncurrentVersionTransition></NoncurrentVersionTransition> tags func (n NoncurrentVersionTransition) MarshalXML(e *xml.Encoder, start xml.StartElement) error { - if n.IsDaysNull() { + if n.IsDaysNull() || n.IsStorageClassEmpty() { return nil } type noncurrentVersionTransitionWrapper NoncurrentVersionTransition @@ -137,9 +142,9 @@ func (t Transition) MarshalXML(en *xml.Encoder, startElement xml.StartElement) e // And And Rule for LifecycleTag, to be used in LifecycleRuleFilter type And struct { - XMLName xml.Name `xml:"And,omitempty" json:"-"` - Prefix string `xml:"Prefix,omitempty" json:"Prefix,omitempty"` - Tags []Tag `xml:"Tag,omitempty" json:"Tags,omitempty"` + XMLName xml.Name `xml:"And" json:"-"` + Prefix string `xml:"Prefix" json:"Prefix,omitempty"` + Tags []Tag `xml:"Tag" json:"Tags,omitempty"` } // IsEmpty returns true if Tags field is null diff --git a/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go b/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go index 6df8982144..beacc71f80 100644 --- a/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go +++ b/vendor/github.com/minio/minio-go/v7/pkg/replication/replication.go @@ -27,7 +27,7 @@ import ( "github.com/rs/xid" ) -var errInvalidFilter = fmt.Errorf("Invalid filter") +var errInvalidFilter = fmt.Errorf("invalid filter") // OptionType specifies operation to be performed on config type OptionType string @@ -46,19 +46,21 @@ const ( // Options represents options to set a replication configuration rule type Options struct { - Op OptionType - ID string - Prefix string - RuleStatus string - Priority string - TagString string - StorageClass string - RoleArn string - DestBucket string - IsTagSet bool - IsSCSet bool - ReplicateDeletes string // replicate versioned deletes - ReplicateDeleteMarkers string // replicate soft deletes + Op OptionType + ID string + Prefix string + RuleStatus string + Priority string + TagString string + StorageClass string + RoleArn string + DestBucket string + IsTagSet bool + IsSCSet bool + ReplicateDeletes string // replicate versioned deletes + ReplicateDeleteMarkers string // replicate soft deletes + ReplicaSync string // replicate replica metadata modifications + ExistingObjectReplicate string } // Tags returns a slice of tags for a rule @@ -71,7 +73,7 @@ func (opts Options) Tags() ([]Tag, error) { } kv := strings.SplitN(tok, "=", 2) if len(kv) != 2 { - return []Tag{}, fmt.Errorf("Tags should be entered as comma separated k=v pairs") + return []Tag{}, fmt.Errorf("tags should be entered as comma separated k=v pairs") } tagList = append(tagList, Tag{ Key: kv[0], @@ -102,7 +104,7 @@ func (c *Config) AddRule(opts Options) error { return err } if opts.RoleArn != c.Role && c.Role != "" { - return fmt.Errorf("Role ARN does not match existing configuration") + return fmt.Errorf("role ARN does not match existing configuration") } var status Status // toggle rule status for edit option @@ -112,7 +114,7 @@ func (c *Config) AddRule(opts Options) error { case "disable": status = Disabled default: - return fmt.Errorf("Rule state should be either [enable|disable]") + return fmt.Errorf("rule state should be either [enable|disable]") } tags, err := opts.Tags() @@ -142,7 +144,7 @@ func (c *Config) AddRule(opts Options) error { arnStr = c.Role } if arnStr == "" { - return fmt.Errorf("Role ARN required") + return fmt.Errorf("role ARN required") } tokens := strings.Split(arnStr, ":") if len(tokens) != 6 { @@ -183,7 +185,28 @@ func (c *Config) AddRule(opts Options) error { return fmt.Errorf("ReplicateDeletes should be either enable|disable") } } + var replicaSync Status + // replica sync is by default Enabled, unless specified. + switch opts.ReplicaSync { + case "enable", "": + replicaSync = Enabled + case "disable": + replicaSync = Disabled + default: + return fmt.Errorf("replica metadata sync should be either [enable|disable]") + } + var existingStatus Status + if opts.ExistingObjectReplicate != "" { + switch opts.ExistingObjectReplicate { + case "enable": + existingStatus = Enabled + case "disable", "": + existingStatus = Disabled + default: + return fmt.Errorf("existingObjectReplicate should be either enable|disable") + } + } newRule := Rule{ ID: opts.ID, Priority: priority, @@ -200,9 +223,13 @@ func (c *Config) AddRule(opts Options) error { // However AWS leaves this configurable https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-for-metadata-changes.html SourceSelectionCriteria: SourceSelectionCriteria{ ReplicaModifications: ReplicaModifications{ - Status: Enabled, + Status: replicaSync, }, }, + // By default disable existing object replication unless selected + ExistingObjectReplication: ExistingObjectReplication{ + Status: existingStatus, + }, } // validate rule after overlaying priority for pre-existing rule being disabled. @@ -211,13 +238,13 @@ func (c *Config) AddRule(opts Options) error { } for _, rule := range c.Rules { if rule.Priority == newRule.Priority { - return fmt.Errorf("Priority must be unique. Replication configuration already has a rule with this priority") + return fmt.Errorf("priority must be unique. Replication configuration already has a rule with this priority") } if rule.Destination.Bucket != newRule.Destination.Bucket { - return fmt.Errorf("The destination bucket must be same for all rules") + return fmt.Errorf("the destination bucket must be same for all rules") } if rule.ID == newRule.ID { - return fmt.Errorf("A rule exists with this ID") + return fmt.Errorf("a rule exists with this ID") } } @@ -228,7 +255,7 @@ func (c *Config) AddRule(opts Options) error { // EditRule modifies an existing rule in replication config func (c *Config) EditRule(opts Options) error { if opts.ID == "" { - return fmt.Errorf("Rule ID missing") + return fmt.Errorf("rule ID missing") } rIdx := -1 var newRule Rule @@ -240,7 +267,7 @@ func (c *Config) EditRule(opts Options) error { } } if rIdx < 0 { - return fmt.Errorf("Rule with ID %s not found in replication configuration", opts.ID) + return fmt.Errorf("rule with ID %s not found in replication configuration", opts.ID) } prefixChg := opts.Prefix != newRule.Prefix() if opts.IsTagSet || prefixChg { @@ -286,7 +313,7 @@ func (c *Config) EditRule(opts Options) error { case "disable": newRule.Status = Disabled default: - return fmt.Errorf("Rule state should be either [enable|disable]") + return fmt.Errorf("rule state should be either [enable|disable]") } } // set DeleteMarkerReplication rule status for edit option @@ -314,6 +341,27 @@ func (c *Config) EditRule(opts Options) error { } } + if opts.ReplicaSync != "" { + switch opts.ReplicaSync { + case "enable", "": + newRule.SourceSelectionCriteria.ReplicaModifications.Status = Enabled + case "disable": + newRule.SourceSelectionCriteria.ReplicaModifications.Status = Disabled + default: + return fmt.Errorf("replica metadata sync should be either [enable|disable]") + } + } + fmt.Println("opts.ExistingObjectReplicate>", opts.ExistingObjectReplicate) + if opts.ExistingObjectReplicate != "" { + switch opts.ExistingObjectReplicate { + case "enable": + newRule.ExistingObjectReplication.Status = Enabled + case "disable": + newRule.ExistingObjectReplication.Status = Disabled + default: + return fmt.Errorf("existingObjectsReplication state should be either [enable|disable]") + } + } if opts.IsSCSet { newRule.Destination.StorageClass = opts.StorageClass } @@ -343,10 +391,10 @@ func (c *Config) EditRule(opts Options) error { // ensure priority and destination bucket restrictions are not violated for idx, rule := range c.Rules { if rule.Priority == newRule.Priority && rIdx != idx { - return fmt.Errorf("Priority must be unique. Replication configuration already has a rule with this priority") + return fmt.Errorf("priority must be unique. Replication configuration already has a rule with this priority") } if rule.Destination.Bucket != newRule.Destination.Bucket { - return fmt.Errorf("The destination bucket must be same for all rules") + return fmt.Errorf("the destination bucket must be same for all rules") } } @@ -369,7 +417,7 @@ func (c *Config) RemoveRule(opts Options) error { return fmt.Errorf("Rule with ID %s not found", opts.ID) } if len(newRules) == 0 { - return fmt.Errorf("Replication configuration should have at least one rule") + return fmt.Errorf("replication configuration should have at least one rule") } c.Rules = newRules return nil @@ -378,15 +426,16 @@ func (c *Config) RemoveRule(opts Options) error { // Rule - a rule for replication configuration. type Rule struct { - XMLName xml.Name `xml:"Rule" json:"-"` - ID string `xml:"ID,omitempty"` - Status Status `xml:"Status"` - Priority int `xml:"Priority"` - DeleteMarkerReplication DeleteMarkerReplication `xml:"DeleteMarkerReplication"` - DeleteReplication DeleteReplication `xml:"DeleteReplication"` - Destination Destination `xml:"Destination"` - Filter Filter `xml:"Filter" json:"Filter"` - SourceSelectionCriteria SourceSelectionCriteria `xml:"SourceSelectionCriteria" json:"SourceSelectionCriteria"` + XMLName xml.Name `xml:"Rule" json:"-"` + ID string `xml:"ID,omitempty"` + Status Status `xml:"Status"` + Priority int `xml:"Priority"` + DeleteMarkerReplication DeleteMarkerReplication `xml:"DeleteMarkerReplication"` + DeleteReplication DeleteReplication `xml:"DeleteReplication"` + Destination Destination `xml:"Destination"` + Filter Filter `xml:"Filter" json:"Filter"` + SourceSelectionCriteria SourceSelectionCriteria `xml:"SourceSelectionCriteria" json:"SourceSelectionCriteria"` + ExistingObjectReplication ExistingObjectReplication `xml:"ExistingObjectReplication,omitempty" json:"ExistingObjectReplication,omitempty"` } // Validate validates the rule for correctness @@ -402,14 +451,13 @@ func (r Rule) Validate() error { } if r.Priority < 0 && r.Status == Enabled { - return fmt.Errorf("Priority must be set for the rule") + return fmt.Errorf("priority must be set for the rule") } if err := r.validateStatus(); err != nil { return err } - - return nil + return r.ExistingObjectReplication.Validate() } // validateID - checks if ID is valid or not. @@ -525,11 +573,11 @@ func (tag Tag) IsEmpty() bool { // Validate checks this tag. func (tag Tag) Validate() error { if len(tag.Key) == 0 || utf8.RuneCountInString(tag.Key) > 128 { - return fmt.Errorf("Invalid Tag Key") + return fmt.Errorf("invalid Tag Key") } if utf8.RuneCountInString(tag.Value) > 256 { - return fmt.Errorf("Invalid Tag Value") + return fmt.Errorf("invalid Tag Value") } return nil } @@ -585,7 +633,7 @@ func (d DeleteReplication) IsEmpty() bool { // ReplicaModifications specifies if replica modification sync is enabled type ReplicaModifications struct { - Status Status `xml:"Status" json:"Status"` + Status Status `xml:"Status" json:"Status"` // should be set to "Enabled" by default } // SourceSelectionCriteria - specifies additional source selection criteria in ReplicationConfiguration. @@ -604,7 +652,45 @@ func (s SourceSelectionCriteria) Validate() error { return nil } if !s.IsValid() { - return fmt.Errorf("Invalid ReplicaModification status") + return fmt.Errorf("invalid ReplicaModification status") + } + return nil +} + +// ExistingObjectReplication - whether existing object replication is enabled +type ExistingObjectReplication struct { + Status Status `xml:"Status"` // should be set to "Disabled" by default +} + +// IsEmpty returns true if DeleteMarkerReplication is not set +func (e ExistingObjectReplication) IsEmpty() bool { + return len(e.Status) == 0 +} + +// Validate validates whether the status is disabled. +func (e ExistingObjectReplication) Validate() error { + if e.IsEmpty() { + return nil + } + if e.Status != Disabled && e.Status != Enabled { + return fmt.Errorf("invalid ExistingObjectReplication status") } return nil } + +// Metrics represents inline replication metrics +// such as pending, failed and completed bytes in total for a bucket +type Metrics struct { + // Pending size in bytes + PendingSize uint64 `json:"pendingReplicationSize"` + // Completed size in bytes + ReplicatedSize uint64 `json:"completedReplicationSize"` + // Total Replica size in bytes + ReplicaSize uint64 `json:"replicaSize"` + // Failed size in bytes + FailedSize uint64 `json:"failedReplicationSize"` + // Total number of pending operations including metadata updates + PendingCount uint64 `json:"pendingReplicationCount"` + // Total number of failed operations including metadata updates + FailedCount uint64 `json:"failedReplicationCount"` +} diff --git a/vendor/github.com/olivere/elastic/v7/CONTRIBUTORS b/vendor/github.com/olivere/elastic/v7/CONTRIBUTORS index 32912ebdd3..b3d265c1de 100644 --- a/vendor/github.com/olivere/elastic/v7/CONTRIBUTORS +++ b/vendor/github.com/olivere/elastic/v7/CONTRIBUTORS @@ -32,6 +32,7 @@ arthurgustin [@arthurgustin](https://github.com/arthurgustin) Bas van Dijk [@basvandijk](https://github.com/basvandijk) Benjamin Fernandes [@LotharSee](https://github.com/LotharSee) Benjamin Zarzycki [@kf6nux](https://github.com/kf6nux) +bestgopher [@bestgopher](https://github.com/bestgopher) Björn Gerdau [@kernle32dll](https://github.com/kernle32dll) Boris Popovschi [@Zyqsempai](https://github.com/Zyqsempai) Bowei Xu [@vancexu](https://github.com/vancexu) @@ -148,6 +149,7 @@ mmfrb [@mmfrb](https://github.com/mmfrb) mnpritula [@mnpritula](https://github.com/mnpritula) mosa [@mosasiru](https://github.com/mosasiru) Muhammet Çakır [@cakirmuha](https://github.com/cakirmuha) +Munkyu Im [@munkyu](https://github.com/munkyu) naimulhaider [@naimulhaider](https://github.com/naimulhaider) Naoya Yoshizawa [@azihsoyn](https://github.com/azihsoyn) navins [@ishare](https://github.com/ishare) diff --git a/vendor/github.com/olivere/elastic/v7/README.md b/vendor/github.com/olivere/elastic/v7/README.md index ac43f557fa..ee547761b6 100644 --- a/vendor/github.com/olivere/elastic/v7/README.md +++ b/vendor/github.com/olivere/elastic/v7/README.md @@ -196,7 +196,7 @@ Here are a few tips on how to get used to Elastic: - [x] Sum - [ ] T-test (X-pack) - [x] Top Hits - - [ ] Top metrics (X-pack) + - [x] Top metrics (X-pack) - [x] Value Count - [x] Weighted avg - Bucket Aggregations @@ -333,6 +333,7 @@ Here are a few tips on how to get used to Elastic: - [x] Inner hits - Full text queries - [x] Match Query + - [x] Match Boolean Prefix Query - [x] Match Phrase Query - [x] Match Phrase Prefix Query - [x] Multi Match Query diff --git a/vendor/github.com/olivere/elastic/v7/client.go b/vendor/github.com/olivere/elastic/v7/client.go index ad351a4632..856dd1d814 100644 --- a/vendor/github.com/olivere/elastic/v7/client.go +++ b/vendor/github.com/olivere/elastic/v7/client.go @@ -26,7 +26,7 @@ import ( const ( // Version is the current version of Elastic. - Version = "7.0.24" + Version = "7.0.25" // 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. @@ -1842,7 +1842,31 @@ func (c *Client) IndexDeleteIndexTemplate(name string) *IndicesDeleteIndexTempla return NewIndicesDeleteIndexTemplateService(c).Name(name) } -// -- TODO Component templates -- +// -- Component templates -- + +// IndexPutComponentTemplate creates or updates a component template (available since 7.8). +// +// This service implements the component templates as described +// on https://www.elastic.co/guide/en/elasticsearch/reference/7.10/indices-component-template.html. +func (c *Client) IndexPutComponentTemplate(name string) *IndicesPutComponentTemplateService { + return NewIndicesPutComponentTemplateService(c).Name(name) +} + +// IndexGetComponentTemplate returns a component template (available since 7.8). +// +// This service implements the component templates as described +// on https://www.elastic.co/guide/en/elasticsearch/reference/7.10/getting-component-templates.html. +func (c *Client) IndexGetComponentTemplate(name string) *IndicesGetComponentTemplateService { + return NewIndicesGetComponentTemplateService(c).Name(name) +} + +// IndexDeleteComponentTemplate deletes a component template (available since 7.8). +// +// This service implements the component templates as described +// on https://www.elastic.co/guide/en/elasticsearch/reference/7.10/indices-delete-component-template.html. +func (c *Client) IndexDeleteComponentTemplate(name string) *IndicesDeleteComponentTemplateService { + return NewIndicesDeleteComponentTemplateService(c).Name(name) +} // GetMapping gets a mapping. func (c *Client) GetMapping() *IndicesGetMappingService { diff --git a/vendor/github.com/olivere/elastic/v7/docker-compose.yml b/vendor/github.com/olivere/elastic/v7/docker-compose.yml index aca2553a6a..4b8761cffb 100644 --- a/vendor/github.com/olivere/elastic/v7/docker-compose.yml +++ b/vendor/github.com/olivere/elastic/v7/docker-compose.yml @@ -2,7 +2,7 @@ version: '3' services: elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0 + image: docker.elastic.co/elasticsearch/elasticsearch:7.13.2 hostname: elasticsearch environment: - cluster.name=elasticsearch @@ -14,6 +14,7 @@ services: # - network.host=_local_ - network.publish_host=127.0.0.1 - logger.org.elasticsearch=warn + - xpack.security.enabled=false - "ES_JAVA_OPTS=-Xms1g -Xmx1g" ulimits: nproc: 65536 @@ -28,7 +29,7 @@ services: ports: - 9200:9200 platinum: - image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0 + image: docker.elastic.co/elasticsearch/elasticsearch:7.13.2 hostname: elasticsearch-platinum environment: - cluster.name=platinum diff --git a/vendor/github.com/olivere/elastic/v7/errors.go b/vendor/github.com/olivere/elastic/v7/errors.go index ee11f0b3f3..c17c5ed549 100644 --- a/vendor/github.com/olivere/elastic/v7/errors.go +++ b/vendor/github.com/olivere/elastic/v7/errors.go @@ -204,19 +204,15 @@ func IsStatusCode(err interface{}, code int) bool { // ShardsInfo represents information from a shard. type ShardsInfo struct { - Total int `json:"total"` - Successful int `json:"successful"` - Failed int `json:"failed"` - Failures []*ShardFailure `json:"failures,omitempty"` - Skipped int `json:"skipped,omitempty"` -} - -// ShardFailure represents details about a failure. -type ShardFailure struct { - Index string `json:"_index,omitempty"` - Shard int `json:"_shard,omitempty"` - Node string `json:"_node,omitempty"` - Reason map[string]interface{} `json:"reason,omitempty"` - Status string `json:"status,omitempty"` - Primary bool `json:"primary,omitempty"` + Total int `json:"total"` + Successful int `json:"successful"` + Failed int `json:"failed"` + Failures []*FailedNodeException `json:"failures,omitempty"` + Skipped int `json:"skipped,omitempty"` +} + +// FailedNodeException returns an error on the node level. +type FailedNodeException struct { + *ErrorDetails + NodeId string `json:"node_id"` } diff --git a/vendor/github.com/olivere/elastic/v7/go.mod b/vendor/github.com/olivere/elastic/v7/go.mod index 00c6cc1af0..e82873f4d1 100644 --- a/vendor/github.com/olivere/elastic/v7/go.mod +++ b/vendor/github.com/olivere/elastic/v7/go.mod @@ -3,9 +3,8 @@ module github.com/olivere/elastic/v7 go 1.14 require ( - github.com/aws/aws-sdk-go v1.38.3 + github.com/aws/aws-sdk-go v1.38.17 github.com/fortytw2/leaktest v1.3.0 - github.com/go-sql-driver/mysql v1.5.0 // indirect github.com/google/go-cmp v0.5.5 github.com/mailru/easyjson v0.7.7 github.com/opentracing/opentracing-go v1.2.0 diff --git a/vendor/github.com/olivere/elastic/v7/indices_delete.go b/vendor/github.com/olivere/elastic/v7/indices_delete.go index cdf27a5606..e89b2f8f3a 100644 --- a/vendor/github.com/olivere/elastic/v7/indices_delete.go +++ b/vendor/github.com/olivere/elastic/v7/indices_delete.go @@ -27,9 +27,12 @@ type IndicesDeleteService struct { filterPath []string // list of filters used to reduce the response headers http.Header // custom request-level HTTP headers - index []string - timeout string - masterTimeout string + index []string + timeout string + masterTimeout string + ignoreUnavailable *bool + allowNoIndices *bool + expandWildcards string } // NewIndicesDeleteService creates and initializes a new IndicesDeleteService. @@ -99,6 +102,26 @@ func (s *IndicesDeleteService) MasterTimeout(masterTimeout string) *IndicesDelet return s } +// IgnoreUnavailable indicates whether to ignore unavailable indexes (default: false). +func (s *IndicesDeleteService) IgnoreUnavailable(ignoreUnavailable bool) *IndicesDeleteService { + s.ignoreUnavailable = &ignoreUnavailable + return s +} + +// AllowNoIndices indicates whether to ignore if a wildcard expression +// resolves to no concrete indices (default: false). +func (s *IndicesDeleteService) AllowNoIndices(allowNoIndices bool) *IndicesDeleteService { + s.allowNoIndices = &allowNoIndices + return s +} + +// ExpandWildcards indicates whether wildcard expressions should get +// expanded to open or closed indices (default: open). +func (s *IndicesDeleteService) ExpandWildcards(expandWildcards string) *IndicesDeleteService { + s.expandWildcards = expandWildcards + return s +} + // buildURL builds the URL for the operation. func (s *IndicesDeleteService) buildURL() (string, url.Values, error) { // Build URL @@ -129,6 +152,15 @@ func (s *IndicesDeleteService) buildURL() (string, url.Values, error) { 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 } diff --git a/vendor/github.com/olivere/elastic/v7/indices_delete_component_template.go b/vendor/github.com/olivere/elastic/v7/indices_delete_component_template.go new file mode 100644 index 0000000000..46b842ab96 --- /dev/null +++ b/vendor/github.com/olivere/elastic/v7/indices_delete_component_template.go @@ -0,0 +1,182 @@ +// Copyright 2012-present Oliver Eilhard. All rights reserved. +// 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/v7/uritemplates" +) + +// IndicesDeleteComponentTemplateService deletes component templates. +// +// See https://www.elastic.co/guide/en/elasticsearch/reference/7.10/indices-delete-component-template.html +// for more details. +type IndicesDeleteComponentTemplateService struct { + client *Client + + pretty *bool // pretty format the returned JSON response + human *bool // return human readable values for statistics + errorTrace *bool // include the stack trace of returned errors + filterPath []string // list of filters used to reduce the response + headers http.Header // custom request-level HTTP headers + + name string + timeout string + masterTimeout string +} + +// NewIndicesDeleteComponentTemplateService creates a new IndicesDeleteComponentTemplateService. +func NewIndicesDeleteComponentTemplateService(client *Client) *IndicesDeleteComponentTemplateService { + return &IndicesDeleteComponentTemplateService{ + client: client, + } +} + +// Pretty tells Elasticsearch whether to return a formatted JSON response. +func (s *IndicesDeleteComponentTemplateService) Pretty(pretty bool) *IndicesDeleteComponentTemplateService { + s.pretty = &pretty + return s +} + +// Human specifies whether human readable values should be returned in +// the JSON response, e.g. "7.5mb". +func (s *IndicesDeleteComponentTemplateService) Human(human bool) *IndicesDeleteComponentTemplateService { + s.human = &human + return s +} + +// ErrorTrace specifies whether to include the stack trace of returned errors. +func (s *IndicesDeleteComponentTemplateService) ErrorTrace(errorTrace bool) *IndicesDeleteComponentTemplateService { + s.errorTrace = &errorTrace + return s +} + +// FilterPath specifies a list of filters used to reduce the response. +func (s *IndicesDeleteComponentTemplateService) FilterPath(filterPath ...string) *IndicesDeleteComponentTemplateService { + s.filterPath = filterPath + return s +} + +// Header adds a header to the request. +func (s *IndicesDeleteComponentTemplateService) Header(name string, value string) *IndicesDeleteComponentTemplateService { + if s.headers == nil { + s.headers = http.Header{} + } + s.headers.Add(name, value) + return s +} + +// Headers specifies the headers of the request. +func (s *IndicesDeleteComponentTemplateService) Headers(headers http.Header) *IndicesDeleteComponentTemplateService { + s.headers = headers + return s +} + +// Name is the name of the template. +func (s *IndicesDeleteComponentTemplateService) Name(name string) *IndicesDeleteComponentTemplateService { + s.name = name + return s +} + +// Timeout is an explicit operation timeout. +func (s *IndicesDeleteComponentTemplateService) Timeout(timeout string) *IndicesDeleteComponentTemplateService { + s.timeout = timeout + return s +} + +// MasterTimeout specifies the timeout for connection to master. +func (s *IndicesDeleteComponentTemplateService) MasterTimeout(masterTimeout string) *IndicesDeleteComponentTemplateService { + s.masterTimeout = masterTimeout + return s +} + +// buildURL builds the URL for the operation. +func (s *IndicesDeleteComponentTemplateService) buildURL() (string, url.Values, error) { + // Build URL + path, err := uritemplates.Expand("/_component_template/{name}", map[string]string{ + "name": s.name, + }) + if err != nil { + return "", url.Values{}, err + } + + // Add query string parameters + params := url.Values{} + if v := s.pretty; v != nil { + params.Set("pretty", fmt.Sprint(*v)) + } + if v := s.human; v != nil { + params.Set("human", fmt.Sprint(*v)) + } + if v := s.errorTrace; v != nil { + params.Set("error_trace", fmt.Sprint(*v)) + } + if len(s.filterPath) > 0 { + params.Set("filter_path", strings.Join(s.filterPath, ",")) + } + 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 *IndicesDeleteComponentTemplateService) 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 *IndicesDeleteComponentTemplateService) Do(ctx context.Context) (*IndicesDeleteComponentTemplateResponse, 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, + Headers: s.headers, + }) + if err != nil { + return nil, err + } + + // Return operation response + ret := new(IndicesDeleteComponentTemplateResponse) + if err := s.client.decoder.Decode(res.Body, ret); err != nil { + return nil, err + } + return ret, nil +} + +// IndicesDeleteComponentTemplateResponse is the response of IndicesDeleteComponentTemplateService.Do. +type IndicesDeleteComponentTemplateResponse struct { + Acknowledged bool `json:"acknowledged"` + ShardsAcknowledged bool `json:"shards_acknowledged"` + Index string `json:"index,omitempty"` +} diff --git a/vendor/github.com/olivere/elastic/v7/indices_get_component_template.go b/vendor/github.com/olivere/elastic/v7/indices_get_component_template.go new file mode 100644 index 0000000000..d3d2d71aa8 --- /dev/null +++ b/vendor/github.com/olivere/elastic/v7/indices_get_component_template.go @@ -0,0 +1,207 @@ +// Copyright 2012-present Oliver Eilhard. All rights reserved. +// 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/v7/uritemplates" +) + +// IndicesGetComponentTemplateService returns a component template. +// +// See https://www.elastic.co/guide/en/elasticsearch/reference/7.10/getting-component-templates.html +// for more details. +type IndicesGetComponentTemplateService struct { + client *Client + + pretty *bool // pretty format the returned JSON response + human *bool // return human readable values for statistics + errorTrace *bool // include the stack trace of returned errors + filterPath []string // list of filters used to reduce the response + headers http.Header // custom request-level HTTP headers + + name []string + masterTimeout string + flatSettings *bool + local *bool +} + +// NewIndicesGetComponentTemplateService creates a new IndicesGetComponentTemplateService. +func NewIndicesGetComponentTemplateService(client *Client) *IndicesGetComponentTemplateService { + return &IndicesGetComponentTemplateService{ + client: client, + name: make([]string, 0), + } +} + +// Pretty tells Elasticsearch whether to return a formatted JSON response. +func (s *IndicesGetComponentTemplateService) Pretty(pretty bool) *IndicesGetComponentTemplateService { + s.pretty = &pretty + return s +} + +// Human specifies whether human readable values should be returned in +// the JSON response, e.g. "7.5mb". +func (s *IndicesGetComponentTemplateService) Human(human bool) *IndicesGetComponentTemplateService { + s.human = &human + return s +} + +// ErrorTrace specifies whether to include the stack trace of returned errors. +func (s *IndicesGetComponentTemplateService) ErrorTrace(errorTrace bool) *IndicesGetComponentTemplateService { + s.errorTrace = &errorTrace + return s +} + +// FilterPath specifies a list of filters used to reduce the response. +func (s *IndicesGetComponentTemplateService) FilterPath(filterPath ...string) *IndicesGetComponentTemplateService { + s.filterPath = filterPath + return s +} + +// Header adds a header to the request. +func (s *IndicesGetComponentTemplateService) Header(name string, value string) *IndicesGetComponentTemplateService { + if s.headers == nil { + s.headers = http.Header{} + } + s.headers.Add(name, value) + return s +} + +// Headers specifies the headers of the request. +func (s *IndicesGetComponentTemplateService) Headers(headers http.Header) *IndicesGetComponentTemplateService { + s.headers = headers + return s +} + +// Name is the name of the component template. +func (s *IndicesGetComponentTemplateService) Name(name ...string) *IndicesGetComponentTemplateService { + s.name = append(s.name, name...) + return s +} + +// FlatSettings is returns settings in flat format (default: false). +func (s *IndicesGetComponentTemplateService) FlatSettings(flatSettings bool) *IndicesGetComponentTemplateService { + 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 *IndicesGetComponentTemplateService) Local(local bool) *IndicesGetComponentTemplateService { + s.local = &local + return s +} + +// MasterTimeout specifies the timeout for connection to master. +func (s *IndicesGetComponentTemplateService) MasterTimeout(masterTimeout string) *IndicesGetComponentTemplateService { + s.masterTimeout = masterTimeout + return s +} + +// buildURL builds the URL for the operation. +func (s *IndicesGetComponentTemplateService) buildURL() (string, url.Values, error) { + // Build URL + var err error + var path string + if len(s.name) > 0 { + path, err = uritemplates.Expand("/_component_template/{name}", map[string]string{ + "name": strings.Join(s.name, ","), + }) + } else { + path = "/_component_template" + } + if err != nil { + return "", url.Values{}, err + } + + // Add query string parameters + params := url.Values{} + if v := s.pretty; v != nil { + params.Set("pretty", fmt.Sprint(*v)) + } + if v := s.human; v != nil { + params.Set("human", fmt.Sprint(*v)) + } + if v := s.errorTrace; v != nil { + params.Set("error_trace", fmt.Sprint(*v)) + } + if len(s.filterPath) > 0 { + params.Set("filter_path", strings.Join(s.filterPath, ",")) + } + 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)) + } + if s.masterTimeout != "" { + params.Set("master_timeout", s.masterTimeout) + } + return path, params, nil +} + +// Validate checks if the operation is valid. +func (s *IndicesGetComponentTemplateService) Validate() error { + return nil +} + +// Do executes the operation. +func (s *IndicesGetComponentTemplateService) Do(ctx context.Context) (*IndicesGetComponentTemplateResponse, 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, + Headers: s.headers, + }) + if err != nil { + return nil, err + } + + // Return operation response + var ret *IndicesGetComponentTemplateResponse + if err := s.client.decoder.Decode(res.Body, &ret); err != nil { + return nil, err + } + return ret, nil +} + +// IndicesGetComponentTemplateResponse is the response of IndicesGetComponentTemplateService.Do. +type IndicesGetComponentTemplateResponse struct { + ComponentTemplates []IndicesGetComponentTemplates `json:"component_templates"` +} + +type IndicesGetComponentTemplates struct { + Name string `json:"name"` + ComponentTemplate *IndicesGetComponentTemplate `json:"component_template"` +} + +type IndicesGetComponentTemplate struct { + Version int `json:"version,omitempty"` + Template *IndicesGetComponentTemplateData `json:"template,omitempty"` +} + +type IndicesGetComponentTemplateData struct { + 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/v7/indices_put_component_template.go b/vendor/github.com/olivere/elastic/v7/indices_put_component_template.go new file mode 100644 index 0000000000..ec6b93d15a --- /dev/null +++ b/vendor/github.com/olivere/elastic/v7/indices_put_component_template.go @@ -0,0 +1,221 @@ +// Copyright 2012-present Oliver Eilhard. All rights reserved. +// 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/v7/uritemplates" +) + +// IndicesPutComponentTemplateService creates or updates component templates. +// +// See https://www.elastic.co/guide/en/elasticsearch/reference/7.10/indices-component-template.html +// for more details on this API. +type IndicesPutComponentTemplateService struct { + client *Client + + pretty *bool // pretty format the returned JSON response + human *bool // return human readable values for statistics + errorTrace *bool // include the stack trace of returned errors + filterPath []string // list of filters used to reduce the response + headers http.Header // custom request-level HTTP headers + + name string + create *bool + cause string + masterTimeout string + + bodyJson interface{} + bodyString string +} + +// NewIndicesPutComponentTemplateService creates a new IndicesPutComponentTemplateService. +func NewIndicesPutComponentTemplateService(client *Client) *IndicesPutComponentTemplateService { + return &IndicesPutComponentTemplateService{ + client: client, + } +} + +// Pretty tells Elasticsearch whether to return a formatted JSON response. +func (s *IndicesPutComponentTemplateService) Pretty(pretty bool) *IndicesPutComponentTemplateService { + s.pretty = &pretty + return s +} + +// Human specifies whether human readable values should be returned in +// the JSON response, e.g. "7.5mb". +func (s *IndicesPutComponentTemplateService) Human(human bool) *IndicesPutComponentTemplateService { + s.human = &human + return s +} + +// ErrorTrace specifies whether to include the stack trace of returned errors. +func (s *IndicesPutComponentTemplateService) ErrorTrace(errorTrace bool) *IndicesPutComponentTemplateService { + s.errorTrace = &errorTrace + return s +} + +// FilterPath specifies a list of filters used to reduce the response. +func (s *IndicesPutComponentTemplateService) FilterPath(filterPath ...string) *IndicesPutComponentTemplateService { + s.filterPath = filterPath + return s +} + +// Header adds a header to the request. +func (s *IndicesPutComponentTemplateService) Header(name string, value string) *IndicesPutComponentTemplateService { + if s.headers == nil { + s.headers = http.Header{} + } + s.headers.Add(name, value) + return s +} + +// Headers specifies the headers of the request. +func (s *IndicesPutComponentTemplateService) Headers(headers http.Header) *IndicesPutComponentTemplateService { + s.headers = headers + return s +} + +// Name is the name of the component template. +func (s *IndicesPutComponentTemplateService) Name(name string) *IndicesPutComponentTemplateService { + s.name = name + return s +} + +// Create indicates whether the component template should only be added if +// new or can also replace an existing one. +func (s *IndicesPutComponentTemplateService) Create(create bool) *IndicesPutComponentTemplateService { + s.create = &create + return s +} + +// Cause is the user-defined reason for creating/updating the the component template. +func (s *IndicesPutComponentTemplateService) Cause(cause string) *IndicesPutComponentTemplateService { + s.cause = cause + return s +} + +// MasterTimeout specifies the timeout for connection to master. +func (s *IndicesPutComponentTemplateService) MasterTimeout(masterTimeout string) *IndicesPutComponentTemplateService { + s.masterTimeout = masterTimeout + return s +} + +// BodyJson is the component template definition as a JSON serializable +// type, e.g. map[string]interface{}. +func (s *IndicesPutComponentTemplateService) BodyJson(body interface{}) *IndicesPutComponentTemplateService { + s.bodyJson = body + return s +} + +// BodyString is the component template definition as a raw string. +func (s *IndicesPutComponentTemplateService) BodyString(body string) *IndicesPutComponentTemplateService { + s.bodyString = body + return s +} + +// buildURL builds the URL for the operation. +func (s *IndicesPutComponentTemplateService) buildURL() (string, url.Values, error) { + // Build URL + path, err := uritemplates.Expand("/_component_template/{name}", map[string]string{ + "name": s.name, + }) + if err != nil { + return "", url.Values{}, err + } + + // Add query string parameters + params := url.Values{} + if v := s.pretty; v != nil { + params.Set("pretty", fmt.Sprint(*v)) + } + if v := s.human; v != nil { + params.Set("human", fmt.Sprint(*v)) + } + if v := s.errorTrace; v != nil { + params.Set("error_trace", fmt.Sprint(*v)) + } + if len(s.filterPath) > 0 { + params.Set("filter_path", strings.Join(s.filterPath, ",")) + } + if s.create != nil { + params.Set("create", fmt.Sprint(*s.create)) + } + if s.cause != "" { + params.Set("cause", s.cause) + } + if s.masterTimeout != "" { + params.Set("master_timeout", s.masterTimeout) + } + return path, params, nil +} + +// Validate checks if the operation is valid. +func (s *IndicesPutComponentTemplateService) 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 *IndicesPutComponentTemplateService) Do(ctx context.Context) (*IndicesPutComponentTemplateResponse, 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, + Headers: s.headers, + }) + if err != nil { + return nil, err + } + + // Return operation response + ret := new(IndicesPutComponentTemplateResponse) + if err := s.client.decoder.Decode(res.Body, ret); err != nil { + return nil, err + } + return ret, nil +} + +// IndicesPutComponentTemplateResponse is the response of IndicesPutComponentTemplateService.Do. +type IndicesPutComponentTemplateResponse struct { + Acknowledged bool `json:"acknowledged"` + ShardsAcknowledged bool `json:"shards_acknowledged"` + Index string `json:"index,omitempty"` +} diff --git a/vendor/github.com/olivere/elastic/v7/search.go b/vendor/github.com/olivere/elastic/v7/search.go index f47fdf5cba..6e0b476ac7 100644 --- a/vendor/github.com/olivere/elastic/v7/search.go +++ b/vendor/github.com/olivere/elastic/v7/search.go @@ -691,7 +691,7 @@ 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{} + slice := make([]interface{}, 0, len(r.Hits.Hits)) for _, hit := range r.Hits.Hits { v := reflect.New(typ).Elem() if hit.Source == nil { diff --git a/vendor/github.com/olivere/elastic/v7/search_aggs.go b/vendor/github.com/olivere/elastic/v7/search_aggs.go index 72ea92fc8b..bf452f706b 100644 --- a/vendor/github.com/olivere/elastic/v7/search_aggs.go +++ b/vendor/github.com/olivere/elastic/v7/search_aggs.go @@ -369,6 +369,21 @@ func (a Aggregations) Terms(name string) (*AggregationBucketKeyItems, bool) { return nil, false } +// MultiTerms returns multi terms aggregation results. +// See: https://www.elastic.co/guide/en/elasticsearch/reference/7.13/search-aggregations-bucket-multi-terms-aggregation.html +func (a Aggregations) MultiTerms(name string) (*AggregationBucketMultiKeyItems, bool) { + if raw, found := a[name]; found { + agg := new(AggregationBucketMultiKeyItems) + 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/7.0/search-aggregations-bucket-significantterms-aggregation.html func (a Aggregations) SignificantTerms(name string) (*AggregationBucketSignificantTerms, bool) { @@ -840,6 +855,22 @@ func (a Aggregations) ScriptedMetric(name string) (*AggregationScriptedMetric, b return nil, false } +// TopMetrics returns top metrics aggregation results. +// See https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-top-metrics.html +//for details +func (a Aggregations) TopMetrics(name string) (*AggregationTopMetricsItems, bool) { + if raw, found := a[name]; found { + agg := new(AggregationTopMetricsItems) + 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 @@ -1326,6 +1357,71 @@ func (a *AggregationBucketKeyItem) UnmarshalJSON(data []byte) error { return nil } +// AggregationBucketMultiKeyItems is a bucket aggregation that is returned +// with a multi terms aggregation. +type AggregationBucketMultiKeyItems struct { + Aggregations + + DocCountErrorUpperBound int64 //`json:"doc_count_error_upper_bound"` + SumOfOtherDocCount int64 //`json:"sum_other_doc_count"` + Buckets []*AggregationBucketMultiKeyItem //`json:"buckets"` + Meta map[string]interface{} // `json:"meta,omitempty"` +} + +// UnmarshalJSON decodes JSON data and initializes an AggregationBucketMultiKeyItems structure. +func (a *AggregationBucketMultiKeyItems) 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 +} + +// AggregationBucketMultiKeyItem is a single bucket of an AggregationBucketMultiKeyItems structure. +type AggregationBucketMultiKeyItem 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 AggregationBucketMultiKeyItem structure. +func (a *AggregationBucketMultiKeyItem) 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 @@ -1804,3 +1900,16 @@ func (a *AggregationScriptedMetric) UnmarshalJSON(data []byte) error { a.Aggregations = aggs return nil } + +// AggregationTopMetricsItems is the value returned by the top metrics aggregation +type AggregationTopMetricsItems struct { + Aggregations + + Top []AggregationTopMetricsItem `json:"top"` +} + +// AggregationTopMetricsItem is a set of metrics returned for the top document or documents +type AggregationTopMetricsItem struct { + Sort []interface{} `json:"sort"` // sort information + Metrics map[string]interface{} `json:"metrics"` // returned metrics +} diff --git a/vendor/github.com/olivere/elastic/v7/search_aggs_bucket_multi_terms.go b/vendor/github.com/olivere/elastic/v7/search_aggs_bucket_multi_terms.go new file mode 100644 index 0000000000..3eb493b44f --- /dev/null +++ b/vendor/github.com/olivere/elastic/v7/search_aggs_bucket_multi_terms.go @@ -0,0 +1,316 @@ +// Copyright 2012-present Oliver Eilhard. All rights reserved. +// Use of this source code is governed by a MIT-license. +// See http://olivere.mit-license.org/license.txt for details. + +package elastic + +// MultiTermsAggregation is a multi-bucket value source based aggregation +// where buckets are dynamically built - one per unique set of values. +// The multi terms aggregation is very similar to the terms aggregation, +// however in most cases it will be slower than the terms aggregation and will +// consume more memory. Therefore, if the same set of fields is constantly +// used, it would be more efficient to index a combined key for this fields +// as a separate field and use the terms aggregation on this field. +// +// See https://www.elastic.co/guide/en/elasticsearch/reference/7.13/search-aggregations-bucket-multi-terms-aggregation.html +type MultiTermsAggregation struct { + multiTerms []MultiTerm + subAggregations map[string]Aggregation + meta map[string]interface{} + + size *int + shardSize *int + minDocCount *int + shardMinDocCount *int + collectionMode string + showTermDocCountError *bool + order []MultiTermsOrder +} + +// NewMultiTermsAggregation initializes a new MultiTermsAggregation. +func NewMultiTermsAggregation() *MultiTermsAggregation { + return &MultiTermsAggregation{ + subAggregations: make(map[string]Aggregation), + } +} + +// Terms adds a slice of field names to return in the aggregation. +// +// Notice that it appends to existing terms, so you can use Terms more than +// once, and mix with MultiTerms method. +func (a *MultiTermsAggregation) Terms(fields ...string) *MultiTermsAggregation { + for _, field := range fields { + a.multiTerms = append(a.multiTerms, MultiTerm{Field: field}) + } + return a +} + +// MultiTerms adds a slice of MultiTerm instances to return in the aggregation. +// +// Notice that it appends to existing terms, so you can use MultiTerms more +// than once, and mix with Terms method. +func (a *MultiTermsAggregation) MultiTerms(multiTerms ...MultiTerm) *MultiTermsAggregation { + a.multiTerms = append(a.multiTerms, multiTerms...) + return a +} + +func (a *MultiTermsAggregation) SubAggregation(name string, subAggregation Aggregation) *MultiTermsAggregation { + a.subAggregations[name] = subAggregation + return a +} + +// Meta sets the meta data to be included in the aggregation response. +func (a *MultiTermsAggregation) Meta(metaData map[string]interface{}) *MultiTermsAggregation { + a.meta = metaData + return a +} + +func (a *MultiTermsAggregation) Size(size int) *MultiTermsAggregation { + a.size = &size + return a +} + +func (a *MultiTermsAggregation) ShardSize(shardSize int) *MultiTermsAggregation { + a.shardSize = &shardSize + return a +} + +func (a *MultiTermsAggregation) MinDocCount(minDocCount int) *MultiTermsAggregation { + a.minDocCount = &minDocCount + return a +} + +func (a *MultiTermsAggregation) ShardMinDocCount(shardMinDocCount int) *MultiTermsAggregation { + a.shardMinDocCount = &shardMinDocCount + return a +} + +func (a *MultiTermsAggregation) Order(order string, asc bool) *MultiTermsAggregation { + a.order = append(a.order, MultiTermsOrder{Field: order, Ascending: asc}) + return a +} + +func (a *MultiTermsAggregation) OrderByCount(asc bool) *MultiTermsAggregation { + // "order" : { "_count" : "asc" } + a.order = append(a.order, MultiTermsOrder{Field: "_count", Ascending: asc}) + return a +} + +func (a *MultiTermsAggregation) OrderByCountAsc() *MultiTermsAggregation { + return a.OrderByCount(true) +} + +func (a *MultiTermsAggregation) OrderByCountDesc() *MultiTermsAggregation { + return a.OrderByCount(false) +} + +func (a *MultiTermsAggregation) OrderByKey(asc bool) *MultiTermsAggregation { + // "order" : { "_term" : "asc" } + a.order = append(a.order, MultiTermsOrder{Field: "_key", Ascending: asc}) + return a +} + +func (a *MultiTermsAggregation) OrderByKeyAsc() *MultiTermsAggregation { + return a.OrderByKey(true) +} + +func (a *MultiTermsAggregation) OrderByKeyDesc() *MultiTermsAggregation { + return a.OrderByKey(false) +} + +// OrderByAggregation creates a bucket ordering strategy which sorts buckets +// based on a single-valued calc get. +func (a *MultiTermsAggregation) OrderByAggregation(aggName string, asc bool) *MultiTermsAggregation { + // { + // "aggs": { + // "genres_and_products": { + // "multi_terms": { + // "terms": [ + // { + // "field": "genre" + // }, + // { + // "field": "product" + // } + // ], + // "order": { + // "total_quantity": "desc" + // } + // }, + // "aggs": { + // "total_quantity": { + // "sum": { + // "field": "quantity" + // } + // } + // } + // } + // } + // } + a.order = append(a.order, MultiTermsOrder{Field: aggName, Ascending: asc}) + return a +} + +// OrderByAggregationAndMetric creates a bucket ordering strategy which +// sorts buckets based on a multi-valued calc get. +func (a *MultiTermsAggregation) OrderByAggregationAndMetric(aggName, metric string, asc bool) *MultiTermsAggregation { + // { + // "aggs": { + // "genres_and_products": { + // "multi_terms": { + // "terms": [ + // { + // "field": "genre" + // }, + // { + // "field": "product" + // } + // ], + // "order": { + // "total_quantity": "desc" + // } + // }, + // "aggs": { + // "total_quantity": { + // "sum": { + // "field": "quantity" + // } + // } + // } + // } + // } + // } + a.order = append(a.order, MultiTermsOrder{Field: aggName + "." + metric, Ascending: asc}) + return a +} + +// Collection mode can be depth_first or breadth_first as of 1.4.0. +func (a *MultiTermsAggregation) CollectionMode(collectionMode string) *MultiTermsAggregation { + a.collectionMode = collectionMode + return a +} + +func (a *MultiTermsAggregation) ShowTermDocCountError(showTermDocCountError bool) *MultiTermsAggregation { + a.showTermDocCountError = &showTermDocCountError + return a +} + +func (a *MultiTermsAggregation) Source() (interface{}, error) { + // Example: + // { + // "aggs": { + // "genres_and_products": { + // "multi_terms": { + // "terms": [ + // { + // "field": "genre" + // }, + // { + // "field": "product" + // } + // ] + // } + // } + // } + // } + // This method returns only the "multi_terms": { "terms": [ { "field": "genre" }, { "field": "product" } ] } part. + + source := make(map[string]interface{}) + opts := make(map[string]interface{}) + source["multi_terms"] = opts + + // ValuesSourceAggregationBuilder + terms := make([]interface{}, len(a.multiTerms)) + for i := range a.multiTerms { + s, err := a.multiTerms[i].Source() + if err != nil { + return nil, err + } + terms[i] = s + } + opts["terms"] = terms + + // 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.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 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 + } + + // 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 +} + +// MultiTermsOrder specifies a single order field for a multi terms aggregation. +type MultiTermsOrder struct { + Field string + Ascending bool +} + +// Source returns serializable JSON of the MultiTermsOrder. +func (order *MultiTermsOrder) Source() (interface{}, error) { + source := make(map[string]string) + if order.Ascending { + source[order.Field] = "asc" + } else { + source[order.Field] = "desc" + } + return source, nil +} + +// MultiTerm specifies a single term field for a multi terms aggregation. +type MultiTerm struct { + Field string + Missing interface{} +} + +// Source returns serializable JSON of the MultiTerm. +func (term *MultiTerm) Source() (interface{}, error) { + source := make(map[string]interface{}) + source["field"] = term.Field + if term.Missing != nil { + source["missing"] = term.Missing + } + return source, nil +} diff --git a/vendor/github.com/olivere/elastic/v7/search_aggs_metrics_top_metrics.go b/vendor/github.com/olivere/elastic/v7/search_aggs_metrics_top_metrics.go new file mode 100644 index 0000000000..1a450a86e3 --- /dev/null +++ b/vendor/github.com/olivere/elastic/v7/search_aggs_metrics_top_metrics.go @@ -0,0 +1,83 @@ +// Copyright 2012-present Oliver Eilhard. All rights reserved. +// 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" + +// TopMetricsAggregation selects metrics from the document with the largest or smallest "sort" value. +// top_metrics is fairly similar to top_hits in spirit but because it is more limited it is able to do +// its job using less memory and is often faster. +// +// See: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/search-aggregations-metrics-top-metrics.html +type TopMetricsAggregation struct { + fields []string + sorter Sorter + size int +} + +func NewTopMetricsAggregation() *TopMetricsAggregation { + return &TopMetricsAggregation{} +} + +// Field adds a field to run aggregation against. +func (a *TopMetricsAggregation) Field(field string) *TopMetricsAggregation { + a.fields = append(a.fields, field) + return a +} + +// Sort adds a sort order. +func (a *TopMetricsAggregation) Sort(field string, ascending bool) *TopMetricsAggregation { + a.sorter = SortInfo{Field: field, Ascending: ascending} + return a +} + +// SortWithInfo adds a sort order. +func (a *TopMetricsAggregation) SortWithInfo(info SortInfo) *TopMetricsAggregation { + a.sorter = info + return a +} + +// SortBy adds a sort order. +func (a *TopMetricsAggregation) SortBy(sorter Sorter) *TopMetricsAggregation { + a.sorter = sorter + return a +} + +// Size sets the number of top documents returned by the aggregation. The default size is 1. +func (a *TopMetricsAggregation) Size(size int) *TopMetricsAggregation { + a.size = size + return a +} + +func (a *TopMetricsAggregation) Source() (interface{}, error) { + params := make(map[string]interface{}) + + if len(a.fields) == 0 { + return nil, errors.New("field list is required for the top metrics aggregation") + } + metrics := make([]interface{}, len(a.fields)) + for idx, field := range a.fields { + metrics[idx] = map[string]string{"field": field} + } + params["metrics"] = metrics + + if a.sorter == nil { + return nil, errors.New("sorter is required for the top metrics aggregation") + } + sortSource, err := a.sorter.Source() + if err != nil { + return nil, err + } + params["sort"] = sortSource + + if a.size > 1 { + params["size"] = a.size + } + + source := map[string]interface{}{ + "top_metrics": params, + } + return source, nil +} diff --git a/vendor/github.com/olivere/elastic/v7/search_queries_match_bool_prefix.go b/vendor/github.com/olivere/elastic/v7/search_queries_match_bool_prefix.go new file mode 100644 index 0000000000..5bbc7782f6 --- /dev/null +++ b/vendor/github.com/olivere/elastic/v7/search_queries_match_bool_prefix.go @@ -0,0 +1,130 @@ +// Copyright 2012-present Oliver Eilhard. All rights reserved. +// Use of this source code is governed by a MIT-license. +// See http://olivere.mit-license.org/license.txt for details. + +package elastic + +// MatchBoolPrefixQuery query analyzes its input and constructs a bool query from the terms. +// Each term except the last is used in a term query. The last term is used in a prefix query. +// +// For more details, see +// https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-match-bool-prefix-query.html +type MatchBoolPrefixQuery struct { + name string + queryText interface{} + analyzer string + minimumShouldMatch string + operator string + fuzziness string + prefixLength *int + maxExpansions *int + fuzzyTranspositions *bool + fuzzyRewrite string + boost *float64 +} + +// NewMatchBoolPrefixQuery creates and initializes a new MatchBoolPrefixQuery. +func NewMatchBoolPrefixQuery(name string, queryText interface{}) *MatchBoolPrefixQuery { + return &MatchBoolPrefixQuery{name: name, queryText: queryText} +} + +// 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 *MatchBoolPrefixQuery) Analyzer(analyzer string) *MatchBoolPrefixQuery { + q.analyzer = analyzer + return q +} + +// MinimumShouldMatch sets the optional minimumShouldMatch value to apply to the query. +func (q *MatchBoolPrefixQuery) MinimumShouldMatch(minimumShouldMatch string) *MatchBoolPrefixQuery { + q.minimumShouldMatch = minimumShouldMatch + return q +} + +// Operator sets the operator to use when using a boolean query. +// Can be "AND" or "OR" (default). +func (q *MatchBoolPrefixQuery) Operator(operator string) *MatchBoolPrefixQuery { + q.operator = operator + return q +} + +// Fuzziness sets the edit distance for fuzzy queries. Default is "AUTO". +func (q *MatchBoolPrefixQuery) Fuzziness(fuzziness string) *MatchBoolPrefixQuery { + q.fuzziness = fuzziness + return q +} + +// PrefixLength is the number of beginning characters left unchanged for fuzzy matching. Defaults to 0. +func (q *MatchBoolPrefixQuery) PrefixLength(prefixLength int) *MatchBoolPrefixQuery { + q.prefixLength = &prefixLength + return q +} + +// MaxExpansions sets the number of term expansions to use. +func (q *MatchBoolPrefixQuery) MaxExpansions(n int) *MatchBoolPrefixQuery { + q.maxExpansions = &n + return q +} + +// FuzzyTranspositions if true, edits for fuzzy matching include transpositions of two adjacent +// characters (ab → ba). Defaults to true. +func (q *MatchBoolPrefixQuery) FuzzyTranspositions(fuzzyTranspositions bool) *MatchBoolPrefixQuery { + q.fuzzyTranspositions = &fuzzyTranspositions + return q +} + +// FuzzyRewrite sets the fuzzy_rewrite parameter controlling how the +// fuzzy query will get rewritten. +func (q *MatchBoolPrefixQuery) FuzzyRewrite(fuzzyRewrite string) *MatchBoolPrefixQuery { + q.fuzzyRewrite = fuzzyRewrite + return q +} + +// Boost sets the boost to apply to this query. +func (q *MatchBoolPrefixQuery) Boost(boost float64) *MatchBoolPrefixQuery { + q.boost = &boost + return q +} + +// Source returns JSON for the function score query. +func (q *MatchBoolPrefixQuery) Source() (interface{}, error) { + source := make(map[string]interface{}) + + match := make(map[string]interface{}) + source["match_bool_prefix"] = match + + query := make(map[string]interface{}) + match[q.name] = query + + query["query"] = q.queryText + + if q.analyzer != "" { + query["analyzer"] = q.analyzer + } + if q.minimumShouldMatch != "" { + query["minimum_should_match"] = q.minimumShouldMatch + } + if q.operator != "" { + query["operator"] = q.operator + } + 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.fuzzyTranspositions != nil { + query["fuzzy_transpositions"] = *q.fuzzyTranspositions + } + if q.fuzzyRewrite != "" { + query["fuzzy_rewrite"] = q.fuzzyRewrite + } + if q.boost != nil { + query["boost"] = *q.boost + } + + return source, nil +} diff --git a/vendor/github.com/olivere/elastic/v7/search_queries_prefix.go b/vendor/github.com/olivere/elastic/v7/search_queries_prefix.go index 8178aac3f4..5e9813e197 100644 --- a/vendor/github.com/olivere/elastic/v7/search_queries_prefix.go +++ b/vendor/github.com/olivere/elastic/v7/search_queries_prefix.go @@ -10,11 +10,12 @@ package elastic // For more details, see // https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-prefix-query.html type PrefixQuery struct { - name string - prefix string - boost *float64 - rewrite string - queryName string + name string + prefix string + boost *float64 + rewrite string + caseInsensitive *bool + queryName string } // NewPrefixQuery creates and initializes a new PrefixQuery. @@ -33,6 +34,11 @@ func (q *PrefixQuery) Rewrite(rewrite string) *PrefixQuery { return q } +func (q *PrefixQuery) CaseInsensitive(caseInsensitive bool) *PrefixQuery { + q.caseInsensitive = &caseInsensitive + 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 { @@ -57,6 +63,9 @@ func (q *PrefixQuery) Source() (interface{}, error) { if q.rewrite != "" { subQuery["rewrite"] = q.rewrite } + if q.caseInsensitive != nil { + subQuery["case_insensitive"] = *q.caseInsensitive + } if q.queryName != "" { subQuery["_name"] = q.queryName } diff --git a/vendor/github.com/olivere/elastic/v7/search_queries_regexp.go b/vendor/github.com/olivere/elastic/v7/search_queries_regexp.go index 25a0c3d028..fd8370bd34 100644 --- a/vendor/github.com/olivere/elastic/v7/search_queries_regexp.go +++ b/vendor/github.com/olivere/elastic/v7/search_queries_regexp.go @@ -14,6 +14,7 @@ type RegexpQuery struct { flags string boost *float64 rewrite string + caseInsensitive *bool queryName string maxDeterminizedStates *int } @@ -46,6 +47,11 @@ func (q *RegexpQuery) Rewrite(rewrite string) *RegexpQuery { return q } +func (q *RegexpQuery) CaseInsensitive(caseInsensitive bool) *RegexpQuery { + q.caseInsensitive = &caseInsensitive + 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 { @@ -73,6 +79,9 @@ func (q *RegexpQuery) Source() (interface{}, error) { if q.rewrite != "" { x["rewrite"] = q.rewrite } + if q.caseInsensitive != nil { + x["case_insensitive"] = *q.caseInsensitive + } if q.queryName != "" { x["name"] = q.queryName } diff --git a/vendor/github.com/olivere/elastic/v7/search_queries_term.go b/vendor/github.com/olivere/elastic/v7/search_queries_term.go index 832e67e5e2..7d9c89dc68 100644 --- a/vendor/github.com/olivere/elastic/v7/search_queries_term.go +++ b/vendor/github.com/olivere/elastic/v7/search_queries_term.go @@ -10,10 +10,11 @@ package elastic // For details, see // https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-term-query.html type TermQuery struct { - name string - value interface{} - boost *float64 - queryName string + name string + value interface{} + boost *float64 + caseInsensitive *bool + queryName string } // NewTermQuery creates and initializes a new TermQuery. @@ -27,6 +28,11 @@ func (q *TermQuery) Boost(boost float64) *TermQuery { return q } +func (q *TermQuery) CaseInsensitive(caseInsensitive bool) *TermQuery { + q.caseInsensitive = &caseInsensitive + 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 { @@ -41,7 +47,7 @@ func (q *TermQuery) Source() (interface{}, error) { tq := make(map[string]interface{}) source["term"] = tq - if q.boost == nil && q.queryName == "" { + if q.boost == nil && q.caseInsensitive == nil && q.queryName == "" { tq[q.name] = q.value } else { subQ := make(map[string]interface{}) @@ -49,6 +55,9 @@ func (q *TermQuery) Source() (interface{}, error) { if q.boost != nil { subQ["boost"] = *q.boost } + if q.caseInsensitive != nil { + subQ["case_insensitive"] = *q.caseInsensitive + } if q.queryName != "" { subQ["_name"] = q.queryName } diff --git a/vendor/github.com/olivere/elastic/v7/search_queries_wildcard.go b/vendor/github.com/olivere/elastic/v7/search_queries_wildcard.go index cbb26e9905..4cc1a8dbca 100644 --- a/vendor/github.com/olivere/elastic/v7/search_queries_wildcard.go +++ b/vendor/github.com/olivere/elastic/v7/search_queries_wildcard.go @@ -20,7 +20,7 @@ type WildcardQuery struct { boost *float64 rewrite string queryName string - caseInsensitive bool + caseInsensitive *bool } // NewWildcardQuery creates and initializes a new WildcardQuery. @@ -50,7 +50,7 @@ func (q *WildcardQuery) QueryName(queryName string) *WildcardQuery { // CaseInsensitive sets case insensitive matching of this query. func (q *WildcardQuery) CaseInsensitive(caseInsensitive bool) *WildcardQuery { - q.caseInsensitive = caseInsensitive + q.caseInsensitive = &caseInsensitive return q } @@ -84,8 +84,8 @@ func (q *WildcardQuery) Source() (interface{}, error) { if q.queryName != "" { wq["_name"] = q.queryName } - if q.caseInsensitive { - wq["case_insensitive"] = true + if q.caseInsensitive != nil { + wq["case_insensitive"] = *q.caseInsensitive } return source, nil diff --git a/vendor/github.com/olivere/elastic/v7/tasks_list.go b/vendor/github.com/olivere/elastic/v7/tasks_list.go index dc1ad495cf..09aa6b6139 100644 --- a/vendor/github.com/olivere/elastic/v7/tasks_list.go +++ b/vendor/github.com/olivere/elastic/v7/tasks_list.go @@ -239,11 +239,6 @@ type TaskOperationFailure struct { 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"` diff --git a/vendor/github.com/pierrec/lz4/v4/internal/lz4block/block.go b/vendor/github.com/pierrec/lz4/v4/internal/lz4block/block.go index 88319105a6..b64d57d513 100644 --- a/vendor/github.com/pierrec/lz4/v4/internal/lz4block/block.go +++ b/vendor/github.com/pierrec/lz4/v4/internal/lz4block/block.go @@ -203,10 +203,13 @@ func (c *Compressor) CompressBlock(src, dst []byte) (int, error) { dst[di] |= 0xF0 di++ l := lLen - 0xF - for ; l >= 0xFF; l -= 0xFF { + for ; l >= 0xFF && di < len(dst); l -= 0xFF { dst[di] = 0xFF di++ } + if di >= len(dst) { + return 0, lz4errors.ErrInvalidSourceShortBuffer + } dst[di] = byte(l) } di++ diff --git a/vendor/github.com/sirupsen/logrus/.gitignore b/vendor/github.com/sirupsen/logrus/.gitignore new file mode 100644 index 0000000000..1fb13abebe --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/.gitignore @@ -0,0 +1,4 @@ +logrus +vendor + +.idea/ diff --git a/vendor/github.com/sirupsen/logrus/.golangci.yml b/vendor/github.com/sirupsen/logrus/.golangci.yml new file mode 100644 index 0000000000..65dc285037 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/.golangci.yml @@ -0,0 +1,40 @@ +run: + # do not run on test files yet + tests: false + +# all available settings of specific linters +linters-settings: + errcheck: + # report about not checking of errors in type assetions: `a := b.(MyStruct)`; + # default is false: such cases aren't reported by default. + check-type-assertions: false + + # report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`; + # default is false: such cases aren't reported by default. + check-blank: false + + lll: + line-length: 100 + tab-width: 4 + + prealloc: + simple: false + range-loops: false + for-loops: false + + whitespace: + multi-if: false # Enforces newlines (or comments) after every multi-line if statement + multi-func: false # Enforces newlines (or comments) after every multi-line function signature + +linters: + enable: + - megacheck + - govet + disable: + - maligned + - prealloc + disable-all: false + presets: + - bugs + - unused + fast: false diff --git a/vendor/github.com/sirupsen/logrus/.travis.yml b/vendor/github.com/sirupsen/logrus/.travis.yml new file mode 100644 index 0000000000..c1dbd5a3a3 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/.travis.yml @@ -0,0 +1,15 @@ +language: go +go_import_path: github.com/sirupsen/logrus +git: + depth: 1 +env: + - GO111MODULE=on +go: 1.15.x +os: linux +install: + - ./travis/install.sh +script: + - cd ci + - go run mage.go -v -w ../ crossBuild + - go run mage.go -v -w ../ lint + - go run mage.go -v -w ../ test diff --git a/vendor/github.com/sirupsen/logrus/CHANGELOG.md b/vendor/github.com/sirupsen/logrus/CHANGELOG.md new file mode 100644 index 0000000000..7567f61289 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/CHANGELOG.md @@ -0,0 +1,259 @@ +# 1.8.1 +Code quality: + * move magefile in its own subdir/submodule to remove magefile dependency on logrus consumer + * improve timestamp format documentation + +Fixes: + * fix race condition on logger hooks + + +# 1.8.0 + +Correct versioning number replacing v1.7.1. + +# 1.7.1 + +Beware this release has introduced a new public API and its semver is therefore incorrect. + +Code quality: + * use go 1.15 in travis + * use magefile as task runner + +Fixes: + * small fixes about new go 1.13 error formatting system + * Fix for long time race condiction with mutating data hooks + +Features: + * build support for zos + +# 1.7.0 +Fixes: + * the dependency toward a windows terminal library has been removed + +Features: + * a new buffer pool management API has been added + * a set of `<LogLevel>Fn()` functions have been added + +# 1.6.0 +Fixes: + * end of line cleanup + * revert the entry concurrency bug fix whic leads to deadlock under some circumstances + * update dependency on go-windows-terminal-sequences to fix a crash with go 1.14 + +Features: + * add an option to the `TextFormatter` to completely disable fields quoting + +# 1.5.0 +Code quality: + * add golangci linter run on travis + +Fixes: + * add mutex for hooks concurrent access on `Entry` data + * caller function field for go1.14 + * fix build issue for gopherjs target + +Feature: + * add an hooks/writer sub-package whose goal is to split output on different stream depending on the trace level + * add a `DisableHTMLEscape` option in the `JSONFormatter` + * add `ForceQuote` and `PadLevelText` options in the `TextFormatter` + +# 1.4.2 + * Fixes build break for plan9, nacl, solaris +# 1.4.1 +This new release introduces: + * Enhance TextFormatter to not print caller information when they are empty (#944) + * Remove dependency on golang.org/x/crypto (#932, #943) + +Fixes: + * Fix Entry.WithContext method to return a copy of the initial entry (#941) + +# 1.4.0 +This new release introduces: + * Add `DeferExitHandler`, similar to `RegisterExitHandler` but prepending the handler to the list of handlers (semantically like `defer`) (#848). + * Add `CallerPrettyfier` to `JSONFormatter` and `TextFormatter` (#909, #911) + * Add `Entry.WithContext()` and `Entry.Context`, to set a context on entries to be used e.g. in hooks (#919). + +Fixes: + * Fix wrong method calls `Logger.Print` and `Logger.Warningln` (#893). + * Update `Entry.Logf` to not do string formatting unless the log level is enabled (#903) + * Fix infinite recursion on unknown `Level.String()` (#907) + * Fix race condition in `getCaller` (#916). + + +# 1.3.0 +This new release introduces: + * Log, Logf, Logln functions for Logger and Entry that take a Level + +Fixes: + * Building prometheus node_exporter on AIX (#840) + * Race condition in TextFormatter (#468) + * Travis CI import path (#868) + * Remove coloured output on Windows (#862) + * Pointer to func as field in JSONFormatter (#870) + * Properly marshal Levels (#873) + +# 1.2.0 +This new release introduces: + * A new method `SetReportCaller` in the `Logger` to enable the file, line and calling function from which the trace has been issued + * A new trace level named `Trace` whose level is below `Debug` + * A configurable exit function to be called upon a Fatal trace + * The `Level` object now implements `encoding.TextUnmarshaler` interface + +# 1.1.1 +This is a bug fix release. + * fix the build break on Solaris + * don't drop a whole trace in JSONFormatter when a field param is a function pointer which can not be serialized + +# 1.1.0 +This new release introduces: + * several fixes: + * a fix for a race condition on entry formatting + * proper cleanup of previously used entries before putting them back in the pool + * the extra new line at the end of message in text formatter has been removed + * a new global public API to check if a level is activated: IsLevelEnabled + * the following methods have been added to the Logger object + * IsLevelEnabled + * SetFormatter + * SetOutput + * ReplaceHooks + * introduction of go module + * an indent configuration for the json formatter + * output colour support for windows + * the field sort function is now configurable for text formatter + * the CLICOLOR and CLICOLOR\_FORCE environment variable support in text formater + +# 1.0.6 + +This new release introduces: + * a new api WithTime which allows to easily force the time of the log entry + which is mostly useful for logger wrapper + * a fix reverting the immutability of the entry given as parameter to the hooks + a new configuration field of the json formatter in order to put all the fields + in a nested dictionnary + * a new SetOutput method in the Logger + * a new configuration of the textformatter to configure the name of the default keys + * a new configuration of the text formatter to disable the level truncation + +# 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/sirupsen/logrus/LICENSE b/vendor/github.com/sirupsen/logrus/LICENSE new file mode 100644 index 0000000000..f090cb42f3 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +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 +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/sirupsen/logrus/README.md b/vendor/github.com/sirupsen/logrus/README.md new file mode 100644 index 0000000000..5152b6aa40 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/README.md @@ -0,0 +1,513 @@ +# Logrus <img src="http://i.imgur.com/hTeVwmJ.png" width="40" height="40" alt=":walrus:" class="emoji" title=":walrus:"/> [![Build Status](https://travis-ci.org/sirupsen/logrus.svg?branch=master)](https://travis-ci.org/sirupsen/logrus) [![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. + +**Logrus is in maintenance-mode.** We will not be introducing new features. It's +simply too hard to do in a way that won't break many people's projects, which is +the last thing you want from your Logging library (again...). + +This does not mean Logrus is dead. Logrus will continue to be maintained for +security, (backwards compatible) bug fixes, and performance (where we are +limited by the interface). + +I believe Logrus' biggest contribution is to have played a part in today's +widespread use of structured logging in Golang. There doesn't seem to be a +reason to do a major, breaking iteration into Logrus V2, since the fantastic Go +community has built those independently. Many fantastic alternatives have sprung +up. Logrus would look like those, had it been re-designed with what we know +about structured logging in Go today. Check out, for example, +[Zerolog][zerolog], [Zap][zap], and [Apex][apex]. + +[zerolog]: https://github.com/rs/zerolog +[zap]: https://github.com/uber-go/zap +[apex]: https://github.com/apex/log + +**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). + +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 +``` +To ensure this behaviour even if a TTY is attached, set your formatter as follows: + +```go + log.SetFormatter(&log.TextFormatter{ + DisableColors: true, + FullTimestamp: true, + }) +``` + +#### Logging Method Name + +If you wish to add the calling method as a field, instruct the logger via: +```go +log.SetReportCaller(true) +``` +This adds the caller as 'method' like so: + +```json +{"animal":"penguin","level":"fatal","method":"github.com/sirupsen/arcticcreatures.migrate","msg":"a penguin swims by", +"time":"2014-03-10 19:57:38.562543129 -0400 EDT"} +``` + +```text +time="2015-03-26T01:27:38-04:00" level=fatal method=github.com/sirupsen/arcticcreatures.migrate msg="a penguin swims by" animal=penguin +``` +Note that this does add measurable overhead - the cost will depend on the version of Go, but is +between 20 and 40% in recent tests with 1.6 and 1.7. You can validate this in your +environment via benchmarks: +``` +go test -bench=.*CallerTracing +``` + + +#### 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|os.O_APPEND, 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). + +A list of currently known service hooks can be found in this wiki [page](https://github.com/sirupsen/logrus/wiki/Hooks) + + +#### Level logging + +Logrus has seven logging levels: Trace, Debug, Info, Warning, Error, Fatal and Panic. + +```go +log.Trace("Something very low level.") +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). + * When colors are enabled, levels are truncated to 4 characters by default. To disable + truncation set the `DisableLevelTruncation` field to `true`. + * When outputting to a TTY, it's often helpful to visually scan down a column where all the levels are the same width. Setting the `PadLevelText` field to `true` enables this behavior, by adding padding to the level text. + * 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. +* [`GELF`](https://github.com/fabienm/go-logrus-formatters). Formats entries so they comply to Graylog's [GELF 1.1 specification](http://docs.graylog.org/en/2.4/pages/gelf.html). +* [`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 Power of Zalgo. +* [`nested-logrus-formatter`](https://github.com/antonfisher/nested-logrus-formatter). Converts logrus fields to a nested structure. +* [`powerful-logrus-formatter`](https://github.com/zput/zxcTool). get fileName, log's line number and the latest function's name when print log; Sava log to files. +* [`caption-json-formatter`](https://github.com/nolleh/caption_json_formatter). logrus's message json formatter with human-readable caption added. + +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, %w", 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 be generated with different configs in different environments.| +|[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 adds 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 an `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 a mutex for concurrent writes. The mutex is held 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 an os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allows 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 0000000000..8fd189e1cc --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/alt_exit.go @@ -0,0 +1,76 @@ +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 appends a Logrus Exit handler to the list of handlers, +// 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) +} + +// DeferExitHandler prepends a Logrus Exit handler to the list of handlers, +// 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 DeferExitHandler(handler func()) { + handlers = append([]func(){handler}, handlers...) +} diff --git a/vendor/github.com/sirupsen/logrus/appveyor.yml b/vendor/github.com/sirupsen/logrus/appveyor.yml new file mode 100644 index 0000000000..df9d65c3a5 --- /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/buffer_pool.go b/vendor/github.com/sirupsen/logrus/buffer_pool.go new file mode 100644 index 0000000000..4545dec07d --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/buffer_pool.go @@ -0,0 +1,52 @@ +package logrus + +import ( + "bytes" + "sync" +) + +var ( + bufferPool BufferPool +) + +type BufferPool interface { + Put(*bytes.Buffer) + Get() *bytes.Buffer +} + +type defaultPool struct { + pool *sync.Pool +} + +func (p *defaultPool) Put(buf *bytes.Buffer) { + p.pool.Put(buf) +} + +func (p *defaultPool) Get() *bytes.Buffer { + return p.pool.Get().(*bytes.Buffer) +} + +func getBuffer() *bytes.Buffer { + return bufferPool.Get() +} + +func putBuffer(buf *bytes.Buffer) { + buf.Reset() + bufferPool.Put(buf) +} + +// SetBufferPool allows to replace the default logrus buffer pool +// to better meets the specific needs of an application. +func SetBufferPool(bp BufferPool) { + bufferPool = bp +} + +func init() { + SetBufferPool(&defaultPool{ + pool: &sync.Pool{ + New: func() interface{} { + return new(bytes.Buffer) + }, + }, + }) +} diff --git a/vendor/github.com/sirupsen/logrus/doc.go b/vendor/github.com/sirupsen/logrus/doc.go new file mode 100644 index 0000000000..da67aba06d --- /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 0000000000..07a1e5fa72 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/entry.go @@ -0,0 +1,431 @@ +package logrus + +import ( + "bytes" + "context" + "fmt" + "os" + "reflect" + "runtime" + "strings" + "sync" + "time" +) + +var ( + + // qualified package name, cached at first use + logrusPackage string + + // Positions in the call stack when tracing to report the calling method + minimumCallerDepth int + + // Used for caller information initialisation + callerInitOnce sync.Once +) + +const ( + maximumCallerDepth int = 25 + knownLogrusFrames int = 4 +) + +func init() { + // start at the bottom of the stack before the package-name cache is primed + minimumCallerDepth = 1 +} + +// 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 Trace, 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: Trace, 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 + + // Calling method, with package name + Caller *runtime.Frame + + // Message passed to Trace, Debug, Info, Warn, Error, Fatal or Panic + Message string + + // When formatter is called in entry.log(), a Buffer may be set to entry + Buffer *bytes.Buffer + + // Contains the context set by the user. Useful for hook processing etc. + Context context.Context + + // err may contain a field formatting error + err string +} + +func NewEntry(logger *Logger) *Entry { + return &Entry{ + Logger: logger, + // Default is three fields, plus one optional. Give a little extra room. + Data: make(Fields, 6), + } +} + +func (entry *Entry) Dup() *Entry { + data := make(Fields, len(entry.Data)) + for k, v := range entry.Data { + data[k] = v + } + return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time, Context: entry.Context, err: entry.err} +} + +// Returns the bytes representation of this entry from the formatter. +func (entry *Entry) Bytes() ([]byte, error) { + return entry.Logger.Formatter.Format(entry) +} + +// Returns the string representation from the reader and ultimately the +// formatter. +func (entry *Entry) String() (string, error) { + serialized, err := entry.Bytes() + 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 context to the Entry. +func (entry *Entry) WithContext(ctx context.Context) *Entry { + dataCopy := make(Fields, len(entry.Data)) + for k, v := range entry.Data { + dataCopy[k] = v + } + return &Entry{Logger: entry.Logger, Data: dataCopy, Time: entry.Time, err: entry.err, Context: ctx} +} + +// 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 + } + fieldErr := entry.err + for k, v := range fields { + isErrField := false + if t := reflect.TypeOf(v); t != nil { + switch { + case t.Kind() == reflect.Func, t.Kind() == reflect.Ptr && t.Elem().Kind() == reflect.Func: + isErrField = true + } + } + if isErrField { + tmp := fmt.Sprintf("can not add field %q", k) + if fieldErr != "" { + fieldErr = entry.err + ", " + tmp + } else { + fieldErr = tmp + } + } else { + data[k] = v + } + } + return &Entry{Logger: entry.Logger, Data: data, Time: entry.Time, err: fieldErr, Context: entry.Context} +} + +// Overrides the time of the Entry. +func (entry *Entry) WithTime(t time.Time) *Entry { + dataCopy := make(Fields, len(entry.Data)) + for k, v := range entry.Data { + dataCopy[k] = v + } + return &Entry{Logger: entry.Logger, Data: dataCopy, Time: t, err: entry.err, Context: entry.Context} +} + +// getPackageName reduces a fully qualified function name to the package name +// There really ought to be to be a better way... +func getPackageName(f string) string { + for { + lastPeriod := strings.LastIndex(f, ".") + lastSlash := strings.LastIndex(f, "/") + if lastPeriod > lastSlash { + f = f[:lastPeriod] + } else { + break + } + } + + return f +} + +// getCaller retrieves the name of the first non-logrus calling function +func getCaller() *runtime.Frame { + // cache this package's fully-qualified name + callerInitOnce.Do(func() { + pcs := make([]uintptr, maximumCallerDepth) + _ = runtime.Callers(0, pcs) + + // dynamic get the package name and the minimum caller depth + for i := 0; i < maximumCallerDepth; i++ { + funcName := runtime.FuncForPC(pcs[i]).Name() + if strings.Contains(funcName, "getCaller") { + logrusPackage = getPackageName(funcName) + break + } + } + + minimumCallerDepth = knownLogrusFrames + }) + + // Restrict the lookback frames to avoid runaway lookups + pcs := make([]uintptr, maximumCallerDepth) + depth := runtime.Callers(minimumCallerDepth, pcs) + frames := runtime.CallersFrames(pcs[:depth]) + + for f, again := frames.Next(); again; f, again = frames.Next() { + pkg := getPackageName(f.Function) + + // If the caller isn't part of this package, we're done + if pkg != logrusPackage { + return &f //nolint:scopelint + } + } + + // if we got here, we failed to find the caller's context + return nil +} + +func (entry Entry) HasCaller() (has bool) { + return entry.Logger != nil && + entry.Logger.ReportCaller && + entry.Caller != nil +} + +func (entry *Entry) log(level Level, msg string) { + var buffer *bytes.Buffer + + newEntry := entry.Dup() + + if newEntry.Time.IsZero() { + newEntry.Time = time.Now() + } + + newEntry.Level = level + newEntry.Message = msg + + newEntry.Logger.mu.Lock() + reportCaller := newEntry.Logger.ReportCaller + newEntry.Logger.mu.Unlock() + + if reportCaller { + newEntry.Caller = getCaller() + } + + newEntry.fireHooks() + + buffer = getBuffer() + defer func() { + newEntry.Buffer = nil + putBuffer(buffer) + }() + buffer.Reset() + newEntry.Buffer = buffer + + newEntry.write() + + newEntry.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(newEntry) + } +} + +func (entry *Entry) fireHooks() { + var tmpHooks LevelHooks + entry.Logger.mu.Lock() + tmpHooks = make(LevelHooks, len(entry.Logger.Hooks)) + for k, v := range entry.Logger.Hooks { + tmpHooks[k] = v + } + entry.Logger.mu.Unlock() + + err := tmpHooks.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) + if err != nil { + fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err) + return + } + entry.Logger.mu.Lock() + defer entry.Logger.mu.Unlock() + if _, err := entry.Logger.Out.Write(serialized); err != nil { + fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) + } +} + +func (entry *Entry) Log(level Level, args ...interface{}) { + if entry.Logger.IsLevelEnabled(level) { + entry.log(level, fmt.Sprint(args...)) + } +} + +func (entry *Entry) Trace(args ...interface{}) { + entry.Log(TraceLevel, args...) +} + +func (entry *Entry) Debug(args ...interface{}) { + entry.Log(DebugLevel, args...) +} + +func (entry *Entry) Print(args ...interface{}) { + entry.Info(args...) +} + +func (entry *Entry) Info(args ...interface{}) { + entry.Log(InfoLevel, args...) +} + +func (entry *Entry) Warn(args ...interface{}) { + entry.Log(WarnLevel, args...) +} + +func (entry *Entry) Warning(args ...interface{}) { + entry.Warn(args...) +} + +func (entry *Entry) Error(args ...interface{}) { + entry.Log(ErrorLevel, args...) +} + +func (entry *Entry) Fatal(args ...interface{}) { + entry.Log(FatalLevel, args...) + entry.Logger.Exit(1) +} + +func (entry *Entry) Panic(args ...interface{}) { + entry.Log(PanicLevel, args...) +} + +// Entry Printf family functions + +func (entry *Entry) Logf(level Level, format string, args ...interface{}) { + if entry.Logger.IsLevelEnabled(level) { + entry.Log(level, fmt.Sprintf(format, args...)) + } +} + +func (entry *Entry) Tracef(format string, args ...interface{}) { + entry.Logf(TraceLevel, format, args...) +} + +func (entry *Entry) Debugf(format string, args ...interface{}) { + entry.Logf(DebugLevel, format, args...) +} + +func (entry *Entry) Infof(format string, args ...interface{}) { + entry.Logf(InfoLevel, format, args...) +} + +func (entry *Entry) Printf(format string, args ...interface{}) { + entry.Infof(format, args...) +} + +func (entry *Entry) Warnf(format string, args ...interface{}) { + entry.Logf(WarnLevel, format, args...) +} + +func (entry *Entry) Warningf(format string, args ...interface{}) { + entry.Warnf(format, args...) +} + +func (entry *Entry) Errorf(format string, args ...interface{}) { + entry.Logf(ErrorLevel, format, args...) +} + +func (entry *Entry) Fatalf(format string, args ...interface{}) { + entry.Logf(FatalLevel, format, args...) + entry.Logger.Exit(1) +} + +func (entry *Entry) Panicf(format string, args ...interface{}) { + entry.Logf(PanicLevel, format, args...) +} + +// Entry Println family functions + +func (entry *Entry) Logln(level Level, args ...interface{}) { + if entry.Logger.IsLevelEnabled(level) { + entry.Log(level, entry.sprintlnn(args...)) + } +} + +func (entry *Entry) Traceln(args ...interface{}) { + entry.Logln(TraceLevel, args...) +} + +func (entry *Entry) Debugln(args ...interface{}) { + entry.Logln(DebugLevel, args...) +} + +func (entry *Entry) Infoln(args ...interface{}) { + entry.Logln(InfoLevel, args...) +} + +func (entry *Entry) Println(args ...interface{}) { + entry.Infoln(args...) +} + +func (entry *Entry) Warnln(args ...interface{}) { + entry.Logln(WarnLevel, args...) +} + +func (entry *Entry) Warningln(args ...interface{}) { + entry.Warnln(args...) +} + +func (entry *Entry) Errorln(args ...interface{}) { + entry.Logln(ErrorLevel, args...) +} + +func (entry *Entry) Fatalln(args ...interface{}) { + entry.Logln(FatalLevel, args...) + entry.Logger.Exit(1) +} + +func (entry *Entry) Panicln(args ...interface{}) { + entry.Logln(PanicLevel, 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 0000000000..017c30ce67 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/exported.go @@ -0,0 +1,270 @@ +package logrus + +import ( + "context" + "io" + "time" +) + +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.SetOutput(out) +} + +// SetFormatter sets the standard logger formatter. +func SetFormatter(formatter Formatter) { + std.SetFormatter(formatter) +} + +// SetReportCaller sets whether the standard logger will include the calling +// method as a field. +func SetReportCaller(include bool) { + std.SetReportCaller(include) +} + +// SetLevel sets the standard logger level. +func SetLevel(level Level) { + std.SetLevel(level) +} + +// GetLevel returns the standard logger level. +func GetLevel() Level { + return std.GetLevel() +} + +// IsLevelEnabled checks if the log level of the standard logger is greater than the level param +func IsLevelEnabled(level Level) bool { + return std.IsLevelEnabled(level) +} + +// AddHook adds a hook to the standard logger hooks. +func AddHook(hook Hook) { + std.AddHook(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) +} + +// WithContext creates an entry from the standard logger and adds a context to it. +func WithContext(ctx context.Context) *Entry { + return std.WithContext(ctx) +} + +// 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) +} + +// WithTime creates an entry from the standard logger and overrides the time of +// logs generated with it. +// +// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal +// or Panic on the Entry it returns. +func WithTime(t time.Time) *Entry { + return std.WithTime(t) +} + +// Trace logs a message at level Trace on the standard logger. +func Trace(args ...interface{}) { + std.Trace(args...) +} + +// 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 then the process will exit with status set to 1. +func Fatal(args ...interface{}) { + std.Fatal(args...) +} + +// TraceFn logs a message from a func at level Trace on the standard logger. +func TraceFn(fn LogFunction) { + std.TraceFn(fn) +} + +// DebugFn logs a message from a func at level Debug on the standard logger. +func DebugFn(fn LogFunction) { + std.DebugFn(fn) +} + +// PrintFn logs a message from a func at level Info on the standard logger. +func PrintFn(fn LogFunction) { + std.PrintFn(fn) +} + +// InfoFn logs a message from a func at level Info on the standard logger. +func InfoFn(fn LogFunction) { + std.InfoFn(fn) +} + +// WarnFn logs a message from a func at level Warn on the standard logger. +func WarnFn(fn LogFunction) { + std.WarnFn(fn) +} + +// WarningFn logs a message from a func at level Warn on the standard logger. +func WarningFn(fn LogFunction) { + std.WarningFn(fn) +} + +// ErrorFn logs a message from a func at level Error on the standard logger. +func ErrorFn(fn LogFunction) { + std.ErrorFn(fn) +} + +// PanicFn logs a message from a func at level Panic on the standard logger. +func PanicFn(fn LogFunction) { + std.PanicFn(fn) +} + +// FatalFn logs a message from a func at level Fatal on the standard logger then the process will exit with status set to 1. +func FatalFn(fn LogFunction) { + std.FatalFn(fn) +} + +// Tracef logs a message at level Trace on the standard logger. +func Tracef(format string, args ...interface{}) { + std.Tracef(format, 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 then the process will exit with status set to 1. +func Fatalf(format string, args ...interface{}) { + std.Fatalf(format, args...) +} + +// Traceln logs a message at level Trace on the standard logger. +func Traceln(args ...interface{}) { + std.Traceln(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 then the process will exit with status set to 1. +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 0000000000..408883773e --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/formatter.go @@ -0,0 +1,78 @@ +package logrus + +import "time" + +// Default key names for the default fields +const ( + defaultTimestampFormat = time.RFC3339 + FieldKeyMsg = "msg" + FieldKeyLevel = "level" + FieldKeyTime = "time" + FieldKeyLogrusError = "logrus_error" + FieldKeyFunc = "func" + FieldKeyFile = "file" +) + +// 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`, `func` 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, fieldMap FieldMap, reportCaller bool) { + timeKey := fieldMap.resolve(FieldKeyTime) + if t, ok := data[timeKey]; ok { + data["fields."+timeKey] = t + delete(data, timeKey) + } + + msgKey := fieldMap.resolve(FieldKeyMsg) + if m, ok := data[msgKey]; ok { + data["fields."+msgKey] = m + delete(data, msgKey) + } + + levelKey := fieldMap.resolve(FieldKeyLevel) + if l, ok := data[levelKey]; ok { + data["fields."+levelKey] = l + delete(data, levelKey) + } + + logrusErrKey := fieldMap.resolve(FieldKeyLogrusError) + if l, ok := data[logrusErrKey]; ok { + data["fields."+logrusErrKey] = l + delete(data, logrusErrKey) + } + + // If reportCaller is not set, 'func' will not conflict. + if reportCaller { + funcKey := fieldMap.resolve(FieldKeyFunc) + if l, ok := data[funcKey]; ok { + data["fields."+funcKey] = l + } + fileKey := fieldMap.resolve(FieldKeyFile) + if l, ok := data[fileKey]; ok { + data["fields."+fileKey] = l + } + } +} diff --git a/vendor/github.com/sirupsen/logrus/go.mod b/vendor/github.com/sirupsen/logrus/go.mod new file mode 100644 index 0000000000..b3919d5eab --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/go.mod @@ -0,0 +1,10 @@ +module github.com/sirupsen/logrus + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/stretchr/testify v1.2.2 + golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 +) + +go 1.13 diff --git a/vendor/github.com/sirupsen/logrus/go.sum b/vendor/github.com/sirupsen/logrus/go.sum new file mode 100644 index 0000000000..694c18b845 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/go.sum @@ -0,0 +1,8 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037 h1:YyJpGZS1sBuBCzLAR1VEpK193GlqGZbnPFnPV/5Rsb4= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= diff --git a/vendor/github.com/sirupsen/logrus/hooks.go b/vendor/github.com/sirupsen/logrus/hooks.go new file mode 100644 index 0000000000..3f151cdc39 --- /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 0000000000..c96dc5636b --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/json_formatter.go @@ -0,0 +1,128 @@ +package logrus + +import ( + "bytes" + "encoding/json" + "fmt" + "runtime" +) + +type fieldKey string + +// FieldMap allows customization of the key names for default fields. +type FieldMap map[fieldKey]string + +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. + // The format to use is the same than for time.Format or time.Parse from the standard + // library. + // The standard Library already provides a set of predefined format. + TimestampFormat string + + // DisableTimestamp allows disabling automatic timestamps in output + DisableTimestamp bool + + // DisableHTMLEscape allows disabling html escaping in output + DisableHTMLEscape bool + + // DataKey allows users to put all the log entry parameters into a nested dictionary at a given key. + DataKey string + + // 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", + // FieldKeyFunc: "@caller", + // }, + // } + FieldMap FieldMap + + // CallerPrettyfier can be set by the user to modify the content + // of the function and file keys in the json data when ReportCaller is + // activated. If any of the returned value is the empty string the + // corresponding key will be removed from json fields. + CallerPrettyfier func(*runtime.Frame) (function string, file string) + + // PrettyPrint will indent all json logs + PrettyPrint bool +} + +// Format renders a single log entry +func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) { + data := make(Fields, len(entry.Data)+4) + 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 + } + } + + if f.DataKey != "" { + newData := make(Fields, 4) + newData[f.DataKey] = data + data = newData + } + + prefixFieldClashes(data, f.FieldMap, entry.HasCaller()) + + timestampFormat := f.TimestampFormat + if timestampFormat == "" { + timestampFormat = defaultTimestampFormat + } + + if entry.err != "" { + data[f.FieldMap.resolve(FieldKeyLogrusError)] = entry.err + } + 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() + if entry.HasCaller() { + funcVal := entry.Caller.Function + fileVal := fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) + if f.CallerPrettyfier != nil { + funcVal, fileVal = f.CallerPrettyfier(entry.Caller) + } + if funcVal != "" { + data[f.FieldMap.resolve(FieldKeyFunc)] = funcVal + } + if fileVal != "" { + data[f.FieldMap.resolve(FieldKeyFile)] = fileVal + } + } + + var b *bytes.Buffer + if entry.Buffer != nil { + b = entry.Buffer + } else { + b = &bytes.Buffer{} + } + + encoder := json.NewEncoder(b) + encoder.SetEscapeHTML(!f.DisableHTMLEscape) + if f.PrettyPrint { + encoder.SetIndent("", " ") + } + if err := encoder.Encode(data); err != nil { + return nil, fmt.Errorf("failed to marshal fields to JSON, %w", err) + } + + return b.Bytes(), nil +} diff --git a/vendor/github.com/sirupsen/logrus/logger.go b/vendor/github.com/sirupsen/logrus/logger.go new file mode 100644 index 0000000000..337704457a --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/logger.go @@ -0,0 +1,404 @@ +package logrus + +import ( + "context" + "io" + "os" + "sync" + "sync/atomic" + "time" +) + +// LogFunction For big messages, it can be more efficient to pass a function +// and only call it if the log level is actually enables rather than +// generating the log message and then checking if the level is enabled +type LogFunction func() []interface{} + +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 adventurous, 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 + + // Flag for whether to log caller info (off by default) + ReportCaller bool + + // 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 + // Function to exit the application, defaults to `os.Exit()` + ExitFunc exitFunc +} + +type exitFunc func(int) + +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 = &logrus.Logger{ +// Out: os.Stderr, +// Formatter: new(logrus.TextFormatter), +// Hooks: make(logrus.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, + ExitFunc: os.Exit, + ReportCaller: false, + } +} + +func (logger *Logger) newEntry() *Entry { + entry, ok := logger.entryPool.Get().(*Entry) + if ok { + return entry + } + return NewEntry(logger) +} + +func (logger *Logger) releaseEntry(entry *Entry) { + entry.Data = map[string]interface{}{} + logger.entryPool.Put(entry) +} + +// WithField allocates a new entry and adds a field to it. +// Debug, Print, Info, Warn, Error, Fatal or Panic must be then applied to +// this new returned 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) +} + +// Add a context to the log entry. +func (logger *Logger) WithContext(ctx context.Context) *Entry { + entry := logger.newEntry() + defer logger.releaseEntry(entry) + return entry.WithContext(ctx) +} + +// Overrides the time of the log entry. +func (logger *Logger) WithTime(t time.Time) *Entry { + entry := logger.newEntry() + defer logger.releaseEntry(entry) + return entry.WithTime(t) +} + +func (logger *Logger) Logf(level Level, format string, args ...interface{}) { + if logger.IsLevelEnabled(level) { + entry := logger.newEntry() + entry.Logf(level, format, args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Tracef(format string, args ...interface{}) { + logger.Logf(TraceLevel, format, args...) +} + +func (logger *Logger) Debugf(format string, args ...interface{}) { + logger.Logf(DebugLevel, format, args...) +} + +func (logger *Logger) Infof(format string, args ...interface{}) { + logger.Logf(InfoLevel, format, args...) +} + +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{}) { + logger.Logf(WarnLevel, format, args...) +} + +func (logger *Logger) Warningf(format string, args ...interface{}) { + logger.Warnf(format, args...) +} + +func (logger *Logger) Errorf(format string, args ...interface{}) { + logger.Logf(ErrorLevel, format, args...) +} + +func (logger *Logger) Fatalf(format string, args ...interface{}) { + logger.Logf(FatalLevel, format, args...) + logger.Exit(1) +} + +func (logger *Logger) Panicf(format string, args ...interface{}) { + logger.Logf(PanicLevel, format, args...) +} + +func (logger *Logger) Log(level Level, args ...interface{}) { + if logger.IsLevelEnabled(level) { + entry := logger.newEntry() + entry.Log(level, args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) LogFn(level Level, fn LogFunction) { + if logger.IsLevelEnabled(level) { + entry := logger.newEntry() + entry.Log(level, fn()...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Trace(args ...interface{}) { + logger.Log(TraceLevel, args...) +} + +func (logger *Logger) Debug(args ...interface{}) { + logger.Log(DebugLevel, args...) +} + +func (logger *Logger) Info(args ...interface{}) { + logger.Log(InfoLevel, args...) +} + +func (logger *Logger) Print(args ...interface{}) { + entry := logger.newEntry() + entry.Print(args...) + logger.releaseEntry(entry) +} + +func (logger *Logger) Warn(args ...interface{}) { + logger.Log(WarnLevel, args...) +} + +func (logger *Logger) Warning(args ...interface{}) { + logger.Warn(args...) +} + +func (logger *Logger) Error(args ...interface{}) { + logger.Log(ErrorLevel, args...) +} + +func (logger *Logger) Fatal(args ...interface{}) { + logger.Log(FatalLevel, args...) + logger.Exit(1) +} + +func (logger *Logger) Panic(args ...interface{}) { + logger.Log(PanicLevel, args...) +} + +func (logger *Logger) TraceFn(fn LogFunction) { + logger.LogFn(TraceLevel, fn) +} + +func (logger *Logger) DebugFn(fn LogFunction) { + logger.LogFn(DebugLevel, fn) +} + +func (logger *Logger) InfoFn(fn LogFunction) { + logger.LogFn(InfoLevel, fn) +} + +func (logger *Logger) PrintFn(fn LogFunction) { + entry := logger.newEntry() + entry.Print(fn()...) + logger.releaseEntry(entry) +} + +func (logger *Logger) WarnFn(fn LogFunction) { + logger.LogFn(WarnLevel, fn) +} + +func (logger *Logger) WarningFn(fn LogFunction) { + logger.WarnFn(fn) +} + +func (logger *Logger) ErrorFn(fn LogFunction) { + logger.LogFn(ErrorLevel, fn) +} + +func (logger *Logger) FatalFn(fn LogFunction) { + logger.LogFn(FatalLevel, fn) + logger.Exit(1) +} + +func (logger *Logger) PanicFn(fn LogFunction) { + logger.LogFn(PanicLevel, fn) +} + +func (logger *Logger) Logln(level Level, args ...interface{}) { + if logger.IsLevelEnabled(level) { + entry := logger.newEntry() + entry.Logln(level, args...) + logger.releaseEntry(entry) + } +} + +func (logger *Logger) Traceln(args ...interface{}) { + logger.Logln(TraceLevel, args...) +} + +func (logger *Logger) Debugln(args ...interface{}) { + logger.Logln(DebugLevel, args...) +} + +func (logger *Logger) Infoln(args ...interface{}) { + logger.Logln(InfoLevel, args...) +} + +func (logger *Logger) Println(args ...interface{}) { + entry := logger.newEntry() + entry.Println(args...) + logger.releaseEntry(entry) +} + +func (logger *Logger) Warnln(args ...interface{}) { + logger.Logln(WarnLevel, args...) +} + +func (logger *Logger) Warningln(args ...interface{}) { + logger.Warnln(args...) +} + +func (logger *Logger) Errorln(args ...interface{}) { + logger.Logln(ErrorLevel, args...) +} + +func (logger *Logger) Fatalln(args ...interface{}) { + logger.Logln(FatalLevel, args...) + logger.Exit(1) +} + +func (logger *Logger) Panicln(args ...interface{}) { + logger.Logln(PanicLevel, args...) +} + +func (logger *Logger) Exit(code int) { + runHandlers() + if logger.ExitFunc == nil { + logger.ExitFunc = os.Exit + } + logger.ExitFunc(code) +} + +//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))) +} + +// SetLevel sets the logger level. +func (logger *Logger) SetLevel(level Level) { + atomic.StoreUint32((*uint32)(&logger.Level), uint32(level)) +} + +// GetLevel returns the logger level. +func (logger *Logger) GetLevel() Level { + return logger.level() +} + +// AddHook adds a hook to the logger hooks. +func (logger *Logger) AddHook(hook Hook) { + logger.mu.Lock() + defer logger.mu.Unlock() + logger.Hooks.Add(hook) +} + +// IsLevelEnabled checks if the log level of the logger is greater than the level param +func (logger *Logger) IsLevelEnabled(level Level) bool { + return logger.level() >= level +} + +// SetFormatter sets the logger formatter. +func (logger *Logger) SetFormatter(formatter Formatter) { + logger.mu.Lock() + defer logger.mu.Unlock() + logger.Formatter = formatter +} + +// SetOutput sets the logger output. +func (logger *Logger) SetOutput(output io.Writer) { + logger.mu.Lock() + defer logger.mu.Unlock() + logger.Out = output +} + +func (logger *Logger) SetReportCaller(reportCaller bool) { + logger.mu.Lock() + defer logger.mu.Unlock() + logger.ReportCaller = reportCaller +} + +// ReplaceHooks replaces the logger hooks and returns the old ones +func (logger *Logger) ReplaceHooks(hooks LevelHooks) LevelHooks { + logger.mu.Lock() + oldHooks := logger.Hooks + logger.Hooks = hooks + logger.mu.Unlock() + return oldHooks +} diff --git a/vendor/github.com/sirupsen/logrus/logrus.go b/vendor/github.com/sirupsen/logrus/logrus.go new file mode 100644 index 0000000000..2f16224cb9 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/logrus.go @@ -0,0 +1,186 @@ +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 { + if b, err := level.MarshalText(); err == nil { + return string(b) + } else { + 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 + case "trace": + return TraceLevel, nil + } + + var l Level + return l, fmt.Errorf("not a valid logrus Level: %q", lvl) +} + +// UnmarshalText implements encoding.TextUnmarshaler. +func (level *Level) UnmarshalText(text []byte) error { + l, err := ParseLevel(string(text)) + if err != nil { + return err + } + + *level = l + + return nil +} + +func (level Level) MarshalText() ([]byte, error) { + switch level { + case TraceLevel: + return []byte("trace"), nil + case DebugLevel: + return []byte("debug"), nil + case InfoLevel: + return []byte("info"), nil + case WarnLevel: + return []byte("warning"), nil + case ErrorLevel: + return []byte("error"), nil + case FatalLevel: + return []byte("fatal"), nil + case PanicLevel: + return []byte("panic"), nil + } + + return nil, fmt.Errorf("not a valid logrus level %d", level) +} + +// A constant exposing all logging levels +var AllLevels = []Level{ + PanicLevel, + FatalLevel, + ErrorLevel, + WarnLevel, + InfoLevel, + DebugLevel, + TraceLevel, +} + +// 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 `logger.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 + // TraceLevel level. Designates finer-grained informational events than the Debug. + TraceLevel +) + +// 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{}) + + // IsDebugEnabled() bool + // IsInfoEnabled() bool + // IsWarnEnabled() bool + // IsErrorEnabled() bool + // IsFatalEnabled() bool + // IsPanicEnabled() bool +} + +// Ext1FieldLogger (the first extension to FieldLogger) is superfluous, it is +// here for consistancy. Do not use. Use Logger or Entry instead. +type Ext1FieldLogger interface { + FieldLogger + Tracef(format string, args ...interface{}) + Trace(args ...interface{}) + Traceln(args ...interface{}) +} 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 0000000000..2403de9819 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_appengine.go @@ -0,0 +1,11 @@ +// +build appengine + +package logrus + +import ( + "io" +) + +func checkIfTerminal(w io.Writer) bool { + return true +} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go b/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go new file mode 100644 index 0000000000..499789984d --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_bsd.go @@ -0,0 +1,13 @@ +// +build darwin dragonfly freebsd netbsd openbsd +// +build !js + +package logrus + +import "golang.org/x/sys/unix" + +const ioctlReadTermios = unix.TIOCGETA + +func isTerminal(fd int) bool { + _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + return err == nil +} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_js.go b/vendor/github.com/sirupsen/logrus/terminal_check_js.go new file mode 100644 index 0000000000..ebdae3ec62 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_js.go @@ -0,0 +1,7 @@ +// +build js + +package logrus + +func isTerminal(fd int) bool { + return false +} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go b/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go new file mode 100644 index 0000000000..97af92c68e --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_no_terminal.go @@ -0,0 +1,11 @@ +// +build js nacl plan9 + +package logrus + +import ( + "io" +) + +func checkIfTerminal(w io.Writer) bool { + return false +} 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 0000000000..3293fb3caa --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go @@ -0,0 +1,17 @@ +// +build !appengine,!js,!windows,!nacl,!plan9 + +package logrus + +import ( + "io" + "os" +) + +func checkIfTerminal(w io.Writer) bool { + switch v := w.(type) { + case *os.File: + return isTerminal(int(v.Fd())) + default: + return false + } +} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go b/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go new file mode 100644 index 0000000000..f6710b3bd0 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_solaris.go @@ -0,0 +1,11 @@ +package logrus + +import ( + "golang.org/x/sys/unix" +) + +// 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 +} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_unix.go b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go new file mode 100644 index 0000000000..04748b8515 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_unix.go @@ -0,0 +1,13 @@ +// +build linux aix zos +// +build !js + +package logrus + +import "golang.org/x/sys/unix" + +const ioctlReadTermios = unix.TCGETS + +func isTerminal(fd int) bool { + _, err := unix.IoctlGetTermios(fd, ioctlReadTermios) + return err == nil +} diff --git a/vendor/github.com/sirupsen/logrus/terminal_check_windows.go b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go new file mode 100644 index 0000000000..2879eb50ea --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/terminal_check_windows.go @@ -0,0 +1,27 @@ +// +build !appengine,!js,windows + +package logrus + +import ( + "io" + "os" + + "golang.org/x/sys/windows" +) + +func checkIfTerminal(w io.Writer) bool { + switch v := w.(type) { + case *os.File: + handle := windows.Handle(v.Fd()) + var mode uint32 + if err := windows.GetConsoleMode(handle, &mode); err != nil { + return false + } + mode |= windows.ENABLE_VIRTUAL_TERMINAL_PROCESSING + if err := windows.SetConsoleMode(handle, mode); err != nil { + return false + } + return true + } + return false +} 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 0000000000..be2c6efe5e --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/text_formatter.go @@ -0,0 +1,339 @@ +package logrus + +import ( + "bytes" + "fmt" + "os" + "runtime" + "sort" + "strconv" + "strings" + "sync" + "time" + "unicode/utf8" +) + +const ( + red = 31 + 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 + + // Force quoting of all values + ForceQuote bool + + // DisableQuote disables quoting for all values. + // DisableQuote will have a lower priority than ForceQuote. + // If both of them are set to true, quote will be forced on all values. + DisableQuote bool + + // Override coloring based on CLICOLOR and CLICOLOR_FORCE. - https://bixense.com/clicolors/ + EnvironmentOverrideColors 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. + // The format to use is the same than for time.Format or time.Parse from the standard + // library. + // The standard Library already provides a set of predefined format. + 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 + + // The keys sorting function, when uninitialized it uses sort.Strings. + SortingFunc func([]string) + + // Disables the truncation of the level text to 4 characters. + DisableLevelTruncation bool + + // PadLevelText Adds padding the level text so that all the levels output at the same length + // PadLevelText is a superset of the DisableLevelTruncation option + PadLevelText bool + + // QuoteEmptyFields will wrap empty fields in quotes if true + QuoteEmptyFields bool + + // Whether the logger's out is to a terminal + isTerminal bool + + // FieldMap allows users to customize the names of keys for default fields. + // As an example: + // formatter := &TextFormatter{ + // FieldMap: FieldMap{ + // FieldKeyTime: "@timestamp", + // FieldKeyLevel: "@level", + // FieldKeyMsg: "@message"}} + FieldMap FieldMap + + // CallerPrettyfier can be set by the user to modify the content + // of the function and file keys in the data when ReportCaller is + // activated. If any of the returned value is the empty string the + // corresponding key will be removed from fields. + CallerPrettyfier func(*runtime.Frame) (function string, file string) + + terminalInitOnce sync.Once + + // The max length of the level text, generated dynamically on init + levelTextMaxLength int +} + +func (f *TextFormatter) init(entry *Entry) { + if entry.Logger != nil { + f.isTerminal = checkIfTerminal(entry.Logger.Out) + } + // Get the max length of the level text + for _, level := range AllLevels { + levelTextLength := utf8.RuneCount([]byte(level.String())) + if levelTextLength > f.levelTextMaxLength { + f.levelTextMaxLength = levelTextLength + } + } +} + +func (f *TextFormatter) isColored() bool { + isColored := f.ForceColors || (f.isTerminal && (runtime.GOOS != "windows")) + + if f.EnvironmentOverrideColors { + switch force, ok := os.LookupEnv("CLICOLOR_FORCE"); { + case ok && force != "0": + isColored = true + case ok && force == "0", os.Getenv("CLICOLOR") == "0": + isColored = false + } + } + + return isColored && !f.DisableColors +} + +// Format renders a single log entry +func (f *TextFormatter) Format(entry *Entry) ([]byte, error) { + data := make(Fields) + for k, v := range entry.Data { + data[k] = v + } + prefixFieldClashes(data, f.FieldMap, entry.HasCaller()) + keys := make([]string, 0, len(data)) + for k := range data { + keys = append(keys, k) + } + + var funcVal, fileVal string + + fixedKeys := make([]string, 0, 4+len(data)) + if !f.DisableTimestamp { + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyTime)) + } + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLevel)) + if entry.Message != "" { + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyMsg)) + } + if entry.err != "" { + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyLogrusError)) + } + if entry.HasCaller() { + if f.CallerPrettyfier != nil { + funcVal, fileVal = f.CallerPrettyfier(entry.Caller) + } else { + funcVal = entry.Caller.Function + fileVal = fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) + } + + if funcVal != "" { + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFunc)) + } + if fileVal != "" { + fixedKeys = append(fixedKeys, f.FieldMap.resolve(FieldKeyFile)) + } + } + + if !f.DisableSorting { + if f.SortingFunc == nil { + sort.Strings(keys) + fixedKeys = append(fixedKeys, keys...) + } else { + if !f.isColored() { + fixedKeys = append(fixedKeys, keys...) + f.SortingFunc(fixedKeys) + } else { + f.SortingFunc(keys) + } + } + } else { + fixedKeys = append(fixedKeys, keys...) + } + + var b *bytes.Buffer + if entry.Buffer != nil { + b = entry.Buffer + } else { + b = &bytes.Buffer{} + } + + f.terminalInitOnce.Do(func() { f.init(entry) }) + + timestampFormat := f.TimestampFormat + if timestampFormat == "" { + timestampFormat = defaultTimestampFormat + } + if f.isColored() { + f.printColored(b, entry, keys, data, timestampFormat) + } else { + + for _, key := range fixedKeys { + var value interface{} + switch { + case key == f.FieldMap.resolve(FieldKeyTime): + value = entry.Time.Format(timestampFormat) + case key == f.FieldMap.resolve(FieldKeyLevel): + value = entry.Level.String() + case key == f.FieldMap.resolve(FieldKeyMsg): + value = entry.Message + case key == f.FieldMap.resolve(FieldKeyLogrusError): + value = entry.err + case key == f.FieldMap.resolve(FieldKeyFunc) && entry.HasCaller(): + value = funcVal + case key == f.FieldMap.resolve(FieldKeyFile) && entry.HasCaller(): + value = fileVal + default: + value = data[key] + } + f.appendKeyValue(b, key, value) + } + } + + b.WriteByte('\n') + return b.Bytes(), nil +} + +func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, data Fields, timestampFormat string) { + var levelColor int + switch entry.Level { + case DebugLevel, TraceLevel: + levelColor = gray + case WarnLevel: + levelColor = yellow + case ErrorLevel, FatalLevel, PanicLevel: + levelColor = red + case InfoLevel: + levelColor = blue + default: + levelColor = blue + } + + levelText := strings.ToUpper(entry.Level.String()) + if !f.DisableLevelTruncation && !f.PadLevelText { + levelText = levelText[0:4] + } + if f.PadLevelText { + // Generates the format string used in the next line, for example "%-6s" or "%-7s". + // Based on the max level text length. + formatString := "%-" + strconv.Itoa(f.levelTextMaxLength) + "s" + // Formats the level text by appending spaces up to the max length, for example: + // - "INFO " + // - "WARNING" + levelText = fmt.Sprintf(formatString, levelText) + } + + // Remove a single newline if it already exists in the message to keep + // the behavior of logrus text_formatter the same as the stdlib log package + entry.Message = strings.TrimSuffix(entry.Message, "\n") + + caller := "" + if entry.HasCaller() { + funcVal := fmt.Sprintf("%s()", entry.Caller.Function) + fileVal := fmt.Sprintf("%s:%d", entry.Caller.File, entry.Caller.Line) + + if f.CallerPrettyfier != nil { + funcVal, fileVal = f.CallerPrettyfier(entry.Caller) + } + + if fileVal == "" { + caller = funcVal + } else if funcVal == "" { + caller = fileVal + } else { + caller = fileVal + " " + funcVal + } + } + + switch { + case f.DisableTimestamp: + fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m%s %-44s ", levelColor, levelText, caller, entry.Message) + case !f.FullTimestamp: + fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d]%s %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), caller, entry.Message) + default: + fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s]%s %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), caller, entry.Message) + } + for _, k := range keys { + v := 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.ForceQuote { + return true + } + if f.QuoteEmptyFields && len(text) == 0 { + return true + } + if f.DisableQuote { + return false + } + 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 0000000000..72e8e3a1b6 --- /dev/null +++ b/vendor/github.com/sirupsen/logrus/writer.go @@ -0,0 +1,70 @@ +package logrus + +import ( + "bufio" + "io" + "runtime" +) + +// Writer at INFO level. See WriterLevel for details. +func (logger *Logger) Writer() *io.PipeWriter { + return logger.WriterLevel(InfoLevel) +} + +// WriterLevel returns an io.Writer that can be used to write arbitrary text to +// the logger at the given log level. Each line written to the writer will be +// printed in the usual way using formatters and hooks. The writer is part of an +// io.Pipe and it is the callers responsibility to close the writer when done. +// This can be used to override the standard library logger easily. +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 TraceLevel: + printFunc = entry.Trace + 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/xanzy/go-gitlab/avatar.go b/vendor/github.com/xanzy/go-gitlab/avatar.go new file mode 100644 index 0000000000..1a7b923f3d --- /dev/null +++ b/vendor/github.com/xanzy/go-gitlab/avatar.go @@ -0,0 +1,64 @@ +// +// Copyright 2021, Pavel Kostohrys +// +// 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 gitlab + +import ( + "net/http" +) + +// AvatarRequestsService handles communication with the avatar related methods +// of the GitLab API. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/avatar.html +type AvatarRequestsService struct { + client *Client +} + +// Avatar represents a GitLab avatar. +// +// GitLab API docs: https://docs.gitlab.com/ee/api/avatar.html +type Avatar struct { + AvatarURL string `json:"avatar_url"` +} + +// GetAvatarOptions represents the available GetAvatar() options. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/avatar.html#get-a-single-avatar-url +type GetAvatarOptions struct { + Email *string `url:"email,omitempty" json:"email,omitempty"` + Size *int `url:"size,omitempty" json:"size,omitempty"` +} + +// GetAvatar gets the avatar URL for a user with the given email address. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/avatar.html#get-a-single-avatar-url +func (s *AvatarRequestsService) GetAvatar(opt *GetAvatarOptions, options ...RequestOptionFunc) (*Avatar, *Response, error) { + req, err := s.client.NewRequest(http.MethodGet, "avatar", opt, options) + if err != nil { + return nil, nil, err + } + + avatar := new(Avatar) + response, err := s.client.Do(req, avatar) + if err != nil { + return nil, response, err + } + + return avatar, response, nil +} diff --git a/vendor/github.com/xanzy/go-gitlab/boards.go b/vendor/github.com/xanzy/go-gitlab/boards.go index cec747a530..ef850234f1 100644 --- a/vendor/github.com/xanzy/go-gitlab/boards.go +++ b/vendor/github.com/xanzy/go-gitlab/boards.go @@ -61,7 +61,7 @@ func (b BoardList) String() string { // // GitLab API docs: https://docs.gitlab.com/ee/api/boards.html#create-a-board-starter type CreateIssueBoardOptions struct { - Name *string `url:"name" json:"name"` + Name *string `url:"name,omitempty" json:"name,omitempty"` } // CreateIssueBoard creates a new issue board. diff --git a/vendor/github.com/xanzy/go-gitlab/client_options.go b/vendor/github.com/xanzy/go-gitlab/client_options.go index 9f740460a0..f1d39adabe 100644 --- a/vendor/github.com/xanzy/go-gitlab/client_options.go +++ b/vendor/github.com/xanzy/go-gitlab/client_options.go @@ -40,7 +40,8 @@ func WithCustomBackoff(backoff retryablehttp.Backoff) ClientOptionFunc { } } -// WithCustomLogger can be used to configure a custom retryablehttp leveled logger +// WithCustomLeveledLogger can be used to configure a custom retryablehttp +// leveled logger. func WithCustomLeveledLogger(leveledLogger retryablehttp.LeveledLogger) ClientOptionFunc { return func(c *Client) error { c.client.Logger = leveledLogger @@ -58,7 +59,7 @@ func WithCustomLimiter(limiter RateLimiter) ClientOptionFunc { } } -// WithCustomLogger can be used to configure a custom retryablehttp logger +// WithCustomLogger can be used to configure a custom retryablehttp logger. func WithCustomLogger(logger retryablehttp.Logger) ClientOptionFunc { return func(c *Client) error { c.client.Logger = logger diff --git a/vendor/github.com/xanzy/go-gitlab/deployments.go b/vendor/github.com/xanzy/go-gitlab/deployments.go index 86b372d54f..d6b8bbd8eb 100644 --- a/vendor/github.com/xanzy/go-gitlab/deployments.go +++ b/vendor/github.com/xanzy/go-gitlab/deployments.go @@ -72,12 +72,18 @@ type Deployment struct { // https://docs.gitlab.com/ce/api/deployments.html#list-project-deployments type ListProjectDeploymentsOptions struct { ListOptions - OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` - Sort *string `url:"sort,omitempty" json:"sort,omitempty"` + OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"` + Sort *string `url:"sort,omitempty" json:"sort,omitempty"` + Environment *string `url:"environment,omitempty" json:"environment,omitempty"` + Status *string `url:"status,omitempty" json:"status,omitempty"` + + // Only for Gitlab versions less than 14 UpdatedAfter *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"` UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` - Environment *string `url:"environment,omitempty" json:"environment,omitempty"` - Status *string `url:"status,omitempty" json:"status,omitempty"` + + // Only for Gitlab 14 or higher + FinishedAfter *time.Time `url:"finished_after,omitempty" json:"finished_after,omitempty"` + FinishedBefore *time.Time `url:"finished_before,omitempty" json:"finished_before,omitempty"` } // ListProjectDeployments gets a list of deployments in a project. diff --git a/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go b/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go index f59b831a29..4ccb36fe21 100644 --- a/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go +++ b/vendor/github.com/xanzy/go-gitlab/event_webhook_types.go @@ -28,27 +28,23 @@ import ( // GitLab API docs: // https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#build-events type BuildEvent struct { - ObjectKind string `json:"object_kind"` - Ref string `json:"ref"` - Tag bool `json:"tag"` - BeforeSHA string `json:"before_sha"` - SHA string `json:"sha"` - BuildID int `json:"build_id"` - BuildName string `json:"build_name"` - BuildStage string `json:"build_stage"` - BuildStatus string `json:"build_status"` - BuildStartedAt string `json:"build_started_at"` - BuildFinishedAt string `json:"build_finished_at"` - BuildDuration float64 `json:"build_duration"` - BuildAllowFailure bool `json:"build_allow_failure"` - ProjectID int `json:"project_id"` - ProjectName string `json:"project_name"` - User struct { - ID int `json:"id"` - Name string `json:"name"` - Email string `json:"email"` - } `json:"user"` - Commit struct { + ObjectKind string `json:"object_kind"` + Ref string `json:"ref"` + Tag bool `json:"tag"` + BeforeSHA string `json:"before_sha"` + SHA string `json:"sha"` + BuildID int `json:"build_id"` + BuildName string `json:"build_name"` + BuildStage string `json:"build_stage"` + BuildStatus string `json:"build_status"` + BuildStartedAt string `json:"build_started_at"` + BuildFinishedAt string `json:"build_finished_at"` + BuildDuration float64 `json:"build_duration"` + BuildAllowFailure bool `json:"build_allow_failure"` + ProjectID int `json:"project_id"` + ProjectName string `json:"project_name"` + User *EventUser `json:"user"` + Commit struct { ID int `json:"id"` SHA string `json:"sha"` Message string `json:"message"` @@ -151,16 +147,11 @@ type DeploymentEvent struct { SSHURL string `json:"ssh_url"` HTTPURL string `json:"http_url"` } `json:"project"` - ShortSHA string `json:"short_sha"` - User struct { - Name string `json:"name"` - Username string `json:"username"` - AvatarURL string `json:"avatar_url"` - Email string `json:"email"` - } `json:"user"` - UserURL string `json:"user_url"` - CommitURL string `json:"commit_url"` - CommitTitle string `json:"commit_title"` + ShortSHA string `json:"short_sha"` + User *EventUser `json:"user"` + UserURL string `json:"user_url"` + CommitURL string `json:"commit_url"` + CommitTitle string `json:"commit_title"` } // IssueCommentEvent represents a comment on an issue event. @@ -237,8 +228,8 @@ type IssueCommentEvent struct { // GitLab API docs: // https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#issues-events type IssueEvent struct { - ObjectKind string `json:"object_kind"` - User *User `json:"user"` + ObjectKind string `json:"object_kind"` + User *EventUser `json:"user"` Project struct { ID int `json:"id"` Name string `json:"name"` @@ -274,18 +265,10 @@ type IssueEvent struct { URL string `json:"url"` Action string `json:"action"` } `json:"object_attributes"` - Assignee struct { - Name string `json:"name"` - Username string `json:"username"` - AvatarURL string `json:"avatar_url"` - } `json:"assignee"` - Assignees []struct { - Name string `json:"name"` - Username string `json:"username"` - AvatarURL string `json:"avatar_url"` - } `json:"assignees"` - Labels []Label `json:"labels"` - Changes struct { + Assignee *EventUser `json:"assignee"` + Assignees *[]EventUser `json:"assignees"` + Labels []Label `json:"labels"` + Changes struct { Description struct { Previous string `json:"previous"` Current string `json:"current"` @@ -315,29 +298,25 @@ type IssueEvent struct { // TODO: link to docs instead of src once they are published. // https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/data_builder/build.rb type JobEvent struct { - ObjectKind string `json:"object_kind"` - Ref string `json:"ref"` - Tag bool `json:"tag"` - BeforeSHA string `json:"before_sha"` - SHA string `json:"sha"` - BuildID int `json:"build_id"` - BuildName string `json:"build_name"` - BuildStage string `json:"build_stage"` - BuildStatus string `json:"build_status"` - BuildStartedAt string `json:"build_started_at"` - BuildFinishedAt string `json:"build_finished_at"` - BuildDuration float64 `json:"build_duration"` - BuildAllowFailure bool `json:"build_allow_failure"` - BuildFailureReason string `json:"build_failure_reason"` - PipelineID int `json:"pipeline_id"` - ProjectID int `json:"project_id"` - ProjectName string `json:"project_name"` - User struct { - ID int `json:"id"` - Name string `json:"name"` - Email string `json:"email"` - } `json:"user"` - Commit struct { + ObjectKind string `json:"object_kind"` + Ref string `json:"ref"` + Tag bool `json:"tag"` + BeforeSHA string `json:"before_sha"` + SHA string `json:"sha"` + BuildID int `json:"build_id"` + BuildName string `json:"build_name"` + BuildStage string `json:"build_stage"` + BuildStatus string `json:"build_status"` + BuildStartedAt string `json:"build_started_at"` + BuildFinishedAt string `json:"build_finished_at"` + BuildDuration float64 `json:"build_duration"` + BuildAllowFailure bool `json:"build_allow_failure"` + BuildFailureReason string `json:"build_failure_reason"` + PipelineID int `json:"pipeline_id"` + ProjectID int `json:"project_id"` + ProjectName string `json:"project_name"` + User *EventUser `json:"user"` + Commit struct { ID int `json:"id"` SHA string `json:"sha"` Message string `json:"message"` @@ -363,9 +342,9 @@ type JobEvent struct { // GitLab API docs: // https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#comment-on-merge-request type MergeCommentEvent struct { - ObjectKind string `json:"object_kind"` - User *User `json:"user"` - ProjectID int `json:"project_id"` + ObjectKind string `json:"object_kind"` + User *EventUser `json:"user"` + ProjectID int `json:"project_id"` Project struct { Name string `json:"name"` Description string `json:"description"` @@ -466,8 +445,8 @@ type MergeCommentEvent struct { // GitLab API docs: // https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#merge-request-events type MergeEvent struct { - ObjectKind string `json:"object_kind"` - User *User `json:"user"` + ObjectKind string `json:"object_kind"` + User *EventUser `json:"user"` Project struct { ID int `json:"id"` Name string `json:"name"` @@ -530,27 +509,28 @@ type MergeEvent struct { Email string `json:"email"` } `json:"author"` } `json:"last_commit"` - WorkInProgress bool `json:"work_in_progress"` - URL string `json:"url"` - Action string `json:"action"` - OldRev string `json:"oldrev"` - Assignee MergeAssignee `json:"assignee"` + WorkInProgress bool `json:"work_in_progress"` + URL string `json:"url"` + Action string `json:"action"` + OldRev string `json:"oldrev"` + Assignee *EventUser `json:"assignee"` } `json:"object_attributes"` - Repository *Repository `json:"repository"` - Assignee MergeAssignee `json:"assignee"` - Labels []Label `json:"labels"` + Repository *Repository `json:"repository"` + Assignee *EventUser `json:"assignee"` + Assignees []*EventUser `json:"assignees"` + Labels []*Label `json:"labels"` Changes struct { Assignees struct { - Previous []MergeAssignee `json:"previous"` - Current []MergeAssignee `json:"current"` + Previous []*EventUser `json:"previous"` + Current []*EventUser `json:"current"` } `json:"assignees"` Description struct { Previous string `json:"previous"` Current string `json:"current"` } `json:"description"` Labels struct { - Previous []Label `json:"previous"` - Current []Label `json:"current"` + Previous []*Label `json:"previous"` + Current []*Label `json:"current"` } `json:"labels"` SourceBranch struct { Previous string `json:"previous"` @@ -587,11 +567,13 @@ type MergeEvent struct { } `json:"changes"` } -// MergeAssignee represents a merge assignee. -type MergeAssignee struct { +// EventUser represents a user record in an event and is used as an even initiator or a merge assignee. +type EventUser struct { + ID int `json:"id"` Name string `json:"name"` Username string `json:"username"` AvatarURL string `json:"avatar_url"` + Email string `json:"email"` } // MergeParams represents the merge params. @@ -664,11 +646,7 @@ type PipelineEvent struct { MergeRequestStatus string `json:"merge_status"` URL string `json:"url"` } `json:"merge_request"` - User struct { - Name string `json:"name"` - Username string `json:"username"` - AvatarURL string `json:"avatar_url"` - } `json:"user"` + User *EventUser `json:"user"` Project struct { ID int `json:"id"` Name string `json:"name"` @@ -697,21 +675,17 @@ type PipelineEvent struct { } `json:"author"` } `json:"commit"` Builds []struct { - ID int `json:"id"` - Stage string `json:"stage"` - Name string `json:"name"` - Status string `json:"status"` - CreatedAt string `json:"created_at"` - StartedAt string `json:"started_at"` - FinishedAt string `json:"finished_at"` - When string `json:"when"` - Manual bool `json:"manual"` - User struct { - Name string `json:"name"` - Username string `json:"username"` - AvatarURL string `json:"avatar_url"` - } `json:"user"` - Runner struct { + ID int `json:"id"` + Stage string `json:"stage"` + Name string `json:"name"` + Status string `json:"status"` + CreatedAt string `json:"created_at"` + StartedAt string `json:"started_at"` + FinishedAt string `json:"finished_at"` + When string `json:"when"` + Manual bool `json:"manual"` + User *EventUser `json:"user"` + Runner struct { ID int `json:"id"` Description string `json:"description"` Active bool `json:"active"` @@ -837,9 +811,9 @@ type ReleaseEvent struct { // GitLab API docs: // https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#comment-on-code-snippet type SnippetCommentEvent struct { - ObjectKind string `json:"object_kind"` - User *User `json:"user"` - ProjectID int `json:"project_id"` + ObjectKind string `json:"object_kind"` + User *EventUser `json:"user"` + ProjectID int `json:"project_id"` Project struct { Name string `json:"name"` Description string `json:"description"` @@ -930,8 +904,8 @@ type TagEvent struct { // GitLab API docs: // https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#wiki-page-events type WikiPageEvent struct { - ObjectKind string `json:"object_kind"` - User *User `json:"user"` + ObjectKind string `json:"object_kind"` + User *EventUser `json:"user"` Project struct { Name string `json:"name"` Description string `json:"description"` diff --git a/vendor/github.com/xanzy/go-gitlab/gitlab.go b/vendor/github.com/xanzy/go-gitlab/gitlab.go index feed61088f..ecd18fc18e 100644 --- a/vendor/github.com/xanzy/go-gitlab/gitlab.go +++ b/vendor/github.com/xanzy/go-gitlab/gitlab.go @@ -101,6 +101,7 @@ type Client struct { AccessRequests *AccessRequestsService Applications *ApplicationsService AuditEvents *AuditEventsService + Avatar *AvatarRequestsService AwardEmoji *AwardEmojiService Boards *IssueBoardsService Branches *BranchesService @@ -274,6 +275,7 @@ func newClient(options ...ClientOptionFunc) (*Client, error) { c.AccessRequests = &AccessRequestsService{client: c} c.Applications = &ApplicationsService{client: c} c.AuditEvents = &AuditEventsService{client: c} + c.Avatar = &AvatarRequestsService{client: c} c.AwardEmoji = &AwardEmojiService{client: c} c.Boards = &IssueBoardsService{client: c} c.Branches = &BranchesService{client: c} diff --git a/vendor/github.com/xanzy/go-gitlab/group_members.go b/vendor/github.com/xanzy/go-gitlab/group_members.go index d2d5b5061b..7f0e2dc8e7 100644 --- a/vendor/github.com/xanzy/go-gitlab/group_members.go +++ b/vendor/github.com/xanzy/go-gitlab/group_members.go @@ -19,6 +19,7 @@ package gitlab import ( "fmt" "net/http" + "time" ) // GroupMembersService handles communication with the group members @@ -50,7 +51,8 @@ type GroupMember struct { State string `json:"state"` AvatarURL string `json:"avatar_url"` WebURL string `json:"web_url"` - ExpiresAt *ISOTime `json:"expires_at"` + CreatedAt *time.Time `json:"created_at"` + ExpiresAt *time.Time `json:"expires_at"` AccessLevel AccessLevelValue `json:"access_level"` GroupSAMLIdentity *GroupMemberSAMLIdentity `json:"group_saml_identity"` } @@ -202,6 +204,25 @@ func (s *GroupsService) ListBillableGroupMembers(gid interface{}, opt *ListBilla return bgm, resp, err } +// RemoveBillableGroupMember removes a given group members that count as billable. +// +// GitLab API docs: +// https://docs.gitlab.com/ee/api/members.html#remove-a-billable-member-from-a-group +func (s *GroupsService) RemoveBillableGroupMember(gid interface{}, user int, options ...RequestOptionFunc) (*Response, error) { + group, err := parseID(gid) + if err != nil { + return nil, err + } + u := fmt.Sprintf("groups/%s/billable_members/%d", pathEscape(group), user) + + req, err := s.client.NewRequest(http.MethodDelete, u, nil, options) + if err != nil { + return nil, err + } + + return s.client.Do(req, nil) +} + // AddGroupMember adds a user to the list of group members. // // GitLab API docs: diff --git a/vendor/github.com/xanzy/go-gitlab/group_milestones.go b/vendor/github.com/xanzy/go-gitlab/group_milestones.go index a257de7e84..69cd997dbd 100644 --- a/vendor/github.com/xanzy/go-gitlab/group_milestones.go +++ b/vendor/github.com/xanzy/go-gitlab/group_milestones.go @@ -58,7 +58,7 @@ func (m GroupMilestone) String() string { // https://docs.gitlab.com/ce/api/group_milestones.html#list-group-milestones type ListGroupMilestonesOptions struct { ListOptions - IIDs []int `url:"iids,omitempty" json:"iids,omitempty"` + IIDs []int `url:"iids[],omitempty" json:"iids,omitempty"` State *string `url:"state,omitempty" json:"state,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"` Search *string `url:"search,omitempty" json:"search,omitempty"` diff --git a/vendor/github.com/xanzy/go-gitlab/issues.go b/vendor/github.com/xanzy/go-gitlab/issues.go index 397e8c20bf..60f09f9e3d 100644 --- a/vendor/github.com/xanzy/go-gitlab/issues.go +++ b/vendor/github.com/xanzy/go-gitlab/issues.go @@ -85,44 +85,42 @@ type IssueLinks struct { // // GitLab API docs: https://docs.gitlab.com/ce/api/issues.html type Issue struct { - ID int `json:"id"` - IID int `json:"iid"` - ExternalID string `json:"external_id"` - State string `json:"state"` - Description string `json:"description"` - Author *IssueAuthor `json:"author"` - Milestone *Milestone `json:"milestone"` - ProjectID int `json:"project_id"` - Assignees []*IssueAssignee `json:"assignees"` - Assignee *IssueAssignee `json:"assignee"` - UpdatedAt *time.Time `json:"updated_at"` - ClosedAt *time.Time `json:"closed_at"` - ClosedBy *IssueCloser `json:"closed_by"` - Title string `json:"title"` - CreatedAt *time.Time `json:"created_at"` - MovedToID int `json:"moved_to_id"` - Labels Labels `json:"labels"` - LabelDetails []*LabelDetails `json:"label_details"` - Upvotes int `json:"upvotes"` - Downvotes int `json:"downvotes"` - DueDate *ISOTime `json:"due_date"` - WebURL string `json:"web_url"` - References *IssueReferences `json:"references"` - TimeStats *TimeStats `json:"time_stats"` - Confidential bool `json:"confidential"` - Weight int `json:"weight"` - DiscussionLocked bool `json:"discussion_locked"` - Subscribed bool `json:"subscribed"` - UserNotesCount int `json:"user_notes_count"` - Links *IssueLinks `json:"_links"` - IssueLinkID int `json:"issue_link_id"` - MergeRequestCount int `json:"merge_requests_count"` - EpicIssueID int `json:"epic_issue_id"` - Epic *Epic `json:"epic"` - TaskCompletionStatus struct { - Count int `json:"count"` - CompletedCount int `json:"completed_count"` - } `json:"task_completion_status"` + ID int `json:"id"` + IID int `json:"iid"` + ExternalID string `json:"external_id"` + State string `json:"state"` + Description string `json:"description"` + Author *IssueAuthor `json:"author"` + Milestone *Milestone `json:"milestone"` + ProjectID int `json:"project_id"` + Assignees []*IssueAssignee `json:"assignees"` + Assignee *IssueAssignee `json:"assignee"` + UpdatedAt *time.Time `json:"updated_at"` + ClosedAt *time.Time `json:"closed_at"` + ClosedBy *IssueCloser `json:"closed_by"` + Title string `json:"title"` + CreatedAt *time.Time `json:"created_at"` + MovedToID int `json:"moved_to_id"` + Labels Labels `json:"labels"` + LabelDetails []*LabelDetails `json:"label_details"` + Upvotes int `json:"upvotes"` + Downvotes int `json:"downvotes"` + DueDate *ISOTime `json:"due_date"` + WebURL string `json:"web_url"` + References *IssueReferences `json:"references"` + TimeStats *TimeStats `json:"time_stats"` + Confidential bool `json:"confidential"` + Weight int `json:"weight"` + DiscussionLocked bool `json:"discussion_locked"` + IssueType *string `json:"issue_type,omitempty"` + Subscribed bool `json:"subscribed"` + UserNotesCount int `json:"user_notes_count"` + Links *IssueLinks `json:"_links"` + IssueLinkID int `json:"issue_link_id"` + MergeRequestCount int `json:"merge_requests_count"` + EpicIssueID int `json:"epic_issue_id"` + Epic *Epic `json:"epic"` + TaskCompletionStatus *TasksCompletionStatus `json:"task_completion_status"` } func (i Issue) String() string { @@ -232,6 +230,7 @@ type ListIssuesOptions struct { UpdatedAfter *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"` UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` Confidential *bool `url:"confidential,omitempty" json:"confidential,omitempty"` + IssueType *string `url:"issue_type,omitempty" json:"issue_type,omitempty"` } // ListIssues gets all issues created by authenticated user. This function @@ -282,6 +281,7 @@ type ListGroupIssuesOptions struct { CreatedBefore *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"` UpdatedAfter *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"` UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` + IssueType *string `url:"issue_type,omitempty" json:"issue_type,omitempty"` } // ListGroupIssues gets a list of group issues. This function accepts @@ -339,6 +339,7 @@ type ListProjectIssuesOptions struct { UpdatedAfter *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"` UpdatedBefore *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"` Confidential *bool `url:"confidential,omitempty" json:"confidential,omitempty"` + IssueType *string `url:"issue_type,omitempty" json:"issue_type,omitempty"` } // ListProjectIssues gets a list of project issues. This function accepts @@ -406,6 +407,7 @@ type CreateIssueOptions struct { MergeRequestToResolveDiscussionsOf *int `url:"merge_request_to_resolve_discussions_of,omitempty" json:"merge_request_to_resolve_discussions_of,omitempty"` DiscussionToResolve *string `url:"discussion_to_resolve,omitempty" json:"discussion_to_resolve,omitempty"` Weight *int `url:"weight,omitempty" json:"weight,omitempty"` + IssueType *string `url:"issue_type,omitempty" json:"issue_type,omitempty"` } // CreateIssue creates a new project issue. @@ -449,6 +451,7 @@ type UpdateIssueOptions struct { DueDate *ISOTime `url:"due_date,omitempty" json:"due_date,omitempty"` Weight *int `url:"weight,omitempty" json:"weight,omitempty"` DiscussionLocked *bool `url:"discussion_locked,omitempty" json:"discussion_locked,omitempty"` + IssueType *string `url:"issue_type,omitempty" json:"issue_type,omitempty"` } // UpdateIssue updates an existing project issue. This function is also used diff --git a/vendor/github.com/xanzy/go-gitlab/issues_statistics.go b/vendor/github.com/xanzy/go-gitlab/issues_statistics.go index b9249c6d15..6f48a17caa 100644 --- a/vendor/github.com/xanzy/go-gitlab/issues_statistics.go +++ b/vendor/github.com/xanzy/go-gitlab/issues_statistics.go @@ -60,7 +60,7 @@ type GetIssuesStatisticsOptions struct { AssigneeID *int `url:"assignee_id,omitempty" json:"assignee_id,omitempty"` AssigneeUsername []string `url:"assignee_username,omitempty" json:"assignee_username,omitempty"` MyReactionEmoji *string `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"` - IIDs []int `url:"iids,omitempty" json:"iids,omitempty"` + IIDs []int `url:"iids[],omitempty" json:"iids,omitempty"` Search *string `url:"search,omitempty" json:"search,omitempty"` In *string `url:"in,omitempty" json:"in,omitempty"` CreatedAfter *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"` @@ -97,7 +97,7 @@ func (s *IssuesStatisticsService) GetIssuesStatistics(opt *GetIssuesStatisticsOp // https://docs.gitlab.com/ee/api/issues_statistics.html#get-group-issues-statistics type GetGroupIssuesStatisticsOptions struct { Labels Labels `url:"labels,omitempty" json:"labels,omitempty"` - IIDs []int `url:"iids,omitempty" json:"iids,omitempty"` + IIDs []int `url:"iids[],omitempty" json:"iids,omitempty"` Milestone *string `url:"milestone,omitempty" json:"milestone,omitempty"` Scope *string `url:"scope,omitempty" json:"scope,omitempty"` AuthorID *int `url:"author_id,omitempty" json:"author_id,omitempty"` @@ -144,7 +144,7 @@ func (s *IssuesStatisticsService) GetGroupIssuesStatistics(gid interface{}, opt // GitLab API docs: // https://docs.gitlab.com/ee/api/issues_statistics.html#get-project-issues-statistics type GetProjectIssuesStatisticsOptions struct { - IIDs []int `url:"iids,omitempty" json:"iids,omitempty"` + IIDs []int `url:"iids[],omitempty" json:"iids,omitempty"` Labels Labels `url:"labels,omitempty" json:"labels,omitempty"` Milestone *Milestone `url:"milestone,omitempty" json:"milestone,omitempty"` Scope *string `url:"scope,omitempty" json:"scope,omitempty"` diff --git a/vendor/github.com/xanzy/go-gitlab/merge_requests.go b/vendor/github.com/xanzy/go-gitlab/merge_requests.go index 3ec2a7e717..72a383bedc 100644 --- a/vendor/github.com/xanzy/go-gitlab/merge_requests.go +++ b/vendor/github.com/xanzy/go-gitlab/merge_requests.go @@ -96,18 +96,15 @@ type MergeRequest struct { HeadSha string `json:"head_sha"` StartSha string `json:"start_sha"` } `json:"diff_refs"` - DivergedCommitsCount int `json:"diverged_commits_count"` - RebaseInProgress bool `json:"rebase_in_progress"` - ApprovalsBeforeMerge int `json:"approvals_before_merge"` - Reference string `json:"reference"` - FirstContribution bool `json:"first_contribution"` - TaskCompletionStatus struct { - Count int `json:"count"` - CompletedCount int `json:"completed_count"` - } `json:"task_completion_status"` - HasConflicts bool `json:"has_conflicts"` - BlockingDiscussionsResolved bool `json:"blocking_discussions_resolved"` - Overflow bool `json:"overflow"` + DivergedCommitsCount int `json:"diverged_commits_count"` + RebaseInProgress bool `json:"rebase_in_progress"` + ApprovalsBeforeMerge int `json:"approvals_before_merge"` + Reference string `json:"reference"` + FirstContribution bool `json:"first_contribution"` + TaskCompletionStatus *TasksCompletionStatus `json:"task_completion_status"` + HasConflicts bool `json:"has_conflicts"` + BlockingDiscussionsResolved bool `json:"blocking_discussions_resolved"` + Overflow bool `json:"overflow"` } func (m MergeRequest) String() string { diff --git a/vendor/github.com/xanzy/go-gitlab/milestones.go b/vendor/github.com/xanzy/go-gitlab/milestones.go index 6629a399cf..e908a31388 100644 --- a/vendor/github.com/xanzy/go-gitlab/milestones.go +++ b/vendor/github.com/xanzy/go-gitlab/milestones.go @@ -58,7 +58,7 @@ func (m Milestone) String() string { // https://docs.gitlab.com/ce/api/milestones.html#list-project-milestones type ListMilestonesOptions struct { ListOptions - IIDs []int `url:"iids,omitempty" json:"iids,omitempty"` + IIDs []int `url:"iids[],omitempty" json:"iids,omitempty"` Title *string `url:"title,omitempty" json:"title,omitempty"` State *string `url:"state,omitempty" json:"state,omitempty"` Search *string `url:"search,omitempty" json:"search,omitempty"` diff --git a/vendor/github.com/xanzy/go-gitlab/notes.go b/vendor/github.com/xanzy/go-gitlab/notes.go index 28edd73af3..d51d2fa1df 100644 --- a/vendor/github.com/xanzy/go-gitlab/notes.go +++ b/vendor/github.com/xanzy/go-gitlab/notes.go @@ -34,11 +34,12 @@ type NotesService struct { // // GitLab API docs: https://docs.gitlab.com/ce/api/notes.html type Note struct { - ID int `json:"id"` - Body string `json:"body"` - Attachment string `json:"attachment"` - Title string `json:"title"` - FileName string `json:"file_name"` + ID int `json:"id"` + Type NoteTypeValue `json:"type"` + Body string `json:"body"` + Attachment string `json:"attachment"` + Title string `json:"title"` + FileName string `json:"file_name"` Author struct { ID int `json:"id"` Username string `json:"username"` diff --git a/vendor/github.com/xanzy/go-gitlab/project_mirror.go b/vendor/github.com/xanzy/go-gitlab/project_mirror.go index 7cfbe6d6a0..2560a3c4d2 100644 --- a/vendor/github.com/xanzy/go-gitlab/project_mirror.go +++ b/vendor/github.com/xanzy/go-gitlab/project_mirror.go @@ -46,18 +46,21 @@ type ProjectMirror struct { URL string `json:"url"` } +// ListProjectMirrorOptions represents the available ListProjectMirror() options. +type ListProjectMirrorOptions ListOptions + // ListProjectMirror gets a list of mirrors configured on the project. // // GitLab API docs: // https://docs.gitlab.com/ce/api/remote_mirrors.html#list-a-projects-remote-mirrors -func (s *ProjectMirrorService) ListProjectMirror(pid interface{}, options ...RequestOptionFunc) ([]*ProjectMirror, *Response, error) { +func (s *ProjectMirrorService) ListProjectMirror(pid interface{}, opt *ListProjectMirrorOptions, options ...RequestOptionFunc) ([]*ProjectMirror, *Response, error) { project, err := parseID(pid) if err != nil { return nil, nil, err } u := fmt.Sprintf("projects/%s/remote_mirrors", pathEscape(project)) - req, err := s.client.NewRequest(http.MethodGet, u, nil, options) + req, err := s.client.NewRequest(http.MethodGet, u, opt, options) if err != nil { return nil, nil, err } diff --git a/vendor/github.com/xanzy/go-gitlab/projects.go b/vendor/github.com/xanzy/go-gitlab/projects.go index c58907cee9..9aa352af5a 100644 --- a/vendor/github.com/xanzy/go-gitlab/projects.go +++ b/vendor/github.com/xanzy/go-gitlab/projects.go @@ -126,6 +126,17 @@ type Project struct { MergeRequestsTemplate string `json:"merge_requests_template"` } +// BasicProject included in other service responses (such as todos). +type BasicProject struct { + ID int `json:"id"` + Description string `json:"description"` + Name string `json:"name"` + NameWithNamespace string `json:"name_with_namespace"` + Path string `json:"path"` + PathWithNamespace string `json:"path_with_namespace"` + CreatedAt *time.Time `json:"created_at"` +} + // ContainerExpirationPolicy represents the container expiration policy. type ContainerExpirationPolicy struct { Cadence string `json:"cadence"` @@ -270,6 +281,7 @@ type ListProjectsOptions struct { Membership *bool `url:"membership,omitempty" json:"membership,omitempty"` Starred *bool `url:"starred,omitempty" json:"starred,omitempty"` Statistics *bool `url:"statistics,omitempty" json:"statistics,omitempty"` + Topic *string `url:"topic,omitempty" json:"topic,omitempty"` WithCustomAttributes *bool `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"` WithIssuesEnabled *bool `url:"with_issues_enabled,omitempty" json:"with_issues_enabled,omitempty"` WithMergeRequestsEnabled *bool `url:"with_merge_requests_enabled,omitempty" json:"with_merge_requests_enabled,omitempty"` diff --git a/vendor/github.com/xanzy/go-gitlab/releaselinks.go b/vendor/github.com/xanzy/go-gitlab/releaselinks.go index 7d56ff5bf3..5c1624c579 100644 --- a/vendor/github.com/xanzy/go-gitlab/releaselinks.go +++ b/vendor/github.com/xanzy/go-gitlab/releaselinks.go @@ -54,7 +54,7 @@ func (s *ReleaseLinksService) ListReleaseLinks(pid interface{}, tagName string, if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/releases/%s/assets/links", pathEscape(project), tagName) + u := fmt.Sprintf("projects/%s/releases/%s/assets/links", pathEscape(project), pathEscape(tagName)) req, err := s.client.NewRequest(http.MethodGet, u, opt, options) if err != nil { @@ -80,7 +80,7 @@ func (s *ReleaseLinksService) GetReleaseLink(pid interface{}, tagName string, li } u := fmt.Sprintf("projects/%s/releases/%s/assets/links/%d", pathEscape(project), - tagName, + pathEscape(tagName), link) req, err := s.client.NewRequest(http.MethodGet, u, nil, options) @@ -115,7 +115,7 @@ func (s *ReleaseLinksService) CreateReleaseLink(pid interface{}, tagName string, if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/releases/%s/assets/links", pathEscape(project), tagName) + u := fmt.Sprintf("projects/%s/releases/%s/assets/links", pathEscape(project), pathEscape(tagName)) req, err := s.client.NewRequest(http.MethodPost, u, opt, options) if err != nil { @@ -153,7 +153,7 @@ func (s *ReleaseLinksService) UpdateReleaseLink(pid interface{}, tagName string, } u := fmt.Sprintf("projects/%s/releases/%s/assets/links/%d", pathEscape(project), - tagName, + pathEscape(tagName), link) req, err := s.client.NewRequest(http.MethodPut, u, opt, options) @@ -180,7 +180,7 @@ func (s *ReleaseLinksService) DeleteReleaseLink(pid interface{}, tagName string, } u := fmt.Sprintf("projects/%s/releases/%s/assets/links/%d", pathEscape(project), - tagName, + pathEscape(tagName), link, ) diff --git a/vendor/github.com/xanzy/go-gitlab/releases.go b/vendor/github.com/xanzy/go-gitlab/releases.go index bb91ab47a8..0059fbba94 100644 --- a/vendor/github.com/xanzy/go-gitlab/releases.go +++ b/vendor/github.com/xanzy/go-gitlab/releases.go @@ -100,7 +100,7 @@ func (s *ReleasesService) GetRelease(pid interface{}, tagName string, options .. if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/releases/%s", pathEscape(project), tagName) + u := fmt.Sprintf("projects/%s/releases/%s", pathEscape(project), pathEscape(tagName)) req, err := s.client.NewRequest(http.MethodGet, u, nil, options) if err != nil { @@ -192,7 +192,7 @@ func (s *ReleasesService) UpdateRelease(pid interface{}, tagName string, opts *U if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/releases/%s", pathEscape(project), tagName) + u := fmt.Sprintf("projects/%s/releases/%s", pathEscape(project), pathEscape(tagName)) req, err := s.client.NewRequest(http.MethodPut, u, opts, options) if err != nil { @@ -217,7 +217,7 @@ func (s *ReleasesService) DeleteRelease(pid interface{}, tagName string, options if err != nil { return nil, nil, err } - u := fmt.Sprintf("projects/%s/releases/%s", pathEscape(project), tagName) + u := fmt.Sprintf("projects/%s/releases/%s", pathEscape(project), pathEscape(tagName)) req, err := s.client.NewRequest(http.MethodDelete, u, nil, options) if err != nil { diff --git a/vendor/github.com/xanzy/go-gitlab/search.go b/vendor/github.com/xanzy/go-gitlab/search.go index 6d7520f0c6..972a37d81d 100644 --- a/vendor/github.com/xanzy/go-gitlab/search.go +++ b/vendor/github.com/xanzy/go-gitlab/search.go @@ -32,7 +32,10 @@ type SearchService struct { // SearchOptions represents the available options for all search methods. // // GitLab API docs: https://docs.gitlab.com/ce/api/search.html -type SearchOptions ListOptions +type SearchOptions struct { + ListOptions + Ref *string `url:"ref,omitempty" json:"ref,omitempty"` +} type searchOptions struct { SearchOptions diff --git a/vendor/github.com/xanzy/go-gitlab/settings.go b/vendor/github.com/xanzy/go-gitlab/settings.go index 8bda0f3357..10d76e8992 100644 --- a/vendor/github.com/xanzy/go-gitlab/settings.go +++ b/vendor/github.com/xanzy/go-gitlab/settings.go @@ -36,6 +36,7 @@ type Settings struct { ID int `json:"id"` CreatedAt *time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` + AdminMode bool `json:"admin_mode"` AdminNotificationEmail string `json:"admin_notification_email"` AfterSignOutPath string `json:"after_sign_out_path"` AfterSignUpText string `json:"after_sign_up_text"` @@ -228,6 +229,7 @@ func (s *SettingsService) GetSettings(options ...RequestOptionFunc) (*Settings, // GitLab API docs: // https://docs.gitlab.com/ce/api/settings.html#change-application.settings type UpdateSettingsOptions struct { + AdminMode *bool `url:"admin_mode,omitempty" json:"admin_mode,omitempty"` AdminNotificationEmail *string `url:"admin_notification_email,omitempty" json:"admin_notification_email,omitempty"` AfterSignOutPath *string `url:"after_sign_out_path,omitempty" json:"after_sign_out_path,omitempty"` AfterSignUpText *string `url:"after_sign_up_text,omitempty" json:"after_sign_up_text,omitempty"` diff --git a/vendor/github.com/xanzy/go-gitlab/strings.go b/vendor/github.com/xanzy/go-gitlab/strings.go index af2133ed04..2a58ae55f9 100644 --- a/vendor/github.com/xanzy/go-gitlab/strings.go +++ b/vendor/github.com/xanzy/go-gitlab/strings.go @@ -24,7 +24,7 @@ import ( ) // Stringify attempts to create a reasonable string representation of types in -// the GitHub library. It does things like resolve pointers to their values +// the Gitlab library. It does things like resolve pointers to their values // and omits struct fields with nil values. func Stringify(message interface{}) string { var buf bytes.Buffer diff --git a/vendor/github.com/xanzy/go-gitlab/todos.go b/vendor/github.com/xanzy/go-gitlab/todos.go index 7c8cdd04e6..7ffb7fc490 100644 --- a/vendor/github.com/xanzy/go-gitlab/todos.go +++ b/vendor/github.com/xanzy/go-gitlab/todos.go @@ -30,110 +30,77 @@ type TodosService struct { client *Client } -// TodoAction represents the available actions that can be performed on a todo. +// Todo represents a GitLab todo. // // GitLab API docs: https://docs.gitlab.com/ce/api/todos.html -type TodoAction string - -// The available todo actions. -const ( - TodoAssigned TodoAction = "assigned" - TodoMentioned TodoAction = "mentioned" - TodoBuildFailed TodoAction = "build_failed" - TodoMarked TodoAction = "marked" - TodoApprovalRequired TodoAction = "approval_required" - TodoDirectlyAddressed TodoAction = "directly_addressed" -) +type Todo struct { + ID int `json:"id"` + Project *BasicProject `json:"project"` + Author *BasicUser `json:"author"` + ActionName TodoAction `json:"action_name"` + TargetType TodoTargetType `json:"target_type"` + Target *TodoTarget `json:"target"` + TargetURL string `json:"target_url"` + Body string `json:"body"` + State string `json:"state"` + CreatedAt *time.Time `json:"created_at"` +} + +func (t Todo) String() string { + return Stringify(t) +} // TodoTarget represents a todo target of type Issue or MergeRequest type TodoTarget struct { - // TODO: replace both Assignee and Author structs with v4 User struct - Assignee struct { - Name string `json:"name"` - Username string `json:"username"` - ID int `json:"id"` - State string `json:"state"` - AvatarURL string `json:"avatar_url"` - WebURL string `json:"web_url"` - } `json:"assignee"` - Author struct { - Name string `json:"name"` - Username string `json:"username"` - ID int `json:"id"` - State string `json:"state"` - AvatarURL string `json:"avatar_url"` - WebURL string `json:"web_url"` - } `json:"author"` - CreatedAt *time.Time `json:"created_at"` - Description string `json:"description"` - Downvotes int `json:"downvotes"` - ID int `json:"id"` - IID int `json:"iid"` - Labels []string `json:"labels"` - Milestone Milestone `json:"milestone"` - ProjectID int `json:"project_id"` - State string `json:"state"` - Subscribed bool `json:"subscribed"` - Title string `json:"title"` - UpdatedAt *time.Time `json:"updated_at"` - Upvotes int `json:"upvotes"` - UserNotesCount int `json:"user_notes_count"` - WebURL string `json:"web_url"` + Assignees []*BasicUser `json:"assignees"` + Assignee *BasicUser `json:"assignee"` + Author *BasicUser `json:"author"` + CreatedAt *time.Time `json:"created_at"` + Description string `json:"description"` + Downvotes int `json:"downvotes"` + ID int `json:"id"` + IID int `json:"iid"` + Labels []string `json:"labels"` + Milestone *Milestone `json:"milestone"` + ProjectID int `json:"project_id"` + State string `json:"state"` + Subscribed bool `json:"subscribed"` + TaskCompletionStatus *TasksCompletionStatus `json:"task_completion_status"` + Title string `json:"title"` + UpdatedAt *time.Time `json:"updated_at"` + Upvotes int `json:"upvotes"` + UserNotesCount int `json:"user_notes_count"` + WebURL string `json:"web_url"` // Only available for type Issue - Confidential bool `json:"confidential"` - DueDate string `json:"due_date"` - Weight int `json:"weight"` + Confidential bool `json:"confidential"` + DueDate string `json:"due_date"` + HasTasks bool `json:"has_tasks"` + Links *IssueLinks `json:"_links"` + MovedToID int `json:"moved_to_id"` + TimeStats *TimeStats `json:"time_stats"` + Weight int `json:"weight"` // Only available for type MergeRequest - ApprovalsBeforeMerge int `json:"approvals_before_merge"` - ForceRemoveSourceBranch bool `json:"force_remove_source_branch"` - MergeCommitSHA string `json:"merge_commit_sha"` - MergeWhenPipelineSucceeds bool `json:"merge_when_pipeline_succeeds"` - MergeStatus string `json:"merge_status"` - SHA string `json:"sha"` - ShouldRemoveSourceBranch bool `json:"should_remove_source_branch"` - SourceBranch string `json:"source_branch"` - SourceProjectID int `json:"source_project_id"` - Squash bool `json:"squash"` - TargetBranch string `json:"target_branch"` - TargetProjectID int `json:"target_project_id"` - WorkInProgress bool `json:"work_in_progress"` -} - -// Todo represents a GitLab todo. -// -// GitLab API docs: https://docs.gitlab.com/ce/api/todos.html -type Todo struct { - ID int `json:"id"` - Project struct { - ID int `json:"id"` - HTTPURLToRepo string `json:"http_url_to_repo"` - WebURL string `json:"web_url"` - Name string `json:"name"` - NameWithNamespace string `json:"name_with_namespace"` - Path string `json:"path"` - PathWithNamespace string `json:"path_with_namespace"` - } `json:"project"` - Author struct { - ID int `json:"id"` - Name string `json:"name"` - Username string `json:"username"` - State string `json:"state"` - AvatarURL string `json:"avatar_url"` - WebURL string `json:"web_url"` - } `json:"author"` - ActionName TodoAction `json:"action_name"` - TargetType string `json:"target_type"` - Target TodoTarget `json:"target"` - TargetURL string `json:"target_url"` - Body string `json:"body"` - State string `json:"state"` - CreatedAt *time.Time `json:"created_at"` -} - -func (t Todo) String() string { - return Stringify(t) + ApprovalsBeforeMerge int `json:"approvals_before_merge"` + ForceRemoveSourceBranch bool `json:"force_remove_source_branch"` + MergeCommitSHA string `json:"merge_commit_sha"` + MergeWhenPipelineSucceeds bool `json:"merge_when_pipeline_succeeds"` + MergeStatus string `json:"merge_status"` + Reference string `json:"reference"` + Reviewers []*BasicUser `json:"reviewers"` + SHA string `json:"sha"` + ShouldRemoveSourceBranch bool `json:"should_remove_source_branch"` + SourceBranch string `json:"source_branch"` + SourceProjectID int `json:"source_project_id"` + Squash bool `json:"squash"` + TargetBranch string `json:"target_branch"` + TargetProjectID int `json:"target_project_id"` + WorkInProgress bool `json:"work_in_progress"` + + // Only available for type DesignManagement::Design + FileName string `json:"filename"` + ImageURL string `json:"image_url"` } // ListTodosOptions represents the available ListTodos() options. diff --git a/vendor/github.com/xanzy/go-gitlab/types.go b/vendor/github.com/xanzy/go-gitlab/types.go index 805cd5b914..17dcaeebf4 100644 --- a/vendor/github.com/xanzy/go-gitlab/types.go +++ b/vendor/github.com/xanzy/go-gitlab/types.go @@ -290,6 +290,25 @@ func MergeMethod(v MergeMethodValue) *MergeMethodValue { return p } +// NoteTypeValue represents the type of a Note. +type NoteTypeValue string + +// List of available note types. +const ( + DiffNote NoteTypeValue = "DiffNote" + DiscussionNote NoteTypeValue = "DiscussionNote" + GenericNote NoteTypeValue = "Note" + LegacyDiffNote NoteTypeValue = "LegacyDiffNote" +) + +// NoteType is a helper routine that allocates a new NoteTypeValue to +// store v and returns a pointer to it. +func NoteType(v NoteTypeValue) *NoteTypeValue { + p := new(NoteTypeValue) + *p = v + return p +} + // NotificationLevelValue represents a notification level. type NotificationLevelValue int @@ -403,6 +422,39 @@ func SubGroupCreationLevel(v SubGroupCreationLevelValue) *SubGroupCreationLevelV return p } +// TasksCompletionStatus represents tasks of the issue/merge request. +type TasksCompletionStatus struct { + Count int `json:"count"` + CompletedCount int `json:"completed_count"` +} + +// TodoAction represents the available actions that can be performed on a todo. +// +// GitLab API docs: https://docs.gitlab.com/ce/api/todos.html +type TodoAction string + +// The available todo actions. +const ( + TodoAssigned TodoAction = "assigned" + TodoMentioned TodoAction = "mentioned" + TodoBuildFailed TodoAction = "build_failed" + TodoMarked TodoAction = "marked" + TodoApprovalRequired TodoAction = "approval_required" + TodoDirectlyAddressed TodoAction = "directly_addressed" +) + +// TodoTargetType represents the available target that can be linked to a todo. +// +// GitLab API docs: https://docs.gitlab.com/ce/api/todos.html +type TodoTargetType string + +const ( + TodoTargetAlertManagement TodoTargetType = "AlertManagement::Alert" + TodoTargetDesignManagement TodoTargetType = "DesignManagement::Design" + TodoTargetIssue TodoTargetType = "Issue" + TodoTargetMergeRequest TodoTargetType = "MergeRequest" +) + // VariableTypeValue represents a variable type within GitLab. // // GitLab API docs: https://docs.gitlab.com/ce/api/ diff --git a/vendor/github.com/yuin/goldmark/parser/attribute.go b/vendor/github.com/yuin/goldmark/parser/attribute.go index 4c7cc24922..f86c83610e 100644 --- a/vendor/github.com/yuin/goldmark/parser/attribute.go +++ b/vendor/github.com/yuin/goldmark/parser/attribute.go @@ -89,7 +89,11 @@ func parseAttribute(reader text.Reader) (Attribute, bool) { reader.Advance(1) line, _ := reader.PeekLine() i := 0 - for ; i < len(line) && !util.IsSpace(line[i]) && (!util.IsPunct(line[i]) || line[i] == '_' || line[i] == '-'); i++ { + // HTML5 allows any kind of characters as id, but XHTML restricts characters for id. + // CommonMark is basically defined for XHTML(even though it is legacy). + // So we restrict id characters. + for ; i < len(line) && !util.IsSpace(line[i]) && + (!util.IsPunct(line[i]) || line[i] == '_' || line[i] == '-' || line[i] == ':' || line[i] == '.'); i++ { } name := attrNameClass if c == '#' { diff --git a/vendor/github.com/yuin/goldmark/parser/fcode_block.go b/vendor/github.com/yuin/goldmark/parser/fcode_block.go index 63c2fd46be..2bb688f16d 100644 --- a/vendor/github.com/yuin/goldmark/parser/fcode_block.go +++ b/vendor/github.com/yuin/goldmark/parser/fcode_block.go @@ -72,10 +72,6 @@ func (b *fencedCodeBlockParser) Continue(node ast.Node, reader text.Reader, pc C line, segment := reader.PeekLine() fdata := pc.Get(fencedCodeBlockInfoKey).(*fenceData) - // if code block line starts with a tab, keep a tab as it is. - if segment.Padding != 0 { - preserveLeadingTabInCodeBlock(&segment, reader, fdata.indent) - } w, pos := util.IndentWidth(line, reader.LineOffset()) if w < 4 { i := pos @@ -94,6 +90,10 @@ func (b *fencedCodeBlockParser) Continue(node ast.Node, reader text.Reader, pc C pos, padding := util.DedentPositionPadding(line, reader.LineOffset(), segment.Padding, fdata.indent) seg := text.NewSegmentPadding(segment.Start+pos, segment.Stop, padding) + // if code block line starts with a tab, keep a tab as it is. + if padding != 0 { + preserveLeadingTabInCodeBlock(&seg, reader, fdata.indent) + } node.Lines().Append(seg) reader.AdvanceAndSetPadding(segment.Stop-segment.Start-pos-1, padding) return Continue | NoChildren diff --git a/vendor/github.com/yuin/goldmark/parser/list_item.go b/vendor/github.com/yuin/goldmark/parser/list_item.go index 6c8db95485..e29b0a4aaf 100644 --- a/vendor/github.com/yuin/goldmark/parser/list_item.go +++ b/vendor/github.com/yuin/goldmark/parser/list_item.go @@ -53,7 +53,7 @@ func (b *listItemParser) Open(parent ast.Node, reader text.Reader, pc Context) ( func (b *listItemParser) Continue(node ast.Node, reader text.Reader, pc Context) State { line, _ := reader.PeekLine() if util.IsBlank(line) { - reader.Advance(len(line)-1) + reader.Advance(len(line) - 1) return Continue | HasChildren } diff --git a/vendor/go.opentelemetry.io/otel/LICENSE b/vendor/go.opentelemetry.io/otel/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/vendor/go.opentelemetry.io/otel/LICENSE +++ /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 [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/go.opentelemetry.io/otel/attribute/doc.go b/vendor/go.opentelemetry.io/otel/attribute/doc.go deleted file mode 100644 index 44bc32c9e0..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright The OpenTelemetry 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 attribute provides key and value attributes. -// -// This package is currently in a pre-GA phase. Backwards incompatible changes -// may be introduced in subsequent minor version releases as we work to track -// the evolving OpenTelemetry specification and user feedback. -package attribute // import "go.opentelemetry.io/otel/attribute" diff --git a/vendor/go.opentelemetry.io/otel/attribute/encoder.go b/vendor/go.opentelemetry.io/otel/attribute/encoder.go deleted file mode 100644 index 8b940f78dc..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/encoder.go +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright The OpenTelemetry 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 attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "bytes" - "sync" - "sync/atomic" -) - -type ( - // Encoder is a mechanism for serializing a label set into a - // specific string representation that supports caching, to - // avoid repeated serialization. An example could be an - // exporter encoding the label set into a wire representation. - Encoder interface { - // Encode returns the serialized encoding of the label - // set using its Iterator. This result may be cached - // by a attribute.Set. - Encode(iterator Iterator) string - - // ID returns a value that is unique for each class of - // label encoder. Label encoders allocate these using - // `NewEncoderID`. - ID() EncoderID - } - - // EncoderID is used to identify distinct Encoder - // implementations, for caching encoded results. - EncoderID struct { - value uint64 - } - - // defaultLabelEncoder uses a sync.Pool of buffers to reduce - // the number of allocations used in encoding labels. This - // implementation encodes a comma-separated list of key=value, - // with '/'-escaping of '=', ',', and '\'. - defaultLabelEncoder struct { - // pool is a pool of labelset builders. The buffers in this - // pool grow to a size that most label encodings will not - // allocate new memory. - pool sync.Pool // *bytes.Buffer - } -) - -// escapeChar is used to ensure uniqueness of the label encoding where -// keys or values contain either '=' or ','. Since there is no parser -// needed for this encoding and its only requirement is to be unique, -// this choice is arbitrary. Users will see these in some exporters -// (e.g., stdout), so the backslash ('\') is used as a conventional choice. -const escapeChar = '\\' - -var ( - _ Encoder = &defaultLabelEncoder{} - - // encoderIDCounter is for generating IDs for other label - // encoders. - encoderIDCounter uint64 - - defaultEncoderOnce sync.Once - defaultEncoderID = NewEncoderID() - defaultEncoderInstance *defaultLabelEncoder -) - -// NewEncoderID returns a unique label encoder ID. It should be -// called once per each type of label encoder. Preferably in init() or -// in var definition. -func NewEncoderID() EncoderID { - return EncoderID{value: atomic.AddUint64(&encoderIDCounter, 1)} -} - -// DefaultEncoder returns a label encoder that encodes labels -// in such a way that each escaped label's key is followed by an equal -// sign and then by an escaped label's value. All key-value pairs are -// separated by a comma. -// -// Escaping is done by prepending a backslash before either a -// backslash, equal sign or a comma. -func DefaultEncoder() Encoder { - defaultEncoderOnce.Do(func() { - defaultEncoderInstance = &defaultLabelEncoder{ - pool: sync.Pool{ - New: func() interface{} { - return &bytes.Buffer{} - }, - }, - } - }) - return defaultEncoderInstance -} - -// Encode is a part of an implementation of the LabelEncoder -// interface. -func (d *defaultLabelEncoder) Encode(iter Iterator) string { - buf := d.pool.Get().(*bytes.Buffer) - defer d.pool.Put(buf) - buf.Reset() - - for iter.Next() { - i, keyValue := iter.IndexedLabel() - if i > 0 { - _, _ = buf.WriteRune(',') - } - copyAndEscape(buf, string(keyValue.Key)) - - _, _ = buf.WriteRune('=') - - if keyValue.Value.Type() == STRING { - copyAndEscape(buf, keyValue.Value.AsString()) - } else { - _, _ = buf.WriteString(keyValue.Value.Emit()) - } - } - return buf.String() -} - -// ID is a part of an implementation of the LabelEncoder interface. -func (*defaultLabelEncoder) ID() EncoderID { - return defaultEncoderID -} - -// copyAndEscape escapes `=`, `,` and its own escape character (`\`), -// making the default encoding unique. -func copyAndEscape(buf *bytes.Buffer, val string) { - for _, ch := range val { - switch ch { - case '=', ',', escapeChar: - buf.WriteRune(escapeChar) - } - buf.WriteRune(ch) - } -} - -// Valid returns true if this encoder ID was allocated by -// `NewEncoderID`. Invalid encoder IDs will not be cached. -func (id EncoderID) Valid() bool { - return id.value != 0 -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/iterator.go b/vendor/go.opentelemetry.io/otel/attribute/iterator.go deleted file mode 100644 index e03aabb62b..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/iterator.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright The OpenTelemetry 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 attribute // import "go.opentelemetry.io/otel/attribute" - -// Iterator allows iterating over the set of labels in order, -// sorted by key. -type Iterator struct { - storage *Set - idx int -} - -// MergeIterator supports iterating over two sets of labels while -// eliminating duplicate values from the combined set. The first -// iterator value takes precedence. -type MergeIterator struct { - one oneIterator - two oneIterator - current KeyValue -} - -type oneIterator struct { - iter Iterator - done bool - label KeyValue -} - -// Next moves the iterator to the next position. Returns false if there -// are no more labels. -func (i *Iterator) Next() bool { - i.idx++ - return i.idx < i.Len() -} - -// Label returns current KeyValue. Must be called only after Next returns -// true. -func (i *Iterator) Label() KeyValue { - kv, _ := i.storage.Get(i.idx) - return kv -} - -// Attribute is a synonym for Label(). -func (i *Iterator) Attribute() KeyValue { - return i.Label() -} - -// IndexedLabel returns current index and attribute. Must be called only -// after Next returns true. -func (i *Iterator) IndexedLabel() (int, KeyValue) { - return i.idx, i.Label() -} - -// Len returns a number of labels in the iterator's `*Set`. -func (i *Iterator) Len() int { - return i.storage.Len() -} - -// ToSlice is a convenience function that creates a slice of labels -// from the passed iterator. The iterator is set up to start from the -// beginning before creating the slice. -func (i *Iterator) ToSlice() []KeyValue { - l := i.Len() - if l == 0 { - return nil - } - i.idx = -1 - slice := make([]KeyValue, 0, l) - for i.Next() { - slice = append(slice, i.Label()) - } - return slice -} - -// NewMergeIterator returns a MergeIterator for merging two label sets -// Duplicates are resolved by taking the value from the first set. -func NewMergeIterator(s1, s2 *Set) MergeIterator { - mi := MergeIterator{ - one: makeOne(s1.Iter()), - two: makeOne(s2.Iter()), - } - return mi -} - -func makeOne(iter Iterator) oneIterator { - oi := oneIterator{ - iter: iter, - } - oi.advance() - return oi -} - -func (oi *oneIterator) advance() { - if oi.done = !oi.iter.Next(); !oi.done { - oi.label = oi.iter.Label() - } -} - -// Next returns true if there is another label available. -func (m *MergeIterator) Next() bool { - if m.one.done && m.two.done { - return false - } - if m.one.done { - m.current = m.two.label - m.two.advance() - return true - } - if m.two.done { - m.current = m.one.label - m.one.advance() - return true - } - if m.one.label.Key == m.two.label.Key { - m.current = m.one.label // first iterator label value wins - m.one.advance() - m.two.advance() - return true - } - if m.one.label.Key < m.two.label.Key { - m.current = m.one.label - m.one.advance() - return true - } - m.current = m.two.label - m.two.advance() - return true -} - -// Label returns the current value after Next() returns true. -func (m *MergeIterator) Label() KeyValue { - return m.current -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/key.go b/vendor/go.opentelemetry.io/otel/attribute/key.go deleted file mode 100644 index 492c438a9f..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/key.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright The OpenTelemetry 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 attribute // import "go.opentelemetry.io/otel/attribute" - -// Key represents the key part in key-value pairs. It's a string. The -// allowed character set in the key depends on the use of the key. -type Key string - -// Bool creates a KeyValue instance with a BOOL Value. -// -// If creating both key and a bool value at the same time, then -// instead of calling Key(name).Bool(value) consider using a -// convenience function provided by the api/key package - -// key.Bool(name, value). -func (k Key) Bool(v bool) KeyValue { - return KeyValue{ - Key: k, - Value: BoolValue(v), - } -} - -// Int64 creates a KeyValue instance with an INT64 Value. -// -// If creating both key and an int64 value at the same time, then -// instead of calling Key(name).Int64(value) consider using a -// convenience function provided by the api/key package - -// key.Int64(name, value). -func (k Key) Int64(v int64) KeyValue { - return KeyValue{ - Key: k, - Value: Int64Value(v), - } -} - -// Float64 creates a KeyValue instance with a FLOAT64 Value. -// -// If creating both key and a float64 value at the same time, then -// instead of calling Key(name).Float64(value) consider using a -// convenience function provided by the api/key package - -// key.Float64(name, value). -func (k Key) Float64(v float64) KeyValue { - return KeyValue{ - Key: k, - Value: Float64Value(v), - } -} - -// String creates a KeyValue instance with a STRING Value. -// -// If creating both key and a string value at the same time, then -// instead of calling Key(name).String(value) consider using a -// convenience function provided by the api/key package - -// key.String(name, value). -func (k Key) String(v string) KeyValue { - return KeyValue{ - Key: k, - Value: StringValue(v), - } -} - -// Int creates a KeyValue instance with an INT64 Value. -// -// If creating both key and an int value at the same time, then -// instead of calling Key(name).Int(value) consider using a -// convenience function provided by the api/key package - -// key.Int(name, value). -func (k Key) Int(v int) KeyValue { - return KeyValue{ - Key: k, - Value: IntValue(v), - } -} - -// Defined returns true for non-empty keys. -func (k Key) Defined() bool { - return len(k) != 0 -} - -// Array creates a KeyValue instance with a ARRAY Value. -// -// If creating both key and a array value at the same time, then -// instead of calling Key(name).String(value) consider using a -// convenience function provided by the api/key package - -// key.Array(name, value). -func (k Key) Array(v interface{}) KeyValue { - return KeyValue{ - Key: k, - Value: ArrayValue(v), - } -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/kv.go b/vendor/go.opentelemetry.io/otel/attribute/kv.go deleted file mode 100644 index 2fcc8863f7..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/kv.go +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright The OpenTelemetry 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 attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "encoding/json" - "fmt" - "reflect" -) - -// KeyValue holds a key and value pair. -type KeyValue struct { - Key Key - Value Value -} - -// Valid returns if kv is a valid OpenTelemetry attribute. -func (kv KeyValue) Valid() bool { - return kv.Key != "" && kv.Value.Type() != INVALID -} - -// Bool creates a new key-value pair with a passed name and a bool -// value. -func Bool(k string, v bool) KeyValue { - return Key(k).Bool(v) -} - -// Int64 creates a new key-value pair with a passed name and an int64 -// value. -func Int64(k string, v int64) KeyValue { - return Key(k).Int64(v) -} - -// Float64 creates a new key-value pair with a passed name and a float64 -// value. -func Float64(k string, v float64) KeyValue { - return Key(k).Float64(v) -} - -// String creates a new key-value pair with a passed name and a string -// value. -func String(k, v string) KeyValue { - return Key(k).String(v) -} - -// Stringer creates a new key-value pair with a passed name and a string -// value generated by the passed Stringer interface. -func Stringer(k string, v fmt.Stringer) KeyValue { - return Key(k).String(v.String()) -} - -// Int creates a new key-value pair instance with a passed name and -// either an int32 or an int64 value, depending on whether the int -// type is 32 or 64 bits wide. -func Int(k string, v int) KeyValue { - return Key(k).Int(v) -} - -// Array creates a new key-value pair with a passed name and a array. -// Only arrays of primitive type are supported. -func Array(k string, v interface{}) KeyValue { - return Key(k).Array(v) -} - -// Any creates a new key-value pair instance with a passed name and -// automatic type inference. This is slower, and not type-safe. -func Any(k string, value interface{}) KeyValue { - if value == nil { - return String(k, "<nil>") - } - - if stringer, ok := value.(fmt.Stringer); ok { - return String(k, stringer.String()) - } - - rv := reflect.ValueOf(value) - - switch rv.Kind() { - case reflect.Array, reflect.Slice: - return Array(k, value) - case reflect.Bool: - return Bool(k, rv.Bool()) - case reflect.Int, reflect.Int8, reflect.Int16: - return Int(k, int(rv.Int())) - case reflect.Int64: - return Int64(k, rv.Int()) - case reflect.Float64: - return Float64(k, rv.Float()) - case reflect.String: - return String(k, rv.String()) - } - if b, err := json.Marshal(value); b != nil && err == nil { - return String(k, string(b)) - } - return String(k, fmt.Sprint(value)) -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/set.go b/vendor/go.opentelemetry.io/otel/attribute/set.go deleted file mode 100644 index 882dc112f7..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/set.go +++ /dev/null @@ -1,471 +0,0 @@ -// Copyright The OpenTelemetry 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 attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "encoding/json" - "reflect" - "sort" - "sync" -) - -type ( - // Set is the representation for a distinct label set. It - // manages an immutable set of labels, with an internal cache - // for storing label encodings. - // - // This type supports the `Equivalent` method of comparison - // using values of type `Distinct`. - // - // This type is used to implement: - // 1. Metric labels - // 2. Resource sets - // 3. Correlation map (TODO) - Set struct { - equivalent Distinct - - lock sync.Mutex - encoders [maxConcurrentEncoders]EncoderID - encoded [maxConcurrentEncoders]string - } - - // Distinct wraps a variable-size array of `KeyValue`, - // constructed with keys in sorted order. This can be used as - // a map key or for equality checking between Sets. - Distinct struct { - iface interface{} - } - - // Filter supports removing certain labels from label sets. - // When the filter returns true, the label will be kept in - // the filtered label set. When the filter returns false, the - // label is excluded from the filtered label set, and the - // label instead appears in the `removed` list of excluded labels. - Filter func(KeyValue) bool - - // Sortable implements `sort.Interface`, used for sorting - // `KeyValue`. This is an exported type to support a - // memory optimization. A pointer to one of these is needed - // for the call to `sort.Stable()`, which the caller may - // provide in order to avoid an allocation. See - // `NewSetWithSortable()`. - Sortable []KeyValue -) - -var ( - // keyValueType is used in `computeDistinctReflect`. - keyValueType = reflect.TypeOf(KeyValue{}) - - // emptySet is returned for empty label sets. - emptySet = &Set{ - equivalent: Distinct{ - iface: [0]KeyValue{}, - }, - } -) - -const maxConcurrentEncoders = 3 - -// EmptySet returns a reference to a Set with no elements. -// -// This is a convenience provided for optimized calling utility. -func EmptySet() *Set { - return emptySet -} - -// reflect abbreviates `reflect.ValueOf`. -func (d Distinct) reflect() reflect.Value { - return reflect.ValueOf(d.iface) -} - -// Valid returns true if this value refers to a valid `*Set`. -func (d Distinct) Valid() bool { - return d.iface != nil -} - -// Len returns the number of labels in this set. -func (l *Set) Len() int { - if l == nil || !l.equivalent.Valid() { - return 0 - } - return l.equivalent.reflect().Len() -} - -// Get returns the KeyValue at ordered position `idx` in this set. -func (l *Set) Get(idx int) (KeyValue, bool) { - if l == nil { - return KeyValue{}, false - } - value := l.equivalent.reflect() - - if idx >= 0 && idx < value.Len() { - // Note: The Go compiler successfully avoids an allocation for - // the interface{} conversion here: - return value.Index(idx).Interface().(KeyValue), true - } - - return KeyValue{}, false -} - -// Value returns the value of a specified key in this set. -func (l *Set) Value(k Key) (Value, bool) { - if l == nil { - return Value{}, false - } - rValue := l.equivalent.reflect() - vlen := rValue.Len() - - idx := sort.Search(vlen, func(idx int) bool { - return rValue.Index(idx).Interface().(KeyValue).Key >= k - }) - if idx >= vlen { - return Value{}, false - } - keyValue := rValue.Index(idx).Interface().(KeyValue) - if k == keyValue.Key { - return keyValue.Value, true - } - return Value{}, false -} - -// HasValue tests whether a key is defined in this set. -func (l *Set) HasValue(k Key) bool { - if l == nil { - return false - } - _, ok := l.Value(k) - return ok -} - -// Iter returns an iterator for visiting the labels in this set. -func (l *Set) Iter() Iterator { - return Iterator{ - storage: l, - idx: -1, - } -} - -// ToSlice returns the set of labels belonging to this set, sorted, -// where keys appear no more than once. -func (l *Set) ToSlice() []KeyValue { - iter := l.Iter() - return iter.ToSlice() -} - -// Equivalent returns a value that may be used as a map key. The -// Distinct type guarantees that the result will equal the equivalent -// Distinct value of any label set with the same elements as this, -// where sets are made unique by choosing the last value in the input -// for any given key. -func (l *Set) Equivalent() Distinct { - if l == nil || !l.equivalent.Valid() { - return emptySet.equivalent - } - return l.equivalent -} - -// Equals returns true if the argument set is equivalent to this set. -func (l *Set) Equals(o *Set) bool { - return l.Equivalent() == o.Equivalent() -} - -// Encoded returns the encoded form of this set, according to -// `encoder`. The result will be cached in this `*Set`. -func (l *Set) Encoded(encoder Encoder) string { - if l == nil || encoder == nil { - return "" - } - - id := encoder.ID() - if !id.Valid() { - // Invalid IDs are not cached. - return encoder.Encode(l.Iter()) - } - - var lookup *string - l.lock.Lock() - for idx := 0; idx < maxConcurrentEncoders; idx++ { - if l.encoders[idx] == id { - lookup = &l.encoded[idx] - break - } - } - l.lock.Unlock() - - if lookup != nil { - return *lookup - } - - r := encoder.Encode(l.Iter()) - - l.lock.Lock() - defer l.lock.Unlock() - - for idx := 0; idx < maxConcurrentEncoders; idx++ { - if l.encoders[idx] == id { - return l.encoded[idx] - } - if !l.encoders[idx].Valid() { - l.encoders[idx] = id - l.encoded[idx] = r - return r - } - } - - // TODO: This is a performance cliff. Find a way for this to - // generate a warning. - return r -} - -func empty() Set { - return Set{ - equivalent: emptySet.equivalent, - } -} - -// NewSet returns a new `Set`. See the documentation for -// `NewSetWithSortableFiltered` for more details. -// -// Except for empty sets, this method adds an additional allocation -// compared with calls that include a `*Sortable`. -func NewSet(kvs ...KeyValue) Set { - // Check for empty set. - if len(kvs) == 0 { - return empty() - } - s, _ := NewSetWithSortableFiltered(kvs, new(Sortable), nil) - return s //nolint -} - -// NewSetWithSortable returns a new `Set`. See the documentation for -// `NewSetWithSortableFiltered` for more details. -// -// This call includes a `*Sortable` option as a memory optimization. -func NewSetWithSortable(kvs []KeyValue, tmp *Sortable) Set { - // Check for empty set. - if len(kvs) == 0 { - return empty() - } - s, _ := NewSetWithSortableFiltered(kvs, tmp, nil) - return s //nolint -} - -// NewSetWithFiltered returns a new `Set`. See the documentation for -// `NewSetWithSortableFiltered` for more details. -// -// This call includes a `Filter` to include/exclude label keys from -// the return value. Excluded keys are returned as a slice of label -// values. -func NewSetWithFiltered(kvs []KeyValue, filter Filter) (Set, []KeyValue) { - // Check for empty set. - if len(kvs) == 0 { - return empty(), nil - } - return NewSetWithSortableFiltered(kvs, new(Sortable), filter) -} - -// NewSetWithSortableFiltered returns a new `Set`. -// -// Duplicate keys are eliminated by taking the last value. This -// re-orders the input slice so that unique last-values are contiguous -// at the end of the slice. -// -// This ensures the following: -// -// - Last-value-wins semantics -// - Caller sees the reordering, but doesn't lose values -// - Repeated call preserve last-value wins. -// -// Note that methods are defined on `*Set`, although this returns `Set`. -// Callers can avoid memory allocations by: -// -// - allocating a `Sortable` for use as a temporary in this method -// - allocating a `Set` for storing the return value of this -// constructor. -// -// The result maintains a cache of encoded labels, by attribute.EncoderID. -// This value should not be copied after its first use. -// -// The second `[]KeyValue` return value is a list of labels that were -// excluded by the Filter (if non-nil). -func NewSetWithSortableFiltered(kvs []KeyValue, tmp *Sortable, filter Filter) (Set, []KeyValue) { - // Check for empty set. - if len(kvs) == 0 { - return empty(), nil - } - - *tmp = kvs - - // Stable sort so the following de-duplication can implement - // last-value-wins semantics. - sort.Stable(tmp) - - *tmp = nil - - position := len(kvs) - 1 - offset := position - 1 - - // The requirements stated above require that the stable - // result be placed in the end of the input slice, while - // overwritten values are swapped to the beginning. - // - // De-duplicate with last-value-wins semantics. Preserve - // duplicate values at the beginning of the input slice. - for ; offset >= 0; offset-- { - if kvs[offset].Key == kvs[position].Key { - continue - } - position-- - kvs[offset], kvs[position] = kvs[position], kvs[offset] - } - if filter != nil { - return filterSet(kvs[position:], filter) - } - return Set{ - equivalent: computeDistinct(kvs[position:]), - }, nil -} - -// filterSet reorders `kvs` so that included keys are contiguous at -// the end of the slice, while excluded keys precede the included keys. -func filterSet(kvs []KeyValue, filter Filter) (Set, []KeyValue) { - var excluded []KeyValue - - // Move labels that do not match the filter so - // they're adjacent before calling computeDistinct(). - distinctPosition := len(kvs) - - // Swap indistinct keys forward and distinct keys toward the - // end of the slice. - offset := len(kvs) - 1 - for ; offset >= 0; offset-- { - if filter(kvs[offset]) { - distinctPosition-- - kvs[offset], kvs[distinctPosition] = kvs[distinctPosition], kvs[offset] - continue - } - } - excluded = kvs[:distinctPosition] - - return Set{ - equivalent: computeDistinct(kvs[distinctPosition:]), - }, excluded -} - -// Filter returns a filtered copy of this `Set`. See the -// documentation for `NewSetWithSortableFiltered` for more details. -func (l *Set) Filter(re Filter) (Set, []KeyValue) { - if re == nil { - return Set{ - equivalent: l.equivalent, - }, nil - } - - // Note: This could be refactored to avoid the temporary slice - // allocation, if it proves to be expensive. - return filterSet(l.ToSlice(), re) -} - -// computeDistinct returns a `Distinct` using either the fixed- or -// reflect-oriented code path, depending on the size of the input. -// The input slice is assumed to already be sorted and de-duplicated. -func computeDistinct(kvs []KeyValue) Distinct { - iface := computeDistinctFixed(kvs) - if iface == nil { - iface = computeDistinctReflect(kvs) - } - return Distinct{ - iface: iface, - } -} - -// computeDistinctFixed computes a `Distinct` for small slices. It -// returns nil if the input is too large for this code path. -func computeDistinctFixed(kvs []KeyValue) interface{} { - switch len(kvs) { - case 1: - ptr := new([1]KeyValue) - copy((*ptr)[:], kvs) - return *ptr - case 2: - ptr := new([2]KeyValue) - copy((*ptr)[:], kvs) - return *ptr - case 3: - ptr := new([3]KeyValue) - copy((*ptr)[:], kvs) - return *ptr - case 4: - ptr := new([4]KeyValue) - copy((*ptr)[:], kvs) - return *ptr - case 5: - ptr := new([5]KeyValue) - copy((*ptr)[:], kvs) - return *ptr - case 6: - ptr := new([6]KeyValue) - copy((*ptr)[:], kvs) - return *ptr - case 7: - ptr := new([7]KeyValue) - copy((*ptr)[:], kvs) - return *ptr - case 8: - ptr := new([8]KeyValue) - copy((*ptr)[:], kvs) - return *ptr - case 9: - ptr := new([9]KeyValue) - copy((*ptr)[:], kvs) - return *ptr - case 10: - ptr := new([10]KeyValue) - copy((*ptr)[:], kvs) - return *ptr - default: - return nil - } -} - -// computeDistinctReflect computes a `Distinct` using reflection, -// works for any size input. -func computeDistinctReflect(kvs []KeyValue) interface{} { - at := reflect.New(reflect.ArrayOf(len(kvs), keyValueType)).Elem() - for i, keyValue := range kvs { - *(at.Index(i).Addr().Interface().(*KeyValue)) = keyValue - } - return at.Interface() -} - -// MarshalJSON returns the JSON encoding of the `*Set`. -func (l *Set) MarshalJSON() ([]byte, error) { - return json.Marshal(l.equivalent.iface) -} - -// Len implements `sort.Interface`. -func (l *Sortable) Len() int { - return len(*l) -} - -// Swap implements `sort.Interface`. -func (l *Sortable) Swap(i, j int) { - (*l)[i], (*l)[j] = (*l)[j], (*l)[i] -} - -// Less implements `sort.Interface`. -func (l *Sortable) Less(i, j int) bool { - return (*l)[i].Key < (*l)[j].Key -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/type_string.go b/vendor/go.opentelemetry.io/otel/attribute/type_string.go deleted file mode 100644 index 1f2c7dccfa..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/type_string.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by "stringer -type=Type"; DO NOT EDIT. - -package attribute - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[INVALID-0] - _ = x[BOOL-1] - _ = x[INT64-2] - _ = x[FLOAT64-3] - _ = x[STRING-4] - _ = x[ARRAY-5] -} - -const _Type_name = "INVALIDBOOLINT64FLOAT64STRINGARRAY" - -var _Type_index = [...]uint8{0, 7, 11, 16, 23, 29, 34} - -func (i Type) String() string { - if i < 0 || i >= Type(len(_Type_index)-1) { - return "Type(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _Type_name[_Type_index[i]:_Type_index[i+1]] -} diff --git a/vendor/go.opentelemetry.io/otel/attribute/value.go b/vendor/go.opentelemetry.io/otel/attribute/value.go deleted file mode 100644 index 7b979409e3..0000000000 --- a/vendor/go.opentelemetry.io/otel/attribute/value.go +++ /dev/null @@ -1,204 +0,0 @@ -// Copyright The OpenTelemetry 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 attribute // import "go.opentelemetry.io/otel/attribute" - -import ( - "encoding/json" - "fmt" - "reflect" - "strconv" - - "go.opentelemetry.io/otel/internal" -) - -//go:generate stringer -type=Type - -// Type describes the type of the data Value holds. -type Type int - -// Value represents the value part in key-value pairs. -type Value struct { - vtype Type - numeric uint64 - stringly string - // TODO Lazy value type? - - array interface{} -} - -const ( - // INVALID is used for a Value with no value set. - INVALID Type = iota - // BOOL is a boolean Type Value. - BOOL - // INT64 is a 64-bit signed integral Type Value. - INT64 - // FLOAT64 is a 64-bit floating point Type Value. - FLOAT64 - // STRING is a string Type Value. - STRING - // ARRAY is an array Type Value used to store 1-dimensional slices or - // arrays of bool, int, int32, int64, uint, uint32, uint64, float, - // float32, float64, or string types. - ARRAY -) - -// BoolValue creates a BOOL Value. -func BoolValue(v bool) Value { - return Value{ - vtype: BOOL, - numeric: internal.BoolToRaw(v), - } -} - -// Int64Value creates an INT64 Value. -func Int64Value(v int64) Value { - return Value{ - vtype: INT64, - numeric: internal.Int64ToRaw(v), - } -} - -// Float64Value creates a FLOAT64 Value. -func Float64Value(v float64) Value { - return Value{ - vtype: FLOAT64, - numeric: internal.Float64ToRaw(v), - } -} - -// StringValue creates a STRING Value. -func StringValue(v string) Value { - return Value{ - vtype: STRING, - stringly: v, - } -} - -// IntValue creates an INT64 Value. -func IntValue(v int) Value { - return Int64Value(int64(v)) -} - -// ArrayValue creates an ARRAY value from an array or slice. -// Only arrays or slices of bool, int, int64, float, float64, or string types are allowed. -// Specifically, arrays and slices can not contain other arrays, slices, structs, or non-standard -// types. If the passed value is not an array or slice of these types an -// INVALID value is returned. -func ArrayValue(v interface{}) Value { - switch reflect.TypeOf(v).Kind() { - case reflect.Array, reflect.Slice: - // get array type regardless of dimensions - typ := reflect.TypeOf(v).Elem() - kind := typ.Kind() - switch kind { - case reflect.Bool, reflect.Int, reflect.Int64, - reflect.Float64, reflect.String: - val := reflect.ValueOf(v) - length := val.Len() - frozen := reflect.Indirect(reflect.New(reflect.ArrayOf(length, typ))) - reflect.Copy(frozen, val) - return Value{ - vtype: ARRAY, - array: frozen.Interface(), - } - default: - return Value{vtype: INVALID} - } - } - return Value{vtype: INVALID} -} - -// Type returns a type of the Value. -func (v Value) Type() Type { - return v.vtype -} - -// AsBool returns the bool value. Make sure that the Value's type is -// BOOL. -func (v Value) AsBool() bool { - return internal.RawToBool(v.numeric) -} - -// AsInt64 returns the int64 value. Make sure that the Value's type is -// INT64. -func (v Value) AsInt64() int64 { - return internal.RawToInt64(v.numeric) -} - -// AsFloat64 returns the float64 value. Make sure that the Value's -// type is FLOAT64. -func (v Value) AsFloat64() float64 { - return internal.RawToFloat64(v.numeric) -} - -// AsString returns the string value. Make sure that the Value's type -// is STRING. -func (v Value) AsString() string { - return v.stringly -} - -// AsArray returns the array Value as an interface{}. -func (v Value) AsArray() interface{} { - return v.array -} - -type unknownValueType struct{} - -// AsInterface returns Value's data as interface{}. -func (v Value) AsInterface() interface{} { - switch v.Type() { - case ARRAY: - return v.AsArray() - case BOOL: - return v.AsBool() - case INT64: - return v.AsInt64() - case FLOAT64: - return v.AsFloat64() - case STRING: - return v.stringly - } - return unknownValueType{} -} - -// Emit returns a string representation of Value's data. -func (v Value) Emit() string { - switch v.Type() { - case ARRAY: - return fmt.Sprint(v.array) - case BOOL: - return strconv.FormatBool(v.AsBool()) - case INT64: - return strconv.FormatInt(v.AsInt64(), 10) - case FLOAT64: - return fmt.Sprint(v.AsFloat64()) - case STRING: - return v.stringly - default: - return "unknown" - } -} - -// MarshalJSON returns the JSON encoding of the Value. -func (v Value) MarshalJSON() ([]byte, error) { - var jsonVal struct { - Type string - Value interface{} - } - jsonVal.Type = v.Type().String() - jsonVal.Value = v.AsInterface() - return json.Marshal(jsonVal) -} diff --git a/vendor/go.opentelemetry.io/otel/codes/codes.go b/vendor/go.opentelemetry.io/otel/codes/codes.go deleted file mode 100644 index 064a9279fd..0000000000 --- a/vendor/go.opentelemetry.io/otel/codes/codes.go +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright The OpenTelemetry 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 codes // import "go.opentelemetry.io/otel/codes" - -import ( - "encoding/json" - "fmt" - "strconv" -) - -const ( - // Unset is the default status code. - Unset Code = 0 - // Error indicates the operation contains an error. - Error Code = 1 - // Ok indicates operation has been validated by an Application developers - // or Operator to have completed successfully, or contain no error. - Ok Code = 2 - - maxCode = 3 -) - -// Code is an 32-bit representation of a status state. -type Code uint32 - -var codeToStr = map[Code]string{ - Unset: "Unset", - Error: "Error", - Ok: "Ok", -} - -var strToCode = map[string]Code{ - `"Unset"`: Unset, - `"Error"`: Error, - `"Ok"`: Ok, -} - -// String returns the Code as a string. -func (c Code) String() string { - return codeToStr[c] -} - -// UnmarshalJSON unmarshals b into the Code. -// -// This is based on the functionality in the gRPC codes package: -// https://github.com/grpc/grpc-go/blob/bb64fee312b46ebee26be43364a7a966033521b1/codes/codes.go#L218-L244 -func (c *Code) UnmarshalJSON(b []byte) error { - // From json.Unmarshaler: By convention, to approximate the behavior of - // Unmarshal itself, Unmarshalers implement UnmarshalJSON([]byte("null")) as - // a no-op. - if string(b) == "null" { - return nil - } - if c == nil { - return fmt.Errorf("nil receiver passed to UnmarshalJSON") - } - - var x interface{} - if err := json.Unmarshal(b, &x); err != nil { - return err - } - switch x.(type) { - case string: - if jc, ok := strToCode[string(b)]; ok { - *c = jc - return nil - } - return fmt.Errorf("invalid code: %q", string(b)) - case float64: - if ci, err := strconv.ParseUint(string(b), 10, 32); err == nil { - if ci >= maxCode { - return fmt.Errorf("invalid code: %q", ci) - } - - *c = Code(ci) - return nil - } - return fmt.Errorf("invalid code: %q", string(b)) - default: - return fmt.Errorf("invalid code: %q", string(b)) - } -} - -// MarshalJSON returns c as the JSON encoding of c. -func (c *Code) MarshalJSON() ([]byte, error) { - if c == nil { - return []byte("null"), nil - } - str, ok := codeToStr[*c] - if !ok { - return nil, fmt.Errorf("invalid code: %d", *c) - } - return []byte(fmt.Sprintf("%q", str)), nil -} diff --git a/vendor/go.opentelemetry.io/otel/codes/doc.go b/vendor/go.opentelemetry.io/otel/codes/doc.go deleted file mode 100644 index fcf89ba1ac..0000000000 --- a/vendor/go.opentelemetry.io/otel/codes/doc.go +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright The OpenTelemetry 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 codes defines the canonical error codes used by OpenTelemetry. - -This package is currently in a pre-GA phase. Backwards incompatible changes -may be introduced in subsequent minor version releases as we work to track -the evolving OpenTelemetry specification and user feedback. - -It conforms to [the OpenTelemetry -specification](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#statuscanonicalcode). -*/ -package codes // import "go.opentelemetry.io/otel/codes" diff --git a/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go b/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go deleted file mode 100644 index b1f7daf8d8..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/baggage/baggage.go +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright The OpenTelemetry 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 baggage provides types and functions to manage W3C Baggage. -package baggage - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" -) - -type rawMap map[attribute.Key]attribute.Value -type keySet map[attribute.Key]struct{} - -// Map is an immutable storage for correlations. -type Map struct { - m rawMap -} - -// MapUpdate contains information about correlation changes to be -// made. -type MapUpdate struct { - // DropSingleK contains a single key to be dropped from - // correlations. Use this to avoid an overhead of a slice - // allocation if there is only one key to drop. - DropSingleK attribute.Key - // DropMultiK contains all the keys to be dropped from - // correlations. - DropMultiK []attribute.Key - - // SingleKV contains a single key-value pair to be added to - // correlations. Use this to avoid an overhead of a slice - // allocation if there is only one key-value pair to add. - SingleKV attribute.KeyValue - // MultiKV contains all the key-value pairs to be added to - // correlations. - MultiKV []attribute.KeyValue -} - -func newMap(raw rawMap) Map { - return Map{ - m: raw, - } -} - -// NewEmptyMap creates an empty correlations map. -func NewEmptyMap() Map { - return newMap(nil) -} - -// NewMap creates a map with the contents of the update applied. In -// this function, having an update with DropSingleK or DropMultiK -// makes no sense - those fields are effectively ignored. -func NewMap(update MapUpdate) Map { - return NewEmptyMap().Apply(update) -} - -// Apply creates a copy of the map with the contents of the update -// applied. Apply will first drop the keys from DropSingleK and -// DropMultiK, then add key-value pairs from SingleKV and MultiKV. -func (m Map) Apply(update MapUpdate) Map { - delSet, addSet := getModificationSets(update) - mapSize := getNewMapSize(m.m, delSet, addSet) - - r := make(rawMap, mapSize) - for k, v := range m.m { - // do not copy items we want to drop - if _, ok := delSet[k]; ok { - continue - } - // do not copy items we would overwrite - if _, ok := addSet[k]; ok { - continue - } - r[k] = v - } - if update.SingleKV.Key.Defined() { - r[update.SingleKV.Key] = update.SingleKV.Value - } - for _, kv := range update.MultiKV { - r[kv.Key] = kv.Value - } - if len(r) == 0 { - r = nil - } - return newMap(r) -} - -func getModificationSets(update MapUpdate) (delSet, addSet keySet) { - deletionsCount := len(update.DropMultiK) - if update.DropSingleK.Defined() { - deletionsCount++ - } - if deletionsCount > 0 { - delSet = make(map[attribute.Key]struct{}, deletionsCount) - for _, k := range update.DropMultiK { - delSet[k] = struct{}{} - } - if update.DropSingleK.Defined() { - delSet[update.DropSingleK] = struct{}{} - } - } - - additionsCount := len(update.MultiKV) - if update.SingleKV.Key.Defined() { - additionsCount++ - } - if additionsCount > 0 { - addSet = make(map[attribute.Key]struct{}, additionsCount) - for _, k := range update.MultiKV { - addSet[k.Key] = struct{}{} - } - if update.SingleKV.Key.Defined() { - addSet[update.SingleKV.Key] = struct{}{} - } - } - - return -} - -func getNewMapSize(m rawMap, delSet, addSet keySet) int { - mapSizeDiff := 0 - for k := range addSet { - if _, ok := m[k]; !ok { - mapSizeDiff++ - } - } - for k := range delSet { - if _, ok := m[k]; ok { - if _, inAddSet := addSet[k]; !inAddSet { - mapSizeDiff-- - } - } - } - return len(m) + mapSizeDiff -} - -// Value gets a value from correlations map and returns a boolean -// value indicating whether the key exist in the map. -func (m Map) Value(k attribute.Key) (attribute.Value, bool) { - value, ok := m.m[k] - return value, ok -} - -// HasValue returns a boolean value indicating whether the key exist -// in the map. -func (m Map) HasValue(k attribute.Key) bool { - _, has := m.Value(k) - return has -} - -// Len returns a length of the map. -func (m Map) Len() int { - return len(m.m) -} - -// Foreach calls a passed callback once on each key-value pair until -// all the key-value pairs of the map were iterated or the callback -// returns false, whichever happens first. -func (m Map) Foreach(f func(attribute.KeyValue) bool) { - for k, v := range m.m { - if !f(attribute.KeyValue{ - Key: k, - Value: v, - }) { - return - } - } -} - -type correlationsType struct{} - -// SetHookFunc describes a type of a callback that is called when -// storing baggage in the context. -type SetHookFunc func(context.Context) context.Context - -// GetHookFunc describes a type of a callback that is called when -// getting baggage from the context. -type GetHookFunc func(context.Context, Map) Map - -// value under this key is either of type Map or correlationsData -var correlationsKey = &correlationsType{} - -type correlationsData struct { - m Map - setHook SetHookFunc - getHook GetHookFunc -} - -func (d correlationsData) isHookless() bool { - return d.setHook == nil && d.getHook == nil -} - -type hookKind int - -const ( - hookKindSet hookKind = iota - hookKindGet -) - -func (d *correlationsData) overrideHook(kind hookKind, setHook SetHookFunc, getHook GetHookFunc) { - switch kind { - case hookKindSet: - d.setHook = setHook - case hookKindGet: - d.getHook = getHook - } -} - -// ContextWithSetHook installs a hook function that will be invoked -// every time ContextWithMap is called. To avoid unnecessary callback -// invocations (recursive or not), the callback can temporarily clear -// the hooks from the context with the ContextWithNoHooks function. -// -// Note that NewContext also calls ContextWithMap, so the hook will be -// invoked. -// -// Passing nil SetHookFunc creates a context with no set hook to call. -// -// This function should not be used by applications or libraries. It -// is mostly for interoperation with other observability APIs. -func ContextWithSetHook(ctx context.Context, hook SetHookFunc) context.Context { - return contextWithHook(ctx, hookKindSet, hook, nil) -} - -// ContextWithGetHook installs a hook function that will be invoked -// every time MapFromContext is called. To avoid unnecessary callback -// invocations (recursive or not), the callback can temporarily clear -// the hooks from the context with the ContextWithNoHooks function. -// -// Note that NewContext also calls MapFromContext, so the hook will be -// invoked. -// -// Passing nil GetHookFunc creates a context with no get hook to call. -// -// This function should not be used by applications or libraries. It -// is mostly for interoperation with other observability APIs. -func ContextWithGetHook(ctx context.Context, hook GetHookFunc) context.Context { - return contextWithHook(ctx, hookKindGet, nil, hook) -} - -func contextWithHook(ctx context.Context, kind hookKind, setHook SetHookFunc, getHook GetHookFunc) context.Context { - switch v := ctx.Value(correlationsKey).(type) { - case correlationsData: - v.overrideHook(kind, setHook, getHook) - if v.isHookless() { - return context.WithValue(ctx, correlationsKey, v.m) - } - return context.WithValue(ctx, correlationsKey, v) - case Map: - return contextWithOneHookAndMap(ctx, kind, setHook, getHook, v) - default: - m := NewEmptyMap() - return contextWithOneHookAndMap(ctx, kind, setHook, getHook, m) - } -} - -func contextWithOneHookAndMap(ctx context.Context, kind hookKind, setHook SetHookFunc, getHook GetHookFunc, m Map) context.Context { - d := correlationsData{m: m} - d.overrideHook(kind, setHook, getHook) - if d.isHookless() { - return ctx - } - return context.WithValue(ctx, correlationsKey, d) -} - -// ContextWithNoHooks creates a context with all the hooks -// disabled. Also returns old set and get hooks. This function can be -// used to temporarily clear the context from hooks and then reinstate -// them by calling ContextWithSetHook and ContextWithGetHook functions -// passing the hooks returned by this function. -// -// This function should not be used by applications or libraries. It -// is mostly for interoperation with other observability APIs. -func ContextWithNoHooks(ctx context.Context) (context.Context, SetHookFunc, GetHookFunc) { - switch v := ctx.Value(correlationsKey).(type) { - case correlationsData: - return context.WithValue(ctx, correlationsKey, v.m), v.setHook, v.getHook - default: - return ctx, nil, nil - } -} - -// ContextWithMap returns a context with the Map entered into it. -func ContextWithMap(ctx context.Context, m Map) context.Context { - switch v := ctx.Value(correlationsKey).(type) { - case correlationsData: - v.m = m - ctx = context.WithValue(ctx, correlationsKey, v) - if v.setHook != nil { - ctx = v.setHook(ctx) - } - return ctx - default: - return context.WithValue(ctx, correlationsKey, m) - } -} - -// ContextWithNoCorrelationData returns a context stripped of correlation -// data. -func ContextWithNoCorrelationData(ctx context.Context) context.Context { - return context.WithValue(ctx, correlationsKey, nil) -} - -// NewContext returns a context with the map from passed context -// updated with the passed key-value pairs. -func NewContext(ctx context.Context, keyvalues ...attribute.KeyValue) context.Context { - return ContextWithMap(ctx, MapFromContext(ctx).Apply(MapUpdate{ - MultiKV: keyvalues, - })) -} - -// MapFromContext gets the current Map from a Context. -func MapFromContext(ctx context.Context) Map { - switch v := ctx.Value(correlationsKey).(type) { - case correlationsData: - if v.getHook != nil { - return v.getHook(ctx, v.m) - } - return v.m - case Map: - return v - default: - return NewEmptyMap() - } -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/meter.go b/vendor/go.opentelemetry.io/otel/internal/global/meter.go deleted file mode 100644 index 36f9edeb8c..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/global/meter.go +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright The OpenTelemetry 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 global - -import ( - "context" - "sync" - "sync/atomic" - "unsafe" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/number" - "go.opentelemetry.io/otel/metric/registry" -) - -// This file contains the forwarding implementation of MeterProvider used as -// the default global instance. Metric events using instruments provided by -// this implementation are no-ops until the first Meter implementation is set -// as the global provider. -// -// The implementation here uses Mutexes to maintain a list of active Meters in -// the MeterProvider and Instruments in each Meter, under the assumption that -// these interfaces are not performance-critical. -// -// We have the invariant that setDelegate() will be called before a new -// MeterProvider implementation is registered as the global provider. Mutexes -// in the MeterProvider and Meters ensure that each instrument has a delegate -// before the global provider is set. -// -// Bound instrument operations are implemented by delegating to the -// instrument after it is registered, with a sync.Once initializer to -// protect against races with Release(). -// -// Metric uniqueness checking is implemented by calling the exported -// methods of the api/metric/registry package. - -type meterKey struct { - Name, Version string -} - -type meterProvider struct { - delegate metric.MeterProvider - - // lock protects `delegate` and `meters`. - lock sync.Mutex - - // meters maintains a unique entry for every named Meter - // that has been registered through the global instance. - meters map[meterKey]*meterEntry -} - -type meterImpl struct { - delegate unsafe.Pointer // (*metric.MeterImpl) - - lock sync.Mutex - syncInsts []*syncImpl - asyncInsts []*asyncImpl -} - -type meterEntry struct { - unique metric.MeterImpl - impl meterImpl -} - -type instrument struct { - descriptor metric.Descriptor -} - -type syncImpl struct { - delegate unsafe.Pointer // (*metric.SyncImpl) - - instrument -} - -type asyncImpl struct { - delegate unsafe.Pointer // (*metric.AsyncImpl) - - instrument - - runner metric.AsyncRunner -} - -// SyncImpler is implemented by all of the sync metric -// instruments. -type SyncImpler interface { - SyncImpl() metric.SyncImpl -} - -// AsyncImpler is implemented by all of the async -// metric instruments. -type AsyncImpler interface { - AsyncImpl() metric.AsyncImpl -} - -type syncHandle struct { - delegate unsafe.Pointer // (*metric.BoundInstrumentImpl) - - inst *syncImpl - labels []attribute.KeyValue - - initialize sync.Once -} - -var _ metric.MeterProvider = &meterProvider{} -var _ metric.MeterImpl = &meterImpl{} -var _ metric.InstrumentImpl = &syncImpl{} -var _ metric.BoundSyncImpl = &syncHandle{} -var _ metric.AsyncImpl = &asyncImpl{} - -func (inst *instrument) Descriptor() metric.Descriptor { - return inst.descriptor -} - -// MeterProvider interface and delegation - -func newMeterProvider() *meterProvider { - return &meterProvider{ - meters: map[meterKey]*meterEntry{}, - } -} - -func (p *meterProvider) setDelegate(provider metric.MeterProvider) { - p.lock.Lock() - defer p.lock.Unlock() - - p.delegate = provider - for key, entry := range p.meters { - entry.impl.setDelegate(key.Name, key.Version, provider) - } - p.meters = nil -} - -func (p *meterProvider) Meter(instrumentationName string, opts ...metric.MeterOption) metric.Meter { - p.lock.Lock() - defer p.lock.Unlock() - - if p.delegate != nil { - return p.delegate.Meter(instrumentationName, opts...) - } - - key := meterKey{ - Name: instrumentationName, - Version: metric.NewMeterConfig(opts...).InstrumentationVersion, - } - entry, ok := p.meters[key] - if !ok { - entry = &meterEntry{} - entry.unique = registry.NewUniqueInstrumentMeterImpl(&entry.impl) - p.meters[key] = entry - - } - return metric.WrapMeterImpl(entry.unique, key.Name, metric.WithInstrumentationVersion(key.Version)) -} - -// Meter interface and delegation - -func (m *meterImpl) setDelegate(name, version string, provider metric.MeterProvider) { - m.lock.Lock() - defer m.lock.Unlock() - - d := new(metric.MeterImpl) - *d = provider.Meter(name, metric.WithInstrumentationVersion(version)).MeterImpl() - m.delegate = unsafe.Pointer(d) - - for _, inst := range m.syncInsts { - inst.setDelegate(*d) - } - m.syncInsts = nil - for _, obs := range m.asyncInsts { - obs.setDelegate(*d) - } - m.asyncInsts = nil -} - -func (m *meterImpl) NewSyncInstrument(desc metric.Descriptor) (metric.SyncImpl, error) { - m.lock.Lock() - defer m.lock.Unlock() - - if meterPtr := (*metric.MeterImpl)(atomic.LoadPointer(&m.delegate)); meterPtr != nil { - return (*meterPtr).NewSyncInstrument(desc) - } - - inst := &syncImpl{ - instrument: instrument{ - descriptor: desc, - }, - } - m.syncInsts = append(m.syncInsts, inst) - return inst, nil -} - -// Synchronous delegation - -func (inst *syncImpl) setDelegate(d metric.MeterImpl) { - implPtr := new(metric.SyncImpl) - - var err error - *implPtr, err = d.NewSyncInstrument(inst.descriptor) - - if err != nil { - // TODO: There is no standard way to deliver this error to the user. - // See https://github.com/open-telemetry/opentelemetry-go/issues/514 - // Note that the default SDK will not generate any errors yet, this is - // only for added safety. - panic(err) - } - - atomic.StorePointer(&inst.delegate, unsafe.Pointer(implPtr)) -} - -func (inst *syncImpl) Implementation() interface{} { - if implPtr := (*metric.SyncImpl)(atomic.LoadPointer(&inst.delegate)); implPtr != nil { - return (*implPtr).Implementation() - } - return inst -} - -func (inst *syncImpl) Bind(labels []attribute.KeyValue) metric.BoundSyncImpl { - if implPtr := (*metric.SyncImpl)(atomic.LoadPointer(&inst.delegate)); implPtr != nil { - return (*implPtr).Bind(labels) - } - return &syncHandle{ - inst: inst, - labels: labels, - } -} - -func (bound *syncHandle) Unbind() { - bound.initialize.Do(func() {}) - - implPtr := (*metric.BoundSyncImpl)(atomic.LoadPointer(&bound.delegate)) - - if implPtr == nil { - return - } - - (*implPtr).Unbind() -} - -// Async delegation - -func (m *meterImpl) NewAsyncInstrument( - desc metric.Descriptor, - runner metric.AsyncRunner, -) (metric.AsyncImpl, error) { - - m.lock.Lock() - defer m.lock.Unlock() - - if meterPtr := (*metric.MeterImpl)(atomic.LoadPointer(&m.delegate)); meterPtr != nil { - return (*meterPtr).NewAsyncInstrument(desc, runner) - } - - inst := &asyncImpl{ - instrument: instrument{ - descriptor: desc, - }, - runner: runner, - } - m.asyncInsts = append(m.asyncInsts, inst) - return inst, nil -} - -func (obs *asyncImpl) Implementation() interface{} { - if implPtr := (*metric.AsyncImpl)(atomic.LoadPointer(&obs.delegate)); implPtr != nil { - return (*implPtr).Implementation() - } - return obs -} - -func (obs *asyncImpl) setDelegate(d metric.MeterImpl) { - implPtr := new(metric.AsyncImpl) - - var err error - *implPtr, err = d.NewAsyncInstrument(obs.descriptor, obs.runner) - - if err != nil { - // TODO: There is no standard way to deliver this error to the user. - // See https://github.com/open-telemetry/opentelemetry-go/issues/514 - // Note that the default SDK will not generate any errors yet, this is - // only for added safety. - panic(err) - } - - atomic.StorePointer(&obs.delegate, unsafe.Pointer(implPtr)) -} - -// Metric updates - -func (m *meterImpl) RecordBatch(ctx context.Context, labels []attribute.KeyValue, measurements ...metric.Measurement) { - if delegatePtr := (*metric.MeterImpl)(atomic.LoadPointer(&m.delegate)); delegatePtr != nil { - (*delegatePtr).RecordBatch(ctx, labels, measurements...) - } -} - -func (inst *syncImpl) RecordOne(ctx context.Context, number number.Number, labels []attribute.KeyValue) { - if instPtr := (*metric.SyncImpl)(atomic.LoadPointer(&inst.delegate)); instPtr != nil { - (*instPtr).RecordOne(ctx, number, labels) - } -} - -// Bound instrument initialization - -func (bound *syncHandle) RecordOne(ctx context.Context, number number.Number) { - instPtr := (*metric.SyncImpl)(atomic.LoadPointer(&bound.inst.delegate)) - if instPtr == nil { - return - } - var implPtr *metric.BoundSyncImpl - bound.initialize.Do(func() { - implPtr = new(metric.BoundSyncImpl) - *implPtr = (*instPtr).Bind(bound.labels) - atomic.StorePointer(&bound.delegate, unsafe.Pointer(implPtr)) - }) - if implPtr == nil { - implPtr = (*metric.BoundSyncImpl)(atomic.LoadPointer(&bound.delegate)) - } - // This may still be nil if instrument was created and bound - // without a delegate, then the instrument was set to have a - // delegate and unbound. - if implPtr == nil { - return - } - (*implPtr).RecordOne(ctx, number) -} - -func AtomicFieldOffsets() map[string]uintptr { - return map[string]uintptr{ - "meterProvider.delegate": unsafe.Offsetof(meterProvider{}.delegate), - "meterImpl.delegate": unsafe.Offsetof(meterImpl{}.delegate), - "syncImpl.delegate": unsafe.Offsetof(syncImpl{}.delegate), - "asyncImpl.delegate": unsafe.Offsetof(asyncImpl{}.delegate), - "syncHandle.delegate": unsafe.Offsetof(syncHandle{}.delegate), - } -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/propagator.go b/vendor/go.opentelemetry.io/otel/internal/global/propagator.go deleted file mode 100644 index 1c8b8589b0..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/global/propagator.go +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright The OpenTelemetry 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 global - -import ( - "context" - "sync" - - "go.opentelemetry.io/otel/propagation" -) - -// textMapPropagator is a default TextMapPropagator that delegates calls to a -// registered delegate if one is set, otherwise it defaults to delegating the -// calls to a the default no-op propagation.TextMapPropagator. -type textMapPropagator struct { - mtx sync.Mutex - once sync.Once - delegate propagation.TextMapPropagator - noop propagation.TextMapPropagator -} - -// Compile-time guarantee that textMapPropagator implements the -// propagation.TextMapPropagator interface. -var _ propagation.TextMapPropagator = (*textMapPropagator)(nil) - -func newTextMapPropagator() *textMapPropagator { - return &textMapPropagator{ - noop: propagation.NewCompositeTextMapPropagator(), - } -} - -// SetDelegate sets a delegate propagation.TextMapPropagator that all calls are -// forwarded to. Delegation can only be performed once, all subsequent calls -// perform no delegation. -func (p *textMapPropagator) SetDelegate(delegate propagation.TextMapPropagator) { - if delegate == nil { - return - } - - p.mtx.Lock() - p.once.Do(func() { p.delegate = delegate }) - p.mtx.Unlock() -} - -// effectiveDelegate returns the current delegate of p if one is set, -// otherwise the default noop TextMapPropagator is returned. This method -// can be called concurrently. -func (p *textMapPropagator) effectiveDelegate() propagation.TextMapPropagator { - p.mtx.Lock() - defer p.mtx.Unlock() - if p.delegate != nil { - return p.delegate - } - return p.noop -} - -// Inject set cross-cutting concerns from the Context into the carrier. -func (p *textMapPropagator) Inject(ctx context.Context, carrier propagation.TextMapCarrier) { - p.effectiveDelegate().Inject(ctx, carrier) -} - -// Extract reads cross-cutting concerns from the carrier into a Context. -func (p *textMapPropagator) Extract(ctx context.Context, carrier propagation.TextMapCarrier) context.Context { - return p.effectiveDelegate().Extract(ctx, carrier) -} - -// Fields returns the keys whose values are set with Inject. -func (p *textMapPropagator) Fields() []string { - return p.effectiveDelegate().Fields() -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/state.go b/vendor/go.opentelemetry.io/otel/internal/global/state.go deleted file mode 100644 index f3bf003510..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/global/state.go +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright The OpenTelemetry 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 global - -import ( - "sync" - "sync/atomic" - - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/propagation" - "go.opentelemetry.io/otel/trace" -) - -type ( - tracerProviderHolder struct { - tp trace.TracerProvider - } - - meterProviderHolder struct { - mp metric.MeterProvider - } - - propagatorsHolder struct { - tm propagation.TextMapPropagator - } -) - -var ( - globalTracer = defaultTracerValue() - globalMeter = defaultMeterValue() - globalPropagators = defaultPropagatorsValue() - - delegateMeterOnce sync.Once - delegateTraceOnce sync.Once - delegateTextMapPropagatorOnce sync.Once -) - -// TracerProvider is the internal implementation for global.TracerProvider. -func TracerProvider() trace.TracerProvider { - return globalTracer.Load().(tracerProviderHolder).tp -} - -// SetTracerProvider is the internal implementation for global.SetTracerProvider. -func SetTracerProvider(tp trace.TracerProvider) { - delegateTraceOnce.Do(func() { - current := TracerProvider() - if current == tp { - // Setting the provider to the prior default is nonsense, panic. - // Panic is acceptable because we are likely still early in the - // process lifetime. - panic("invalid TracerProvider, the global instance cannot be reinstalled") - } else if def, ok := current.(*tracerProvider); ok { - def.setDelegate(tp) - } - - }) - globalTracer.Store(tracerProviderHolder{tp: tp}) -} - -// MeterProvider is the internal implementation for global.MeterProvider. -func MeterProvider() metric.MeterProvider { - return globalMeter.Load().(meterProviderHolder).mp -} - -// SetMeterProvider is the internal implementation for global.SetMeterProvider. -func SetMeterProvider(mp metric.MeterProvider) { - delegateMeterOnce.Do(func() { - current := MeterProvider() - - if current == mp { - // Setting the provider to the prior default is nonsense, panic. - // Panic is acceptable because we are likely still early in the - // process lifetime. - panic("invalid MeterProvider, the global instance cannot be reinstalled") - } else if def, ok := current.(*meterProvider); ok { - def.setDelegate(mp) - } - }) - globalMeter.Store(meterProviderHolder{mp: mp}) -} - -// TextMapPropagator is the internal implementation for global.TextMapPropagator. -func TextMapPropagator() propagation.TextMapPropagator { - return globalPropagators.Load().(propagatorsHolder).tm -} - -// SetTextMapPropagator is the internal implementation for global.SetTextMapPropagator. -func SetTextMapPropagator(p propagation.TextMapPropagator) { - // For the textMapPropagator already returned by TextMapPropagator - // delegate to p. - delegateTextMapPropagatorOnce.Do(func() { - if current := TextMapPropagator(); current == p { - // Setting the provider to the prior default is nonsense, panic. - // Panic is acceptable because we are likely still early in the - // process lifetime. - panic("invalid TextMapPropagator, the global instance cannot be reinstalled") - } else if def, ok := current.(*textMapPropagator); ok { - def.SetDelegate(p) - } - }) - // Return p when subsequent calls to TextMapPropagator are made. - globalPropagators.Store(propagatorsHolder{tm: p}) -} - -func defaultTracerValue() *atomic.Value { - v := &atomic.Value{} - v.Store(tracerProviderHolder{tp: &tracerProvider{}}) - return v -} - -func defaultMeterValue() *atomic.Value { - v := &atomic.Value{} - v.Store(meterProviderHolder{mp: newMeterProvider()}) - return v -} - -func defaultPropagatorsValue() *atomic.Value { - v := &atomic.Value{} - v.Store(propagatorsHolder{tm: newTextMapPropagator()}) - return v -} - -// ResetForTest restores the initial global state, for testing purposes. -func ResetForTest() { - globalTracer = defaultTracerValue() - globalMeter = defaultMeterValue() - globalPropagators = defaultPropagatorsValue() - delegateMeterOnce = sync.Once{} - delegateTraceOnce = sync.Once{} - delegateTextMapPropagatorOnce = sync.Once{} -} diff --git a/vendor/go.opentelemetry.io/otel/internal/global/trace.go b/vendor/go.opentelemetry.io/otel/internal/global/trace.go deleted file mode 100644 index d7f71dc06c..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/global/trace.go +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright The OpenTelemetry 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 global - -/* -This file contains the forwarding implementation of the TracerProvider used as -the default global instance. Prior to initialization of an SDK, Tracers -returned by the global TracerProvider will provide no-op functionality. This -means that all Span created prior to initialization are no-op Spans. - -Once an SDK has been initialized, all provided no-op Tracers are swapped for -Tracers provided by the SDK defined TracerProvider. However, any Span started -prior to this initialization does not change its behavior. Meaning, the Span -remains a no-op Span. - -The implementation to track and swap Tracers locks all new Tracer creation -until the swap is complete. This assumes that this operation is not -performance-critical. If that assumption is incorrect, be sure to configure an -SDK prior to any Tracer creation. -*/ - -import ( - "context" - "sync" - "sync/atomic" - - "go.opentelemetry.io/otel/internal/trace/noop" - "go.opentelemetry.io/otel/trace" -) - -// tracerProvider is a placeholder for a configured SDK TracerProvider. -// -// All TracerProvider functionality is forwarded to a delegate once -// configured. -type tracerProvider struct { - mtx sync.Mutex - tracers map[il]*tracer - delegate trace.TracerProvider -} - -// Compile-time guarantee that tracerProvider implements the TracerProvider -// interface. -var _ trace.TracerProvider = &tracerProvider{} - -// setDelegate configures p to delegate all TracerProvider functionality to -// provider. -// -// All Tracers provided prior to this function call are switched out to be -// Tracers provided by provider. -// -// It is guaranteed by the caller that this happens only once. -func (p *tracerProvider) setDelegate(provider trace.TracerProvider) { - p.mtx.Lock() - defer p.mtx.Unlock() - - p.delegate = provider - - if len(p.tracers) == 0 { - return - } - - for _, t := range p.tracers { - t.setDelegate(provider) - } - - p.tracers = nil -} - -// Tracer implements TracerProvider. -func (p *tracerProvider) Tracer(name string, opts ...trace.TracerOption) trace.Tracer { - p.mtx.Lock() - defer p.mtx.Unlock() - - if p.delegate != nil { - return p.delegate.Tracer(name, opts...) - } - - // At this moment it is guaranteed that no sdk is installed, save the tracer in the tracers map. - - key := il{ - name: name, - version: trace.NewTracerConfig(opts...).InstrumentationVersion, - } - - if p.tracers == nil { - p.tracers = make(map[il]*tracer) - } - - if val, ok := p.tracers[key]; ok { - return val - } - - t := &tracer{name: name, opts: opts} - p.tracers[key] = t - return t -} - -type il struct { - name string - version string -} - -// tracer is a placeholder for a trace.Tracer. -// -// All Tracer functionality is forwarded to a delegate once configured. -// Otherwise, all functionality is forwarded to a NoopTracer. -type tracer struct { - name string - opts []trace.TracerOption - - delegate atomic.Value -} - -// Compile-time guarantee that tracer implements the trace.Tracer interface. -var _ trace.Tracer = &tracer{} - -// setDelegate configures t to delegate all Tracer functionality to Tracers -// created by provider. -// -// All subsequent calls to the Tracer methods will be passed to the delegate. -// -// It is guaranteed by the caller that this happens only once. -func (t *tracer) setDelegate(provider trace.TracerProvider) { - t.delegate.Store(provider.Tracer(t.name, t.opts...)) -} - -// Start implements trace.Tracer by forwarding the call to t.delegate if -// set, otherwise it forwards the call to a NoopTracer. -func (t *tracer) Start(ctx context.Context, name string, opts ...trace.SpanOption) (context.Context, trace.Span) { - delegate := t.delegate.Load() - if delegate != nil { - return delegate.(trace.Tracer).Start(ctx, name, opts...) - } - return noop.Tracer.Start(ctx, name, opts...) -} diff --git a/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go b/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go deleted file mode 100644 index 0d806b1c89..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/rawhelpers.go +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright The OpenTelemetry 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 internal - -import ( - "math" - "unsafe" -) - -func BoolToRaw(b bool) uint64 { - if b { - return 1 - } - return 0 -} - -func RawToBool(r uint64) bool { - return r != 0 -} - -func Int64ToRaw(i int64) uint64 { - return uint64(i) -} - -func RawToInt64(r uint64) int64 { - return int64(r) -} - -func Float64ToRaw(f float64) uint64 { - return math.Float64bits(f) -} - -func RawToFloat64(r uint64) float64 { - return math.Float64frombits(r) -} - -func RawPtrToFloat64Ptr(r *uint64) *float64 { - return (*float64)(unsafe.Pointer(r)) -} - -func RawPtrToInt64Ptr(r *uint64) *int64 { - return (*int64)(unsafe.Pointer(r)) -} diff --git a/vendor/go.opentelemetry.io/otel/internal/trace/noop/noop.go b/vendor/go.opentelemetry.io/otel/internal/trace/noop/noop.go deleted file mode 100644 index 765c21a289..0000000000 --- a/vendor/go.opentelemetry.io/otel/internal/trace/noop/noop.go +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright The OpenTelemetry 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 noop provides noop tracing implementations for tracer and span. -package noop - -import ( - "context" - - "go.opentelemetry.io/otel/trace" -) - -var ( - // Tracer is a noop tracer that starts noop spans. - Tracer trace.Tracer - - // Span is a noop Span. - Span trace.Span -) - -func init() { - Tracer = trace.NewNoopTracerProvider().Tracer("") - _, Span = Tracer.Start(context.Background(), "") -} diff --git a/vendor/go.opentelemetry.io/otel/metric/LICENSE b/vendor/go.opentelemetry.io/otel/metric/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/LICENSE +++ /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 [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/go.opentelemetry.io/otel/metric/config.go b/vendor/go.opentelemetry.io/otel/metric/config.go deleted file mode 100644 index 02f0ff8e0c..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/config.go +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright The OpenTelemetry 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 metric // import "go.opentelemetry.io/otel/metric" - -import ( - "go.opentelemetry.io/otel/unit" -) - -// InstrumentConfig contains options for metric instrument descriptors. -type InstrumentConfig struct { - // Description describes the instrument in human-readable terms. - Description string - // Unit describes the measurement unit for a instrument. - Unit unit.Unit - // InstrumentationName is the name of the library providing - // instrumentation. - InstrumentationName string - // InstrumentationVersion is the version of the library providing - // instrumentation. - InstrumentationVersion string -} - -// InstrumentOption is an interface for applying metric instrument options. -type InstrumentOption interface { - // ApplyMeter is used to set a InstrumentOption value of a - // InstrumentConfig. - ApplyInstrument(*InstrumentConfig) -} - -// NewInstrumentConfig creates a new InstrumentConfig -// and applies all the given options. -func NewInstrumentConfig(opts ...InstrumentOption) InstrumentConfig { - var config InstrumentConfig - for _, o := range opts { - o.ApplyInstrument(&config) - } - return config -} - -// WithDescription applies provided description. -func WithDescription(desc string) InstrumentOption { - return descriptionOption(desc) -} - -type descriptionOption string - -func (d descriptionOption) ApplyInstrument(config *InstrumentConfig) { - config.Description = string(d) -} - -// WithUnit applies provided unit. -func WithUnit(unit unit.Unit) InstrumentOption { - return unitOption(unit) -} - -type unitOption unit.Unit - -func (u unitOption) ApplyInstrument(config *InstrumentConfig) { - config.Unit = unit.Unit(u) -} - -// WithInstrumentationName sets the instrumentation name. -func WithInstrumentationName(name string) InstrumentOption { - return instrumentationNameOption(name) -} - -type instrumentationNameOption string - -func (i instrumentationNameOption) ApplyInstrument(config *InstrumentConfig) { - config.InstrumentationName = string(i) -} - -// MeterConfig contains options for Meters. -type MeterConfig struct { - // InstrumentationVersion is the version of the library providing - // instrumentation. - InstrumentationVersion string -} - -// MeterOption is an interface for applying Meter options. -type MeterOption interface { - // ApplyMeter is used to set a MeterOption value of a MeterConfig. - ApplyMeter(*MeterConfig) -} - -// NewMeterConfig creates a new MeterConfig and applies -// all the given options. -func NewMeterConfig(opts ...MeterOption) MeterConfig { - var config MeterConfig - for _, o := range opts { - o.ApplyMeter(&config) - } - return config -} - -// InstrumentationOption is an interface for applying instrumentation specific -// options. -type InstrumentationOption interface { - InstrumentOption - MeterOption -} - -// WithInstrumentationVersion sets the instrumentation version. -func WithInstrumentationVersion(version string) InstrumentationOption { - return instrumentationVersionOption(version) -} - -type instrumentationVersionOption string - -func (i instrumentationVersionOption) ApplyMeter(config *MeterConfig) { - config.InstrumentationVersion = string(i) -} - -func (i instrumentationVersionOption) ApplyInstrument(config *InstrumentConfig) { - config.InstrumentationVersion = string(i) -} diff --git a/vendor/go.opentelemetry.io/otel/metric/doc.go b/vendor/go.opentelemetry.io/otel/metric/doc.go deleted file mode 100644 index 7889ff000f..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/doc.go +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright The OpenTelemetry 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 metric provides an implementation of the metrics part of the -OpenTelemetry API. - -This package is currently in a pre-GA phase. Backwards incompatible changes -may be introduced in subsequent minor version releases as we work to track the -evolving OpenTelemetry specification and user feedback. - -Measurements can be made about an operation being performed or the state of a -system in general. These measurements can be crucial to the reliable operation -of code and provide valuable insights about the inner workings of a system. - -Measurements are made using instruments provided by this package. The type of -instrument used will depend on the type of measurement being made and of what -part of a system is being measured. - -Instruments are categorized as Synchronous or Asynchronous and independently -as Adding or Grouping. Synchronous instruments are called by the user with a -Context. Asynchronous instruments are called by the SDK during collection. -Additive instruments are semantically intended for capturing a sum. Grouping -instruments are intended for capturing a distribution. - -Additive instruments may be monotonic, in which case they are non-decreasing -and naturally define a rate. - -The synchronous instrument names are: - - Counter: additive, monotonic - UpDownCounter: additive - ValueRecorder: grouping - -and the asynchronous instruments are: - - SumObserver: additive, monotonic - UpDownSumObserver: additive - ValueObserver: grouping - -All instruments are provided with support for either float64 or int64 input -values. - -An instrument is created using a Meter. Additionally, a Meter is used to -record batches of synchronous measurements or asynchronous observations. A -Meter is obtained using a MeterProvider. A Meter, like a Tracer, is unique to -the instrumentation it instruments and must be named and versioned when -created with a MeterProvider with the name and version of the instrumentation -library. - -Instrumentation should be designed to accept a MeterProvider from which it can -create its own unique Meter. Alternatively, the registered global -MeterProvider from the go.opentelemetry.io/otel package can be used as a -default. -*/ -package metric // import "go.opentelemetry.io/otel/metric" diff --git a/vendor/go.opentelemetry.io/otel/metric/global/metric.go b/vendor/go.opentelemetry.io/otel/metric/global/metric.go deleted file mode 100644 index 8d16d34d48..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/global/metric.go +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright The OpenTelemetry 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 global // import "go.opentelemetry.io/otel/metric/global" - -import ( - "go.opentelemetry.io/otel/internal/global" - "go.opentelemetry.io/otel/metric" -) - -// Meter creates an implementation of the Meter interface from the global -// MeterProvider. The instrumentationName must be the name of the library -// providing instrumentation. This name may be the same as the instrumented -// code only if that code provides built-in instrumentation. If the -// instrumentationName is empty, then a implementation defined default name -// will be used instead. -// -// This is short for MeterProvider().Meter(name) -func Meter(instrumentationName string, opts ...metric.MeterOption) metric.Meter { - return GetMeterProvider().Meter(instrumentationName, opts...) -} - -// GetMeterProvider returns the registered global meter provider. If -// none is registered then a default meter provider is returned that -// forwards the Meter interface to the first registered Meter. -// -// Use the meter provider to create a named meter. E.g. -// meter := global.MeterProvider().Meter("example.com/foo") -// or -// meter := global.Meter("example.com/foo") -func GetMeterProvider() metric.MeterProvider { - return global.MeterProvider() -} - -// SetMeterProvider registers `mp` as the global meter provider. -func SetMeterProvider(mp metric.MeterProvider) { - global.SetMeterProvider(mp) -} diff --git a/vendor/go.opentelemetry.io/otel/metric/go.mod b/vendor/go.opentelemetry.io/otel/metric/go.mod deleted file mode 100644 index 47bc47badd..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/go.mod +++ /dev/null @@ -1,54 +0,0 @@ -module go.opentelemetry.io/otel/metric - -go 1.14 - -replace go.opentelemetry.io/otel => ../ - -replace go.opentelemetry.io/otel/bridge/opencensus => ../bridge/opencensus - -replace go.opentelemetry.io/otel/bridge/opentracing => ../bridge/opentracing - -replace go.opentelemetry.io/otel/example/jaeger => ../example/jaeger - -replace go.opentelemetry.io/otel/example/namedtracer => ../example/namedtracer - -replace go.opentelemetry.io/otel/example/opencensus => ../example/opencensus - -replace go.opentelemetry.io/otel/example/otel-collector => ../example/otel-collector - -replace go.opentelemetry.io/otel/example/prom-collector => ../example/prom-collector - -replace go.opentelemetry.io/otel/example/prometheus => ../example/prometheus - -replace go.opentelemetry.io/otel/example/zipkin => ../example/zipkin - -replace go.opentelemetry.io/otel/exporters/metric/prometheus => ../exporters/metric/prometheus - -replace go.opentelemetry.io/otel/exporters/otlp => ../exporters/otlp - -replace go.opentelemetry.io/otel/exporters/stdout => ../exporters/stdout - -replace go.opentelemetry.io/otel/exporters/trace/jaeger => ../exporters/trace/jaeger - -replace go.opentelemetry.io/otel/exporters/trace/zipkin => ../exporters/trace/zipkin - -replace go.opentelemetry.io/otel/internal/tools => ../internal/tools - -replace go.opentelemetry.io/otel/metric => ./ - -replace go.opentelemetry.io/otel/oteltest => ../oteltest - -replace go.opentelemetry.io/otel/sdk => ../sdk - -replace go.opentelemetry.io/otel/sdk/export/metric => ../sdk/export/metric - -replace go.opentelemetry.io/otel/sdk/metric => ../sdk/metric - -replace go.opentelemetry.io/otel/trace => ../trace - -require ( - github.com/google/go-cmp v0.5.5 - github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/otel v0.20.0 - go.opentelemetry.io/otel/oteltest v0.20.0 -) diff --git a/vendor/go.opentelemetry.io/otel/metric/go.sum b/vendor/go.opentelemetry.io/otel/metric/go.sum deleted file mode 100644 index b69f2e56da..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/go.sum +++ /dev/null @@ -1,15 +0,0 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vendor/go.opentelemetry.io/otel/metric/instrumentkind_string.go b/vendor/go.opentelemetry.io/otel/metric/instrumentkind_string.go deleted file mode 100644 index 2805e22500..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/instrumentkind_string.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by "stringer -type=InstrumentKind"; DO NOT EDIT. - -package metric - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[ValueRecorderInstrumentKind-0] - _ = x[ValueObserverInstrumentKind-1] - _ = x[CounterInstrumentKind-2] - _ = x[UpDownCounterInstrumentKind-3] - _ = x[SumObserverInstrumentKind-4] - _ = x[UpDownSumObserverInstrumentKind-5] -} - -const _InstrumentKind_name = "ValueRecorderInstrumentKindValueObserverInstrumentKindCounterInstrumentKindUpDownCounterInstrumentKindSumObserverInstrumentKindUpDownSumObserverInstrumentKind" - -var _InstrumentKind_index = [...]uint8{0, 27, 54, 75, 102, 127, 158} - -func (i InstrumentKind) String() string { - if i < 0 || i >= InstrumentKind(len(_InstrumentKind_index)-1) { - return "InstrumentKind(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _InstrumentKind_name[_InstrumentKind_index[i]:_InstrumentKind_index[i+1]] -} diff --git a/vendor/go.opentelemetry.io/otel/metric/metric.go b/vendor/go.opentelemetry.io/otel/metric/metric.go deleted file mode 100644 index b591985df6..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/metric.go +++ /dev/null @@ -1,577 +0,0 @@ -// Copyright The OpenTelemetry 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 metric // import "go.opentelemetry.io/otel/metric" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric/number" - "go.opentelemetry.io/otel/unit" -) - -// MeterProvider supports named Meter instances. -type MeterProvider interface { - // Meter creates an implementation of the Meter interface. - // The instrumentationName must be the name of the library providing - // instrumentation. This name may be the same as the instrumented code - // only if that code provides built-in instrumentation. If the - // instrumentationName is empty, then a implementation defined default - // name will be used instead. - Meter(instrumentationName string, opts ...MeterOption) Meter -} - -// Meter is the creator of metric instruments. -// -// An uninitialized Meter is a no-op implementation. -type Meter struct { - impl MeterImpl - name, version string -} - -// RecordBatch atomically records a batch of measurements. -func (m Meter) RecordBatch(ctx context.Context, ls []attribute.KeyValue, ms ...Measurement) { - if m.impl == nil { - return - } - m.impl.RecordBatch(ctx, ls, ms...) -} - -// NewBatchObserver creates a new BatchObserver that supports -// making batches of observations for multiple instruments. -func (m Meter) NewBatchObserver(callback BatchObserverFunc) BatchObserver { - return BatchObserver{ - meter: m, - runner: newBatchAsyncRunner(callback), - } -} - -// NewInt64Counter creates a new integer Counter instrument with the -// given name, customized with options. May return an error if the -// name is invalid (e.g., empty) or improperly registered (e.g., -// duplicate registration). -func (m Meter) NewInt64Counter(name string, options ...InstrumentOption) (Int64Counter, error) { - return wrapInt64CounterInstrument( - m.newSync(name, CounterInstrumentKind, number.Int64Kind, options)) -} - -// NewFloat64Counter creates a new floating point Counter with the -// given name, customized with options. May return an error if the -// name is invalid (e.g., empty) or improperly registered (e.g., -// duplicate registration). -func (m Meter) NewFloat64Counter(name string, options ...InstrumentOption) (Float64Counter, error) { - return wrapFloat64CounterInstrument( - m.newSync(name, CounterInstrumentKind, number.Float64Kind, options)) -} - -// NewInt64UpDownCounter creates a new integer UpDownCounter instrument with the -// given name, customized with options. May return an error if the -// name is invalid (e.g., empty) or improperly registered (e.g., -// duplicate registration). -func (m Meter) NewInt64UpDownCounter(name string, options ...InstrumentOption) (Int64UpDownCounter, error) { - return wrapInt64UpDownCounterInstrument( - m.newSync(name, UpDownCounterInstrumentKind, number.Int64Kind, options)) -} - -// NewFloat64UpDownCounter creates a new floating point UpDownCounter with the -// given name, customized with options. May return an error if the -// name is invalid (e.g., empty) or improperly registered (e.g., -// duplicate registration). -func (m Meter) NewFloat64UpDownCounter(name string, options ...InstrumentOption) (Float64UpDownCounter, error) { - return wrapFloat64UpDownCounterInstrument( - m.newSync(name, UpDownCounterInstrumentKind, number.Float64Kind, options)) -} - -// NewInt64ValueRecorder creates a new integer ValueRecorder instrument with the -// given name, customized with options. May return an error if the -// name is invalid (e.g., empty) or improperly registered (e.g., -// duplicate registration). -func (m Meter) NewInt64ValueRecorder(name string, opts ...InstrumentOption) (Int64ValueRecorder, error) { - return wrapInt64ValueRecorderInstrument( - m.newSync(name, ValueRecorderInstrumentKind, number.Int64Kind, opts)) -} - -// NewFloat64ValueRecorder creates a new floating point ValueRecorder with the -// given name, customized with options. May return an error if the -// name is invalid (e.g., empty) or improperly registered (e.g., -// duplicate registration). -func (m Meter) NewFloat64ValueRecorder(name string, opts ...InstrumentOption) (Float64ValueRecorder, error) { - return wrapFloat64ValueRecorderInstrument( - m.newSync(name, ValueRecorderInstrumentKind, number.Float64Kind, opts)) -} - -// NewInt64ValueObserver creates a new integer ValueObserver instrument -// with the given name, running a given callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (m Meter) NewInt64ValueObserver(name string, callback Int64ObserverFunc, opts ...InstrumentOption) (Int64ValueObserver, error) { - if callback == nil { - return wrapInt64ValueObserverInstrument(NoopAsync{}, nil) - } - return wrapInt64ValueObserverInstrument( - m.newAsync(name, ValueObserverInstrumentKind, number.Int64Kind, opts, - newInt64AsyncRunner(callback))) -} - -// NewFloat64ValueObserver creates a new floating point ValueObserver with -// the given name, running a given callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (m Meter) NewFloat64ValueObserver(name string, callback Float64ObserverFunc, opts ...InstrumentOption) (Float64ValueObserver, error) { - if callback == nil { - return wrapFloat64ValueObserverInstrument(NoopAsync{}, nil) - } - return wrapFloat64ValueObserverInstrument( - m.newAsync(name, ValueObserverInstrumentKind, number.Float64Kind, opts, - newFloat64AsyncRunner(callback))) -} - -// NewInt64SumObserver creates a new integer SumObserver instrument -// with the given name, running a given callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (m Meter) NewInt64SumObserver(name string, callback Int64ObserverFunc, opts ...InstrumentOption) (Int64SumObserver, error) { - if callback == nil { - return wrapInt64SumObserverInstrument(NoopAsync{}, nil) - } - return wrapInt64SumObserverInstrument( - m.newAsync(name, SumObserverInstrumentKind, number.Int64Kind, opts, - newInt64AsyncRunner(callback))) -} - -// NewFloat64SumObserver creates a new floating point SumObserver with -// the given name, running a given callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (m Meter) NewFloat64SumObserver(name string, callback Float64ObserverFunc, opts ...InstrumentOption) (Float64SumObserver, error) { - if callback == nil { - return wrapFloat64SumObserverInstrument(NoopAsync{}, nil) - } - return wrapFloat64SumObserverInstrument( - m.newAsync(name, SumObserverInstrumentKind, number.Float64Kind, opts, - newFloat64AsyncRunner(callback))) -} - -// NewInt64UpDownSumObserver creates a new integer UpDownSumObserver instrument -// with the given name, running a given callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (m Meter) NewInt64UpDownSumObserver(name string, callback Int64ObserverFunc, opts ...InstrumentOption) (Int64UpDownSumObserver, error) { - if callback == nil { - return wrapInt64UpDownSumObserverInstrument(NoopAsync{}, nil) - } - return wrapInt64UpDownSumObserverInstrument( - m.newAsync(name, UpDownSumObserverInstrumentKind, number.Int64Kind, opts, - newInt64AsyncRunner(callback))) -} - -// NewFloat64UpDownSumObserver creates a new floating point UpDownSumObserver with -// the given name, running a given callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (m Meter) NewFloat64UpDownSumObserver(name string, callback Float64ObserverFunc, opts ...InstrumentOption) (Float64UpDownSumObserver, error) { - if callback == nil { - return wrapFloat64UpDownSumObserverInstrument(NoopAsync{}, nil) - } - return wrapFloat64UpDownSumObserverInstrument( - m.newAsync(name, UpDownSumObserverInstrumentKind, number.Float64Kind, opts, - newFloat64AsyncRunner(callback))) -} - -// NewInt64ValueObserver creates a new integer ValueObserver instrument -// with the given name, running in a batch callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (b BatchObserver) NewInt64ValueObserver(name string, opts ...InstrumentOption) (Int64ValueObserver, error) { - if b.runner == nil { - return wrapInt64ValueObserverInstrument(NoopAsync{}, nil) - } - return wrapInt64ValueObserverInstrument( - b.meter.newAsync(name, ValueObserverInstrumentKind, number.Int64Kind, opts, b.runner)) -} - -// NewFloat64ValueObserver creates a new floating point ValueObserver with -// the given name, running in a batch callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (b BatchObserver) NewFloat64ValueObserver(name string, opts ...InstrumentOption) (Float64ValueObserver, error) { - if b.runner == nil { - return wrapFloat64ValueObserverInstrument(NoopAsync{}, nil) - } - return wrapFloat64ValueObserverInstrument( - b.meter.newAsync(name, ValueObserverInstrumentKind, number.Float64Kind, opts, - b.runner)) -} - -// NewInt64SumObserver creates a new integer SumObserver instrument -// with the given name, running in a batch callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (b BatchObserver) NewInt64SumObserver(name string, opts ...InstrumentOption) (Int64SumObserver, error) { - if b.runner == nil { - return wrapInt64SumObserverInstrument(NoopAsync{}, nil) - } - return wrapInt64SumObserverInstrument( - b.meter.newAsync(name, SumObserverInstrumentKind, number.Int64Kind, opts, b.runner)) -} - -// NewFloat64SumObserver creates a new floating point SumObserver with -// the given name, running in a batch callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (b BatchObserver) NewFloat64SumObserver(name string, opts ...InstrumentOption) (Float64SumObserver, error) { - if b.runner == nil { - return wrapFloat64SumObserverInstrument(NoopAsync{}, nil) - } - return wrapFloat64SumObserverInstrument( - b.meter.newAsync(name, SumObserverInstrumentKind, number.Float64Kind, opts, - b.runner)) -} - -// NewInt64UpDownSumObserver creates a new integer UpDownSumObserver instrument -// with the given name, running in a batch callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (b BatchObserver) NewInt64UpDownSumObserver(name string, opts ...InstrumentOption) (Int64UpDownSumObserver, error) { - if b.runner == nil { - return wrapInt64UpDownSumObserverInstrument(NoopAsync{}, nil) - } - return wrapInt64UpDownSumObserverInstrument( - b.meter.newAsync(name, UpDownSumObserverInstrumentKind, number.Int64Kind, opts, b.runner)) -} - -// NewFloat64UpDownSumObserver creates a new floating point UpDownSumObserver with -// the given name, running in a batch callback, and customized with -// options. May return an error if the name is invalid (e.g., empty) -// or improperly registered (e.g., duplicate registration). -func (b BatchObserver) NewFloat64UpDownSumObserver(name string, opts ...InstrumentOption) (Float64UpDownSumObserver, error) { - if b.runner == nil { - return wrapFloat64UpDownSumObserverInstrument(NoopAsync{}, nil) - } - return wrapFloat64UpDownSumObserverInstrument( - b.meter.newAsync(name, UpDownSumObserverInstrumentKind, number.Float64Kind, opts, - b.runner)) -} - -// MeterImpl returns the underlying MeterImpl of this Meter. -func (m Meter) MeterImpl() MeterImpl { - return m.impl -} - -// newAsync constructs one new asynchronous instrument. -func (m Meter) newAsync( - name string, - mkind InstrumentKind, - nkind number.Kind, - opts []InstrumentOption, - runner AsyncRunner, -) ( - AsyncImpl, - error, -) { - if m.impl == nil { - return NoopAsync{}, nil - } - desc := NewDescriptor(name, mkind, nkind, opts...) - desc.config.InstrumentationName = m.name - desc.config.InstrumentationVersion = m.version - return m.impl.NewAsyncInstrument(desc, runner) -} - -// newSync constructs one new synchronous instrument. -func (m Meter) newSync( - name string, - metricKind InstrumentKind, - numberKind number.Kind, - opts []InstrumentOption, -) ( - SyncImpl, - error, -) { - if m.impl == nil { - return NoopSync{}, nil - } - desc := NewDescriptor(name, metricKind, numberKind, opts...) - desc.config.InstrumentationName = m.name - desc.config.InstrumentationVersion = m.version - return m.impl.NewSyncInstrument(desc) -} - -// MeterMust is a wrapper for Meter interfaces that panics when any -// instrument constructor encounters an error. -type MeterMust struct { - meter Meter -} - -// BatchObserverMust is a wrapper for BatchObserver that panics when -// any instrument constructor encounters an error. -type BatchObserverMust struct { - batch BatchObserver -} - -// Must constructs a MeterMust implementation from a Meter, allowing -// the application to panic when any instrument constructor yields an -// error. -func Must(meter Meter) MeterMust { - return MeterMust{meter: meter} -} - -// NewInt64Counter calls `Meter.NewInt64Counter` and returns the -// instrument, panicking if it encounters an error. -func (mm MeterMust) NewInt64Counter(name string, cos ...InstrumentOption) Int64Counter { - if inst, err := mm.meter.NewInt64Counter(name, cos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewFloat64Counter calls `Meter.NewFloat64Counter` and returns the -// instrument, panicking if it encounters an error. -func (mm MeterMust) NewFloat64Counter(name string, cos ...InstrumentOption) Float64Counter { - if inst, err := mm.meter.NewFloat64Counter(name, cos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewInt64UpDownCounter calls `Meter.NewInt64UpDownCounter` and returns the -// instrument, panicking if it encounters an error. -func (mm MeterMust) NewInt64UpDownCounter(name string, cos ...InstrumentOption) Int64UpDownCounter { - if inst, err := mm.meter.NewInt64UpDownCounter(name, cos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewFloat64UpDownCounter calls `Meter.NewFloat64UpDownCounter` and returns the -// instrument, panicking if it encounters an error. -func (mm MeterMust) NewFloat64UpDownCounter(name string, cos ...InstrumentOption) Float64UpDownCounter { - if inst, err := mm.meter.NewFloat64UpDownCounter(name, cos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewInt64ValueRecorder calls `Meter.NewInt64ValueRecorder` and returns the -// instrument, panicking if it encounters an error. -func (mm MeterMust) NewInt64ValueRecorder(name string, mos ...InstrumentOption) Int64ValueRecorder { - if inst, err := mm.meter.NewInt64ValueRecorder(name, mos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewFloat64ValueRecorder calls `Meter.NewFloat64ValueRecorder` and returns the -// instrument, panicking if it encounters an error. -func (mm MeterMust) NewFloat64ValueRecorder(name string, mos ...InstrumentOption) Float64ValueRecorder { - if inst, err := mm.meter.NewFloat64ValueRecorder(name, mos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewInt64ValueObserver calls `Meter.NewInt64ValueObserver` and -// returns the instrument, panicking if it encounters an error. -func (mm MeterMust) NewInt64ValueObserver(name string, callback Int64ObserverFunc, oos ...InstrumentOption) Int64ValueObserver { - if inst, err := mm.meter.NewInt64ValueObserver(name, callback, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewFloat64ValueObserver calls `Meter.NewFloat64ValueObserver` and -// returns the instrument, panicking if it encounters an error. -func (mm MeterMust) NewFloat64ValueObserver(name string, callback Float64ObserverFunc, oos ...InstrumentOption) Float64ValueObserver { - if inst, err := mm.meter.NewFloat64ValueObserver(name, callback, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewInt64SumObserver calls `Meter.NewInt64SumObserver` and -// returns the instrument, panicking if it encounters an error. -func (mm MeterMust) NewInt64SumObserver(name string, callback Int64ObserverFunc, oos ...InstrumentOption) Int64SumObserver { - if inst, err := mm.meter.NewInt64SumObserver(name, callback, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewFloat64SumObserver calls `Meter.NewFloat64SumObserver` and -// returns the instrument, panicking if it encounters an error. -func (mm MeterMust) NewFloat64SumObserver(name string, callback Float64ObserverFunc, oos ...InstrumentOption) Float64SumObserver { - if inst, err := mm.meter.NewFloat64SumObserver(name, callback, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewInt64UpDownSumObserver calls `Meter.NewInt64UpDownSumObserver` and -// returns the instrument, panicking if it encounters an error. -func (mm MeterMust) NewInt64UpDownSumObserver(name string, callback Int64ObserverFunc, oos ...InstrumentOption) Int64UpDownSumObserver { - if inst, err := mm.meter.NewInt64UpDownSumObserver(name, callback, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewFloat64UpDownSumObserver calls `Meter.NewFloat64UpDownSumObserver` and -// returns the instrument, panicking if it encounters an error. -func (mm MeterMust) NewFloat64UpDownSumObserver(name string, callback Float64ObserverFunc, oos ...InstrumentOption) Float64UpDownSumObserver { - if inst, err := mm.meter.NewFloat64UpDownSumObserver(name, callback, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewBatchObserver returns a wrapper around BatchObserver that panics -// when any instrument constructor returns an error. -func (mm MeterMust) NewBatchObserver(callback BatchObserverFunc) BatchObserverMust { - return BatchObserverMust{ - batch: mm.meter.NewBatchObserver(callback), - } -} - -// NewInt64ValueObserver calls `BatchObserver.NewInt64ValueObserver` and -// returns the instrument, panicking if it encounters an error. -func (bm BatchObserverMust) NewInt64ValueObserver(name string, oos ...InstrumentOption) Int64ValueObserver { - if inst, err := bm.batch.NewInt64ValueObserver(name, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewFloat64ValueObserver calls `BatchObserver.NewFloat64ValueObserver` and -// returns the instrument, panicking if it encounters an error. -func (bm BatchObserverMust) NewFloat64ValueObserver(name string, oos ...InstrumentOption) Float64ValueObserver { - if inst, err := bm.batch.NewFloat64ValueObserver(name, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewInt64SumObserver calls `BatchObserver.NewInt64SumObserver` and -// returns the instrument, panicking if it encounters an error. -func (bm BatchObserverMust) NewInt64SumObserver(name string, oos ...InstrumentOption) Int64SumObserver { - if inst, err := bm.batch.NewInt64SumObserver(name, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewFloat64SumObserver calls `BatchObserver.NewFloat64SumObserver` and -// returns the instrument, panicking if it encounters an error. -func (bm BatchObserverMust) NewFloat64SumObserver(name string, oos ...InstrumentOption) Float64SumObserver { - if inst, err := bm.batch.NewFloat64SumObserver(name, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewInt64UpDownSumObserver calls `BatchObserver.NewInt64UpDownSumObserver` and -// returns the instrument, panicking if it encounters an error. -func (bm BatchObserverMust) NewInt64UpDownSumObserver(name string, oos ...InstrumentOption) Int64UpDownSumObserver { - if inst, err := bm.batch.NewInt64UpDownSumObserver(name, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// NewFloat64UpDownSumObserver calls `BatchObserver.NewFloat64UpDownSumObserver` and -// returns the instrument, panicking if it encounters an error. -func (bm BatchObserverMust) NewFloat64UpDownSumObserver(name string, oos ...InstrumentOption) Float64UpDownSumObserver { - if inst, err := bm.batch.NewFloat64UpDownSumObserver(name, oos...); err != nil { - panic(err) - } else { - return inst - } -} - -// Descriptor contains all the settings that describe an instrument, -// including its name, metric kind, number kind, and the configurable -// options. -type Descriptor struct { - name string - instrumentKind InstrumentKind - numberKind number.Kind - config InstrumentConfig -} - -// NewDescriptor returns a Descriptor with the given contents. -func NewDescriptor(name string, ikind InstrumentKind, nkind number.Kind, opts ...InstrumentOption) Descriptor { - return Descriptor{ - name: name, - instrumentKind: ikind, - numberKind: nkind, - config: NewInstrumentConfig(opts...), - } -} - -// Name returns the metric instrument's name. -func (d Descriptor) Name() string { - return d.name -} - -// InstrumentKind returns the specific kind of instrument. -func (d Descriptor) InstrumentKind() InstrumentKind { - return d.instrumentKind -} - -// Description provides a human-readable description of the metric -// instrument. -func (d Descriptor) Description() string { - return d.config.Description -} - -// Unit describes the units of the metric instrument. Unitless -// metrics return the empty string. -func (d Descriptor) Unit() unit.Unit { - return d.config.Unit -} - -// NumberKind returns whether this instrument is declared over int64, -// float64, or uint64 values. -func (d Descriptor) NumberKind() number.Kind { - return d.numberKind -} - -// InstrumentationName returns the name of the library that provided -// instrumentation for this instrument. -func (d Descriptor) InstrumentationName() string { - return d.config.InstrumentationName -} - -// InstrumentationVersion returns the version of the library that provided -// instrumentation for this instrument. -func (d Descriptor) InstrumentationVersion() string { - return d.config.InstrumentationVersion -} diff --git a/vendor/go.opentelemetry.io/otel/metric/metric_instrument.go b/vendor/go.opentelemetry.io/otel/metric/metric_instrument.go deleted file mode 100644 index 6f3fc997cb..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/metric_instrument.go +++ /dev/null @@ -1,777 +0,0 @@ -// Copyright The OpenTelemetry 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. - -//go:generate stringer -type=InstrumentKind - -package metric // import "go.opentelemetry.io/otel/metric" - -import ( - "context" - "errors" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric/number" -) - -// ErrSDKReturnedNilImpl is returned when a new `MeterImpl` returns nil. -var ErrSDKReturnedNilImpl = errors.New("SDK returned a nil implementation") - -// InstrumentKind describes the kind of instrument. -type InstrumentKind int8 - -const ( - // ValueRecorderInstrumentKind indicates a ValueRecorder instrument. - ValueRecorderInstrumentKind InstrumentKind = iota - // ValueObserverInstrumentKind indicates an ValueObserver instrument. - ValueObserverInstrumentKind - - // CounterInstrumentKind indicates a Counter instrument. - CounterInstrumentKind - // UpDownCounterInstrumentKind indicates a UpDownCounter instrument. - UpDownCounterInstrumentKind - - // SumObserverInstrumentKind indicates a SumObserver instrument. - SumObserverInstrumentKind - // UpDownSumObserverInstrumentKind indicates a UpDownSumObserver - // instrument. - UpDownSumObserverInstrumentKind -) - -// Synchronous returns whether this is a synchronous kind of instrument. -func (k InstrumentKind) Synchronous() bool { - switch k { - case CounterInstrumentKind, UpDownCounterInstrumentKind, ValueRecorderInstrumentKind: - return true - } - return false -} - -// Asynchronous returns whether this is an asynchronous kind of instrument. -func (k InstrumentKind) Asynchronous() bool { - return !k.Synchronous() -} - -// Adding returns whether this kind of instrument adds its inputs (as opposed to Grouping). -func (k InstrumentKind) Adding() bool { - switch k { - case CounterInstrumentKind, UpDownCounterInstrumentKind, SumObserverInstrumentKind, UpDownSumObserverInstrumentKind: - return true - } - return false -} - -// Grouping returns whether this kind of instrument groups its inputs (as opposed to Adding). -func (k InstrumentKind) Grouping() bool { - return !k.Adding() -} - -// Monotonic returns whether this kind of instrument exposes a non-decreasing sum. -func (k InstrumentKind) Monotonic() bool { - switch k { - case CounterInstrumentKind, SumObserverInstrumentKind: - return true - } - return false -} - -// PrecomputedSum returns whether this kind of instrument receives precomputed sums. -func (k InstrumentKind) PrecomputedSum() bool { - return k.Adding() && k.Asynchronous() -} - -// Observation is used for reporting an asynchronous batch of metric -// values. Instances of this type should be created by asynchronous -// instruments (e.g., Int64ValueObserver.Observation()). -type Observation struct { - // number needs to be aligned for 64-bit atomic operations. - number number.Number - instrument AsyncImpl -} - -// Int64ObserverFunc is a type of callback that integral -// observers run. -type Int64ObserverFunc func(context.Context, Int64ObserverResult) - -// Float64ObserverFunc is a type of callback that floating point -// observers run. -type Float64ObserverFunc func(context.Context, Float64ObserverResult) - -// BatchObserverFunc is a callback argument for use with any -// Observer instrument that will be reported as a batch of -// observations. -type BatchObserverFunc func(context.Context, BatchObserverResult) - -// Int64ObserverResult is passed to an observer callback to capture -// observations for one asynchronous integer metric instrument. -type Int64ObserverResult struct { - instrument AsyncImpl - function func([]attribute.KeyValue, ...Observation) -} - -// Float64ObserverResult is passed to an observer callback to capture -// observations for one asynchronous floating point metric instrument. -type Float64ObserverResult struct { - instrument AsyncImpl - function func([]attribute.KeyValue, ...Observation) -} - -// BatchObserverResult is passed to a batch observer callback to -// capture observations for multiple asynchronous instruments. -type BatchObserverResult struct { - function func([]attribute.KeyValue, ...Observation) -} - -// Observe captures a single integer value from the associated -// instrument callback, with the given labels. -func (ir Int64ObserverResult) Observe(value int64, labels ...attribute.KeyValue) { - ir.function(labels, Observation{ - instrument: ir.instrument, - number: number.NewInt64Number(value), - }) -} - -// Observe captures a single floating point value from the associated -// instrument callback, with the given labels. -func (fr Float64ObserverResult) Observe(value float64, labels ...attribute.KeyValue) { - fr.function(labels, Observation{ - instrument: fr.instrument, - number: number.NewFloat64Number(value), - }) -} - -// Observe captures a multiple observations from the associated batch -// instrument callback, with the given labels. -func (br BatchObserverResult) Observe(labels []attribute.KeyValue, obs ...Observation) { - br.function(labels, obs...) -} - -// AsyncRunner is expected to convert into an AsyncSingleRunner or an -// AsyncBatchRunner. SDKs will encounter an error if the AsyncRunner -// does not satisfy one of these interfaces. -type AsyncRunner interface { - // AnyRunner() is a non-exported method with no functional use - // other than to make this a non-empty interface. - AnyRunner() -} - -// AsyncSingleRunner is an interface implemented by single-observer -// callbacks. -type AsyncSingleRunner interface { - // Run accepts a single instrument and function for capturing - // observations of that instrument. Each call to the function - // receives one captured observation. (The function accepts - // multiple observations so the same implementation can be - // used for batch runners.) - Run(ctx context.Context, single AsyncImpl, capture func([]attribute.KeyValue, ...Observation)) - - AsyncRunner -} - -// AsyncBatchRunner is an interface implemented by batch-observer -// callbacks. -type AsyncBatchRunner interface { - // Run accepts a function for capturing observations of - // multiple instruments. - Run(ctx context.Context, capture func([]attribute.KeyValue, ...Observation)) - - AsyncRunner -} - -var _ AsyncSingleRunner = (*Int64ObserverFunc)(nil) -var _ AsyncSingleRunner = (*Float64ObserverFunc)(nil) -var _ AsyncBatchRunner = (*BatchObserverFunc)(nil) - -// newInt64AsyncRunner returns a single-observer callback for integer Observer instruments. -func newInt64AsyncRunner(c Int64ObserverFunc) AsyncSingleRunner { - return &c -} - -// newFloat64AsyncRunner returns a single-observer callback for floating point Observer instruments. -func newFloat64AsyncRunner(c Float64ObserverFunc) AsyncSingleRunner { - return &c -} - -// newBatchAsyncRunner returns a batch-observer callback use with multiple Observer instruments. -func newBatchAsyncRunner(c BatchObserverFunc) AsyncBatchRunner { - return &c -} - -// AnyRunner implements AsyncRunner. -func (*Int64ObserverFunc) AnyRunner() {} - -// AnyRunner implements AsyncRunner. -func (*Float64ObserverFunc) AnyRunner() {} - -// AnyRunner implements AsyncRunner. -func (*BatchObserverFunc) AnyRunner() {} - -// Run implements AsyncSingleRunner. -func (i *Int64ObserverFunc) Run(ctx context.Context, impl AsyncImpl, function func([]attribute.KeyValue, ...Observation)) { - (*i)(ctx, Int64ObserverResult{ - instrument: impl, - function: function, - }) -} - -// Run implements AsyncSingleRunner. -func (f *Float64ObserverFunc) Run(ctx context.Context, impl AsyncImpl, function func([]attribute.KeyValue, ...Observation)) { - (*f)(ctx, Float64ObserverResult{ - instrument: impl, - function: function, - }) -} - -// Run implements AsyncBatchRunner. -func (b *BatchObserverFunc) Run(ctx context.Context, function func([]attribute.KeyValue, ...Observation)) { - (*b)(ctx, BatchObserverResult{ - function: function, - }) -} - -// wrapInt64ValueObserverInstrument converts an AsyncImpl into Int64ValueObserver. -func wrapInt64ValueObserverInstrument(asyncInst AsyncImpl, err error) (Int64ValueObserver, error) { - common, err := checkNewAsync(asyncInst, err) - return Int64ValueObserver{asyncInstrument: common}, err -} - -// wrapFloat64ValueObserverInstrument converts an AsyncImpl into Float64ValueObserver. -func wrapFloat64ValueObserverInstrument(asyncInst AsyncImpl, err error) (Float64ValueObserver, error) { - common, err := checkNewAsync(asyncInst, err) - return Float64ValueObserver{asyncInstrument: common}, err -} - -// wrapInt64SumObserverInstrument converts an AsyncImpl into Int64SumObserver. -func wrapInt64SumObserverInstrument(asyncInst AsyncImpl, err error) (Int64SumObserver, error) { - common, err := checkNewAsync(asyncInst, err) - return Int64SumObserver{asyncInstrument: common}, err -} - -// wrapFloat64SumObserverInstrument converts an AsyncImpl into Float64SumObserver. -func wrapFloat64SumObserverInstrument(asyncInst AsyncImpl, err error) (Float64SumObserver, error) { - common, err := checkNewAsync(asyncInst, err) - return Float64SumObserver{asyncInstrument: common}, err -} - -// wrapInt64UpDownSumObserverInstrument converts an AsyncImpl into Int64UpDownSumObserver. -func wrapInt64UpDownSumObserverInstrument(asyncInst AsyncImpl, err error) (Int64UpDownSumObserver, error) { - common, err := checkNewAsync(asyncInst, err) - return Int64UpDownSumObserver{asyncInstrument: common}, err -} - -// wrapFloat64UpDownSumObserverInstrument converts an AsyncImpl into Float64UpDownSumObserver. -func wrapFloat64UpDownSumObserverInstrument(asyncInst AsyncImpl, err error) (Float64UpDownSumObserver, error) { - common, err := checkNewAsync(asyncInst, err) - return Float64UpDownSumObserver{asyncInstrument: common}, err -} - -// BatchObserver represents an Observer callback that can report -// observations for multiple instruments. -type BatchObserver struct { - meter Meter - runner AsyncBatchRunner -} - -// Int64ValueObserver is a metric that captures a set of int64 values at a -// point in time. -type Int64ValueObserver struct { - asyncInstrument -} - -// Float64ValueObserver is a metric that captures a set of float64 values -// at a point in time. -type Float64ValueObserver struct { - asyncInstrument -} - -// Int64SumObserver is a metric that captures a precomputed sum of -// int64 values at a point in time. -type Int64SumObserver struct { - asyncInstrument -} - -// Float64SumObserver is a metric that captures a precomputed sum of -// float64 values at a point in time. -type Float64SumObserver struct { - asyncInstrument -} - -// Int64UpDownSumObserver is a metric that captures a precomputed sum of -// int64 values at a point in time. -type Int64UpDownSumObserver struct { - asyncInstrument -} - -// Float64UpDownSumObserver is a metric that captures a precomputed sum of -// float64 values at a point in time. -type Float64UpDownSumObserver struct { - asyncInstrument -} - -// Observation returns an Observation, a BatchObserverFunc -// argument, for an asynchronous integer instrument. -// This returns an implementation-level object for use by the SDK, -// users should not refer to this. -func (i Int64ValueObserver) Observation(v int64) Observation { - return Observation{ - number: number.NewInt64Number(v), - instrument: i.instrument, - } -} - -// Observation returns an Observation, a BatchObserverFunc -// argument, for an asynchronous integer instrument. -// This returns an implementation-level object for use by the SDK, -// users should not refer to this. -func (f Float64ValueObserver) Observation(v float64) Observation { - return Observation{ - number: number.NewFloat64Number(v), - instrument: f.instrument, - } -} - -// Observation returns an Observation, a BatchObserverFunc -// argument, for an asynchronous integer instrument. -// This returns an implementation-level object for use by the SDK, -// users should not refer to this. -func (i Int64SumObserver) Observation(v int64) Observation { - return Observation{ - number: number.NewInt64Number(v), - instrument: i.instrument, - } -} - -// Observation returns an Observation, a BatchObserverFunc -// argument, for an asynchronous integer instrument. -// This returns an implementation-level object for use by the SDK, -// users should not refer to this. -func (f Float64SumObserver) Observation(v float64) Observation { - return Observation{ - number: number.NewFloat64Number(v), - instrument: f.instrument, - } -} - -// Observation returns an Observation, a BatchObserverFunc -// argument, for an asynchronous integer instrument. -// This returns an implementation-level object for use by the SDK, -// users should not refer to this. -func (i Int64UpDownSumObserver) Observation(v int64) Observation { - return Observation{ - number: number.NewInt64Number(v), - instrument: i.instrument, - } -} - -// Observation returns an Observation, a BatchObserverFunc -// argument, for an asynchronous integer instrument. -// This returns an implementation-level object for use by the SDK, -// users should not refer to this. -func (f Float64UpDownSumObserver) Observation(v float64) Observation { - return Observation{ - number: number.NewFloat64Number(v), - instrument: f.instrument, - } -} - -// Measurement is used for reporting a synchronous batch of metric -// values. Instances of this type should be created by synchronous -// instruments (e.g., Int64Counter.Measurement()). -type Measurement struct { - // number needs to be aligned for 64-bit atomic operations. - number number.Number - instrument SyncImpl -} - -// syncInstrument contains a SyncImpl. -type syncInstrument struct { - instrument SyncImpl -} - -// syncBoundInstrument contains a BoundSyncImpl. -type syncBoundInstrument struct { - boundInstrument BoundSyncImpl -} - -// asyncInstrument contains a AsyncImpl. -type asyncInstrument struct { - instrument AsyncImpl -} - -// SyncImpl returns the instrument that created this measurement. -// This returns an implementation-level object for use by the SDK, -// users should not refer to this. -func (m Measurement) SyncImpl() SyncImpl { - return m.instrument -} - -// Number returns a number recorded in this measurement. -func (m Measurement) Number() number.Number { - return m.number -} - -// AsyncImpl returns the instrument that created this observation. -// This returns an implementation-level object for use by the SDK, -// users should not refer to this. -func (m Observation) AsyncImpl() AsyncImpl { - return m.instrument -} - -// Number returns a number recorded in this observation. -func (m Observation) Number() number.Number { - return m.number -} - -// AsyncImpl implements AsyncImpl. -func (a asyncInstrument) AsyncImpl() AsyncImpl { - return a.instrument -} - -// SyncImpl returns the implementation object for synchronous instruments. -func (s syncInstrument) SyncImpl() SyncImpl { - return s.instrument -} - -func (s syncInstrument) bind(labels []attribute.KeyValue) syncBoundInstrument { - return newSyncBoundInstrument(s.instrument.Bind(labels)) -} - -func (s syncInstrument) float64Measurement(value float64) Measurement { - return newMeasurement(s.instrument, number.NewFloat64Number(value)) -} - -func (s syncInstrument) int64Measurement(value int64) Measurement { - return newMeasurement(s.instrument, number.NewInt64Number(value)) -} - -func (s syncInstrument) directRecord(ctx context.Context, number number.Number, labels []attribute.KeyValue) { - s.instrument.RecordOne(ctx, number, labels) -} - -func (h syncBoundInstrument) directRecord(ctx context.Context, number number.Number) { - h.boundInstrument.RecordOne(ctx, number) -} - -// Unbind calls SyncImpl.Unbind. -func (h syncBoundInstrument) Unbind() { - h.boundInstrument.Unbind() -} - -// checkNewAsync receives an AsyncImpl and potential -// error, and returns the same types, checking for and ensuring that -// the returned interface is not nil. -func checkNewAsync(instrument AsyncImpl, err error) (asyncInstrument, error) { - if instrument == nil { - if err == nil { - err = ErrSDKReturnedNilImpl - } - instrument = NoopAsync{} - } - return asyncInstrument{ - instrument: instrument, - }, err -} - -// checkNewSync receives an SyncImpl and potential -// error, and returns the same types, checking for and ensuring that -// the returned interface is not nil. -func checkNewSync(instrument SyncImpl, err error) (syncInstrument, error) { - if instrument == nil { - if err == nil { - err = ErrSDKReturnedNilImpl - } - // Note: an alternate behavior would be to synthesize a new name - // or group all duplicately-named instruments of a certain type - // together and use a tag for the original name, e.g., - // name = 'invalid.counter.int64' - // label = 'original-name=duplicate-counter-name' - instrument = NoopSync{} - } - return syncInstrument{ - instrument: instrument, - }, err -} - -func newSyncBoundInstrument(boundInstrument BoundSyncImpl) syncBoundInstrument { - return syncBoundInstrument{ - boundInstrument: boundInstrument, - } -} - -func newMeasurement(instrument SyncImpl, number number.Number) Measurement { - return Measurement{ - instrument: instrument, - number: number, - } -} - -// wrapInt64CounterInstrument converts a SyncImpl into Int64Counter. -func wrapInt64CounterInstrument(syncInst SyncImpl, err error) (Int64Counter, error) { - common, err := checkNewSync(syncInst, err) - return Int64Counter{syncInstrument: common}, err -} - -// wrapFloat64CounterInstrument converts a SyncImpl into Float64Counter. -func wrapFloat64CounterInstrument(syncInst SyncImpl, err error) (Float64Counter, error) { - common, err := checkNewSync(syncInst, err) - return Float64Counter{syncInstrument: common}, err -} - -// wrapInt64UpDownCounterInstrument converts a SyncImpl into Int64UpDownCounter. -func wrapInt64UpDownCounterInstrument(syncInst SyncImpl, err error) (Int64UpDownCounter, error) { - common, err := checkNewSync(syncInst, err) - return Int64UpDownCounter{syncInstrument: common}, err -} - -// wrapFloat64UpDownCounterInstrument converts a SyncImpl into Float64UpDownCounter. -func wrapFloat64UpDownCounterInstrument(syncInst SyncImpl, err error) (Float64UpDownCounter, error) { - common, err := checkNewSync(syncInst, err) - return Float64UpDownCounter{syncInstrument: common}, err -} - -// wrapInt64ValueRecorderInstrument converts a SyncImpl into Int64ValueRecorder. -func wrapInt64ValueRecorderInstrument(syncInst SyncImpl, err error) (Int64ValueRecorder, error) { - common, err := checkNewSync(syncInst, err) - return Int64ValueRecorder{syncInstrument: common}, err -} - -// wrapFloat64ValueRecorderInstrument converts a SyncImpl into Float64ValueRecorder. -func wrapFloat64ValueRecorderInstrument(syncInst SyncImpl, err error) (Float64ValueRecorder, error) { - common, err := checkNewSync(syncInst, err) - return Float64ValueRecorder{syncInstrument: common}, err -} - -// Float64Counter is a metric that accumulates float64 values. -type Float64Counter struct { - syncInstrument -} - -// Int64Counter is a metric that accumulates int64 values. -type Int64Counter struct { - syncInstrument -} - -// BoundFloat64Counter is a bound instrument for Float64Counter. -// -// It inherits the Unbind function from syncBoundInstrument. -type BoundFloat64Counter struct { - syncBoundInstrument -} - -// BoundInt64Counter is a boundInstrument for Int64Counter. -// -// It inherits the Unbind function from syncBoundInstrument. -type BoundInt64Counter struct { - syncBoundInstrument -} - -// Bind creates a bound instrument for this counter. The labels are -// associated with values recorded via subsequent calls to Record. -func (c Float64Counter) Bind(labels ...attribute.KeyValue) (h BoundFloat64Counter) { - h.syncBoundInstrument = c.bind(labels) - return -} - -// Bind creates a bound instrument for this counter. The labels are -// associated with values recorded via subsequent calls to Record. -func (c Int64Counter) Bind(labels ...attribute.KeyValue) (h BoundInt64Counter) { - h.syncBoundInstrument = c.bind(labels) - return -} - -// Measurement creates a Measurement object to use with batch -// recording. -func (c Float64Counter) Measurement(value float64) Measurement { - return c.float64Measurement(value) -} - -// Measurement creates a Measurement object to use with batch -// recording. -func (c Int64Counter) Measurement(value int64) Measurement { - return c.int64Measurement(value) -} - -// Add adds the value to the counter's sum. The labels should contain -// the keys and values to be associated with this value. -func (c Float64Counter) Add(ctx context.Context, value float64, labels ...attribute.KeyValue) { - c.directRecord(ctx, number.NewFloat64Number(value), labels) -} - -// Add adds the value to the counter's sum. The labels should contain -// the keys and values to be associated with this value. -func (c Int64Counter) Add(ctx context.Context, value int64, labels ...attribute.KeyValue) { - c.directRecord(ctx, number.NewInt64Number(value), labels) -} - -// Add adds the value to the counter's sum using the labels -// previously bound to this counter via Bind() -func (b BoundFloat64Counter) Add(ctx context.Context, value float64) { - b.directRecord(ctx, number.NewFloat64Number(value)) -} - -// Add adds the value to the counter's sum using the labels -// previously bound to this counter via Bind() -func (b BoundInt64Counter) Add(ctx context.Context, value int64) { - b.directRecord(ctx, number.NewInt64Number(value)) -} - -// Float64UpDownCounter is a metric instrument that sums floating -// point values. -type Float64UpDownCounter struct { - syncInstrument -} - -// Int64UpDownCounter is a metric instrument that sums integer values. -type Int64UpDownCounter struct { - syncInstrument -} - -// BoundFloat64UpDownCounter is a bound instrument for Float64UpDownCounter. -// -// It inherits the Unbind function from syncBoundInstrument. -type BoundFloat64UpDownCounter struct { - syncBoundInstrument -} - -// BoundInt64UpDownCounter is a boundInstrument for Int64UpDownCounter. -// -// It inherits the Unbind function from syncBoundInstrument. -type BoundInt64UpDownCounter struct { - syncBoundInstrument -} - -// Bind creates a bound instrument for this counter. The labels are -// associated with values recorded via subsequent calls to Record. -func (c Float64UpDownCounter) Bind(labels ...attribute.KeyValue) (h BoundFloat64UpDownCounter) { - h.syncBoundInstrument = c.bind(labels) - return -} - -// Bind creates a bound instrument for this counter. The labels are -// associated with values recorded via subsequent calls to Record. -func (c Int64UpDownCounter) Bind(labels ...attribute.KeyValue) (h BoundInt64UpDownCounter) { - h.syncBoundInstrument = c.bind(labels) - return -} - -// Measurement creates a Measurement object to use with batch -// recording. -func (c Float64UpDownCounter) Measurement(value float64) Measurement { - return c.float64Measurement(value) -} - -// Measurement creates a Measurement object to use with batch -// recording. -func (c Int64UpDownCounter) Measurement(value int64) Measurement { - return c.int64Measurement(value) -} - -// Add adds the value to the counter's sum. The labels should contain -// the keys and values to be associated with this value. -func (c Float64UpDownCounter) Add(ctx context.Context, value float64, labels ...attribute.KeyValue) { - c.directRecord(ctx, number.NewFloat64Number(value), labels) -} - -// Add adds the value to the counter's sum. The labels should contain -// the keys and values to be associated with this value. -func (c Int64UpDownCounter) Add(ctx context.Context, value int64, labels ...attribute.KeyValue) { - c.directRecord(ctx, number.NewInt64Number(value), labels) -} - -// Add adds the value to the counter's sum using the labels -// previously bound to this counter via Bind() -func (b BoundFloat64UpDownCounter) Add(ctx context.Context, value float64) { - b.directRecord(ctx, number.NewFloat64Number(value)) -} - -// Add adds the value to the counter's sum using the labels -// previously bound to this counter via Bind() -func (b BoundInt64UpDownCounter) Add(ctx context.Context, value int64) { - b.directRecord(ctx, number.NewInt64Number(value)) -} - -// Float64ValueRecorder is a metric that records float64 values. -type Float64ValueRecorder struct { - syncInstrument -} - -// Int64ValueRecorder is a metric that records int64 values. -type Int64ValueRecorder struct { - syncInstrument -} - -// BoundFloat64ValueRecorder is a bound instrument for Float64ValueRecorder. -// -// It inherits the Unbind function from syncBoundInstrument. -type BoundFloat64ValueRecorder struct { - syncBoundInstrument -} - -// BoundInt64ValueRecorder is a bound instrument for Int64ValueRecorder. -// -// It inherits the Unbind function from syncBoundInstrument. -type BoundInt64ValueRecorder struct { - syncBoundInstrument -} - -// Bind creates a bound instrument for this ValueRecorder. The labels are -// associated with values recorded via subsequent calls to Record. -func (c Float64ValueRecorder) Bind(labels ...attribute.KeyValue) (h BoundFloat64ValueRecorder) { - h.syncBoundInstrument = c.bind(labels) - return -} - -// Bind creates a bound instrument for this ValueRecorder. The labels are -// associated with values recorded via subsequent calls to Record. -func (c Int64ValueRecorder) Bind(labels ...attribute.KeyValue) (h BoundInt64ValueRecorder) { - h.syncBoundInstrument = c.bind(labels) - return -} - -// Measurement creates a Measurement object to use with batch -// recording. -func (c Float64ValueRecorder) Measurement(value float64) Measurement { - return c.float64Measurement(value) -} - -// Measurement creates a Measurement object to use with batch -// recording. -func (c Int64ValueRecorder) Measurement(value int64) Measurement { - return c.int64Measurement(value) -} - -// Record adds a new value to the list of ValueRecorder's records. The -// labels should contain the keys and values to be associated with -// this value. -func (c Float64ValueRecorder) Record(ctx context.Context, value float64, labels ...attribute.KeyValue) { - c.directRecord(ctx, number.NewFloat64Number(value), labels) -} - -// Record adds a new value to the ValueRecorder's distribution. The -// labels should contain the keys and values to be associated with -// this value. -func (c Int64ValueRecorder) Record(ctx context.Context, value int64, labels ...attribute.KeyValue) { - c.directRecord(ctx, number.NewInt64Number(value), labels) -} - -// Record adds a new value to the ValueRecorder's distribution using the labels -// previously bound to the ValueRecorder via Bind(). -func (b BoundFloat64ValueRecorder) Record(ctx context.Context, value float64) { - b.directRecord(ctx, number.NewFloat64Number(value)) -} - -// Record adds a new value to the ValueRecorder's distribution using the labels -// previously bound to the ValueRecorder via Bind(). -func (b BoundInt64ValueRecorder) Record(ctx context.Context, value int64) { - b.directRecord(ctx, number.NewInt64Number(value)) -} diff --git a/vendor/go.opentelemetry.io/otel/metric/metric_noop.go b/vendor/go.opentelemetry.io/otel/metric/metric_noop.go deleted file mode 100644 index 30e57b6945..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/metric_noop.go +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright The OpenTelemetry 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 metric // import "go.opentelemetry.io/otel/metric" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric/number" -) - -type NoopMeterProvider struct{} - -type noopInstrument struct{} -type noopBoundInstrument struct{} -type NoopSync struct{ noopInstrument } -type NoopAsync struct{ noopInstrument } - -var _ MeterProvider = NoopMeterProvider{} -var _ SyncImpl = NoopSync{} -var _ BoundSyncImpl = noopBoundInstrument{} -var _ AsyncImpl = NoopAsync{} - -func (NoopMeterProvider) Meter(_ string, _ ...MeterOption) Meter { - return Meter{} -} - -func (noopInstrument) Implementation() interface{} { - return nil -} - -func (noopInstrument) Descriptor() Descriptor { - return Descriptor{} -} - -func (noopBoundInstrument) RecordOne(context.Context, number.Number) { -} - -func (noopBoundInstrument) Unbind() { -} - -func (NoopSync) Bind([]attribute.KeyValue) BoundSyncImpl { - return noopBoundInstrument{} -} - -func (NoopSync) RecordOne(context.Context, number.Number, []attribute.KeyValue) { -} diff --git a/vendor/go.opentelemetry.io/otel/metric/metric_sdkapi.go b/vendor/go.opentelemetry.io/otel/metric/metric_sdkapi.go deleted file mode 100644 index 94164f7b48..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/metric_sdkapi.go +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright The OpenTelemetry 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 metric // import "go.opentelemetry.io/otel/metric" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric/number" -) - -// MeterImpl is the interface an SDK must implement to supply a Meter -// implementation. -type MeterImpl interface { - // RecordBatch atomically records a batch of measurements. - RecordBatch(ctx context.Context, labels []attribute.KeyValue, measurement ...Measurement) - - // NewSyncInstrument returns a newly constructed - // synchronous instrument implementation or an error, should - // one occur. - NewSyncInstrument(descriptor Descriptor) (SyncImpl, error) - - // NewAsyncInstrument returns a newly constructed - // asynchronous instrument implementation or an error, should - // one occur. - NewAsyncInstrument( - descriptor Descriptor, - runner AsyncRunner, - ) (AsyncImpl, error) -} - -// InstrumentImpl is a common interface for synchronous and -// asynchronous instruments. -type InstrumentImpl interface { - // Implementation returns the underlying implementation of the - // instrument, which allows the implementation to gain access - // to its own representation especially from a `Measurement`. - Implementation() interface{} - - // Descriptor returns a copy of the instrument's Descriptor. - Descriptor() Descriptor -} - -// SyncImpl is the implementation-level interface to a generic -// synchronous instrument (e.g., ValueRecorder and Counter instruments). -type SyncImpl interface { - InstrumentImpl - - // Bind creates an implementation-level bound instrument, - // binding a label set with this instrument implementation. - Bind(labels []attribute.KeyValue) BoundSyncImpl - - // RecordOne captures a single synchronous metric event. - RecordOne(ctx context.Context, number number.Number, labels []attribute.KeyValue) -} - -// BoundSyncImpl is the implementation-level interface to a -// generic bound synchronous instrument -type BoundSyncImpl interface { - - // RecordOne captures a single synchronous metric event. - RecordOne(ctx context.Context, number number.Number) - - // Unbind frees the resources associated with this bound instrument. It - // does not affect the metric this bound instrument was created through. - Unbind() -} - -// AsyncImpl is an implementation-level interface to an -// asynchronous instrument (e.g., Observer instruments). -type AsyncImpl interface { - InstrumentImpl -} - -// WrapMeterImpl constructs a `Meter` implementation from a -// `MeterImpl` implementation. -func WrapMeterImpl(impl MeterImpl, instrumentationName string, opts ...MeterOption) Meter { - return Meter{ - impl: impl, - name: instrumentationName, - version: NewMeterConfig(opts...).InstrumentationVersion, - } -} diff --git a/vendor/go.opentelemetry.io/otel/metric/number/doc.go b/vendor/go.opentelemetry.io/otel/metric/number/doc.go deleted file mode 100644 index 0649ff875e..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/number/doc.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright The OpenTelemetry 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 number provides a number abstraction for instruments that -either support int64 or float64 input values. - -This package is currently in a pre-GA phase. Backwards incompatible changes -may be introduced in subsequent minor version releases as we work to track the -evolving OpenTelemetry specification and user feedback. -*/ -package number // import "go.opentelemetry.io/otel/metric/number" diff --git a/vendor/go.opentelemetry.io/otel/metric/number/kind_string.go b/vendor/go.opentelemetry.io/otel/metric/number/kind_string.go deleted file mode 100644 index 6288c7ea29..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/number/kind_string.go +++ /dev/null @@ -1,24 +0,0 @@ -// Code generated by "stringer -type=Kind"; DO NOT EDIT. - -package number - -import "strconv" - -func _() { - // An "invalid array index" compiler error signifies that the constant values have changed. - // Re-run the stringer command to generate them again. - var x [1]struct{} - _ = x[Int64Kind-0] - _ = x[Float64Kind-1] -} - -const _Kind_name = "Int64KindFloat64Kind" - -var _Kind_index = [...]uint8{0, 9, 20} - -func (i Kind) String() string { - if i < 0 || i >= Kind(len(_Kind_index)-1) { - return "Kind(" + strconv.FormatInt(int64(i), 10) + ")" - } - return _Kind_name[_Kind_index[i]:_Kind_index[i+1]] -} diff --git a/vendor/go.opentelemetry.io/otel/metric/number/number.go b/vendor/go.opentelemetry.io/otel/metric/number/number.go deleted file mode 100644 index 3ec95e2014..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/number/number.go +++ /dev/null @@ -1,538 +0,0 @@ -// Copyright The OpenTelemetry 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 number // import "go.opentelemetry.io/otel/metric/number" - -//go:generate stringer -type=Kind - -import ( - "fmt" - "math" - "sync/atomic" - - "go.opentelemetry.io/otel/internal" -) - -// Kind describes the data type of the Number. -type Kind int8 - -const ( - // Int64Kind means that the Number stores int64. - Int64Kind Kind = iota - // Float64Kind means that the Number stores float64. - Float64Kind -) - -// Zero returns a zero value for a given Kind -func (k Kind) Zero() Number { - switch k { - case Int64Kind: - return NewInt64Number(0) - case Float64Kind: - return NewFloat64Number(0.) - default: - return Number(0) - } -} - -// Minimum returns the minimum representable value -// for a given Kind -func (k Kind) Minimum() Number { - switch k { - case Int64Kind: - return NewInt64Number(math.MinInt64) - case Float64Kind: - return NewFloat64Number(-1. * math.MaxFloat64) - default: - return Number(0) - } -} - -// Maximum returns the maximum representable value -// for a given Kind -func (k Kind) Maximum() Number { - switch k { - case Int64Kind: - return NewInt64Number(math.MaxInt64) - case Float64Kind: - return NewFloat64Number(math.MaxFloat64) - default: - return Number(0) - } -} - -// Number represents either an integral or a floating point value. It -// needs to be accompanied with a source of Kind that describes -// the actual type of the value stored within Number. -type Number uint64 - -// - constructors - -// NewNumberFromRaw creates a new Number from a raw value. -func NewNumberFromRaw(r uint64) Number { - return Number(r) -} - -// NewInt64Number creates an integral Number. -func NewInt64Number(i int64) Number { - return NewNumberFromRaw(internal.Int64ToRaw(i)) -} - -// NewFloat64Number creates a floating point Number. -func NewFloat64Number(f float64) Number { - return NewNumberFromRaw(internal.Float64ToRaw(f)) -} - -// NewNumberSignChange returns a number with the same magnitude and -// the opposite sign. `kind` must describe the kind of number in `nn`. -func NewNumberSignChange(kind Kind, nn Number) Number { - switch kind { - case Int64Kind: - return NewInt64Number(-nn.AsInt64()) - case Float64Kind: - return NewFloat64Number(-nn.AsFloat64()) - } - return nn -} - -// - as x - -// AsNumber gets the Number. -func (n *Number) AsNumber() Number { - return *n -} - -// AsRaw gets the uninterpreted raw value. Might be useful for some -// atomic operations. -func (n *Number) AsRaw() uint64 { - return uint64(*n) -} - -// AsInt64 assumes that the value contains an int64 and returns it as -// such. -func (n *Number) AsInt64() int64 { - return internal.RawToInt64(n.AsRaw()) -} - -// AsFloat64 assumes that the measurement value contains a float64 and -// returns it as such. -func (n *Number) AsFloat64() float64 { - return internal.RawToFloat64(n.AsRaw()) -} - -// - as x atomic - -// AsNumberAtomic gets the Number atomically. -func (n *Number) AsNumberAtomic() Number { - return NewNumberFromRaw(n.AsRawAtomic()) -} - -// AsRawAtomic gets the uninterpreted raw value atomically. Might be -// useful for some atomic operations. -func (n *Number) AsRawAtomic() uint64 { - return atomic.LoadUint64(n.AsRawPtr()) -} - -// AsInt64Atomic assumes that the number contains an int64 and returns -// it as such atomically. -func (n *Number) AsInt64Atomic() int64 { - return atomic.LoadInt64(n.AsInt64Ptr()) -} - -// AsFloat64Atomic assumes that the measurement value contains a -// float64 and returns it as such atomically. -func (n *Number) AsFloat64Atomic() float64 { - return internal.RawToFloat64(n.AsRawAtomic()) -} - -// - as x ptr - -// AsRawPtr gets the pointer to the raw, uninterpreted raw -// value. Might be useful for some atomic operations. -func (n *Number) AsRawPtr() *uint64 { - return (*uint64)(n) -} - -// AsInt64Ptr assumes that the number contains an int64 and returns a -// pointer to it. -func (n *Number) AsInt64Ptr() *int64 { - return internal.RawPtrToInt64Ptr(n.AsRawPtr()) -} - -// AsFloat64Ptr assumes that the number contains a float64 and returns a -// pointer to it. -func (n *Number) AsFloat64Ptr() *float64 { - return internal.RawPtrToFloat64Ptr(n.AsRawPtr()) -} - -// - coerce - -// CoerceToInt64 casts the number to int64. May result in -// data/precision loss. -func (n *Number) CoerceToInt64(kind Kind) int64 { - switch kind { - case Int64Kind: - return n.AsInt64() - case Float64Kind: - return int64(n.AsFloat64()) - default: - // you get what you deserve - return 0 - } -} - -// CoerceToFloat64 casts the number to float64. May result in -// data/precision loss. -func (n *Number) CoerceToFloat64(kind Kind) float64 { - switch kind { - case Int64Kind: - return float64(n.AsInt64()) - case Float64Kind: - return n.AsFloat64() - default: - // you get what you deserve - return 0 - } -} - -// - set - -// SetNumber sets the number to the passed number. Both should be of -// the same kind. -func (n *Number) SetNumber(nn Number) { - *n.AsRawPtr() = nn.AsRaw() -} - -// SetRaw sets the number to the passed raw value. Both number and the -// raw number should represent the same kind. -func (n *Number) SetRaw(r uint64) { - *n.AsRawPtr() = r -} - -// SetInt64 assumes that the number contains an int64 and sets it to -// the passed value. -func (n *Number) SetInt64(i int64) { - *n.AsInt64Ptr() = i -} - -// SetFloat64 assumes that the number contains a float64 and sets it -// to the passed value. -func (n *Number) SetFloat64(f float64) { - *n.AsFloat64Ptr() = f -} - -// - set atomic - -// SetNumberAtomic sets the number to the passed number -// atomically. Both should be of the same kind. -func (n *Number) SetNumberAtomic(nn Number) { - atomic.StoreUint64(n.AsRawPtr(), nn.AsRaw()) -} - -// SetRawAtomic sets the number to the passed raw value -// atomically. Both number and the raw number should represent the -// same kind. -func (n *Number) SetRawAtomic(r uint64) { - atomic.StoreUint64(n.AsRawPtr(), r) -} - -// SetInt64Atomic assumes that the number contains an int64 and sets -// it to the passed value atomically. -func (n *Number) SetInt64Atomic(i int64) { - atomic.StoreInt64(n.AsInt64Ptr(), i) -} - -// SetFloat64Atomic assumes that the number contains a float64 and -// sets it to the passed value atomically. -func (n *Number) SetFloat64Atomic(f float64) { - atomic.StoreUint64(n.AsRawPtr(), internal.Float64ToRaw(f)) -} - -// - swap - -// SwapNumber sets the number to the passed number and returns the old -// number. Both this number and the passed number should be of the -// same kind. -func (n *Number) SwapNumber(nn Number) Number { - old := *n - n.SetNumber(nn) - return old -} - -// SwapRaw sets the number to the passed raw value and returns the old -// raw value. Both number and the raw number should represent the same -// kind. -func (n *Number) SwapRaw(r uint64) uint64 { - old := n.AsRaw() - n.SetRaw(r) - return old -} - -// SwapInt64 assumes that the number contains an int64, sets it to the -// passed value and returns the old int64 value. -func (n *Number) SwapInt64(i int64) int64 { - old := n.AsInt64() - n.SetInt64(i) - return old -} - -// SwapFloat64 assumes that the number contains an float64, sets it to -// the passed value and returns the old float64 value. -func (n *Number) SwapFloat64(f float64) float64 { - old := n.AsFloat64() - n.SetFloat64(f) - return old -} - -// - swap atomic - -// SwapNumberAtomic sets the number to the passed number and returns -// the old number atomically. Both this number and the passed number -// should be of the same kind. -func (n *Number) SwapNumberAtomic(nn Number) Number { - return NewNumberFromRaw(atomic.SwapUint64(n.AsRawPtr(), nn.AsRaw())) -} - -// SwapRawAtomic sets the number to the passed raw value and returns -// the old raw value atomically. Both number and the raw number should -// represent the same kind. -func (n *Number) SwapRawAtomic(r uint64) uint64 { - return atomic.SwapUint64(n.AsRawPtr(), r) -} - -// SwapInt64Atomic assumes that the number contains an int64, sets it -// to the passed value and returns the old int64 value atomically. -func (n *Number) SwapInt64Atomic(i int64) int64 { - return atomic.SwapInt64(n.AsInt64Ptr(), i) -} - -// SwapFloat64Atomic assumes that the number contains an float64, sets -// it to the passed value and returns the old float64 value -// atomically. -func (n *Number) SwapFloat64Atomic(f float64) float64 { - return internal.RawToFloat64(atomic.SwapUint64(n.AsRawPtr(), internal.Float64ToRaw(f))) -} - -// - add - -// AddNumber assumes that this and the passed number are of the passed -// kind and adds the passed number to this number. -func (n *Number) AddNumber(kind Kind, nn Number) { - switch kind { - case Int64Kind: - n.AddInt64(nn.AsInt64()) - case Float64Kind: - n.AddFloat64(nn.AsFloat64()) - } -} - -// AddRaw assumes that this number and the passed raw value are of the -// passed kind and adds the passed raw value to this number. -func (n *Number) AddRaw(kind Kind, r uint64) { - n.AddNumber(kind, NewNumberFromRaw(r)) -} - -// AddInt64 assumes that the number contains an int64 and adds the -// passed int64 to it. -func (n *Number) AddInt64(i int64) { - *n.AsInt64Ptr() += i -} - -// AddFloat64 assumes that the number contains a float64 and adds the -// passed float64 to it. -func (n *Number) AddFloat64(f float64) { - *n.AsFloat64Ptr() += f -} - -// - add atomic - -// AddNumberAtomic assumes that this and the passed number are of the -// passed kind and adds the passed number to this number atomically. -func (n *Number) AddNumberAtomic(kind Kind, nn Number) { - switch kind { - case Int64Kind: - n.AddInt64Atomic(nn.AsInt64()) - case Float64Kind: - n.AddFloat64Atomic(nn.AsFloat64()) - } -} - -// AddRawAtomic assumes that this number and the passed raw value are -// of the passed kind and adds the passed raw value to this number -// atomically. -func (n *Number) AddRawAtomic(kind Kind, r uint64) { - n.AddNumberAtomic(kind, NewNumberFromRaw(r)) -} - -// AddInt64Atomic assumes that the number contains an int64 and adds -// the passed int64 to it atomically. -func (n *Number) AddInt64Atomic(i int64) { - atomic.AddInt64(n.AsInt64Ptr(), i) -} - -// AddFloat64Atomic assumes that the number contains a float64 and -// adds the passed float64 to it atomically. -func (n *Number) AddFloat64Atomic(f float64) { - for { - o := n.AsFloat64Atomic() - if n.CompareAndSwapFloat64(o, o+f) { - break - } - } -} - -// - compare and swap (atomic only) - -// CompareAndSwapNumber does the atomic CAS operation on this -// number. This number and passed old and new numbers should be of the -// same kind. -func (n *Number) CompareAndSwapNumber(on, nn Number) bool { - return atomic.CompareAndSwapUint64(n.AsRawPtr(), on.AsRaw(), nn.AsRaw()) -} - -// CompareAndSwapRaw does the atomic CAS operation on this -// number. This number and passed old and new raw values should be of -// the same kind. -func (n *Number) CompareAndSwapRaw(or, nr uint64) bool { - return atomic.CompareAndSwapUint64(n.AsRawPtr(), or, nr) -} - -// CompareAndSwapInt64 assumes that this number contains an int64 and -// does the atomic CAS operation on it. -func (n *Number) CompareAndSwapInt64(oi, ni int64) bool { - return atomic.CompareAndSwapInt64(n.AsInt64Ptr(), oi, ni) -} - -// CompareAndSwapFloat64 assumes that this number contains a float64 and -// does the atomic CAS operation on it. -func (n *Number) CompareAndSwapFloat64(of, nf float64) bool { - return atomic.CompareAndSwapUint64(n.AsRawPtr(), internal.Float64ToRaw(of), internal.Float64ToRaw(nf)) -} - -// - compare - -// CompareNumber compares two Numbers given their kind. Both numbers -// should have the same kind. This returns: -// 0 if the numbers are equal -// -1 if the subject `n` is less than the argument `nn` -// +1 if the subject `n` is greater than the argument `nn` -func (n *Number) CompareNumber(kind Kind, nn Number) int { - switch kind { - case Int64Kind: - return n.CompareInt64(nn.AsInt64()) - case Float64Kind: - return n.CompareFloat64(nn.AsFloat64()) - default: - // you get what you deserve - return 0 - } -} - -// CompareRaw compares two numbers, where one is input as a raw -// uint64, interpreting both values as a `kind` of number. -func (n *Number) CompareRaw(kind Kind, r uint64) int { - return n.CompareNumber(kind, NewNumberFromRaw(r)) -} - -// CompareInt64 assumes that the Number contains an int64 and performs -// a comparison between the value and the other value. It returns the -// typical result of the compare function: -1 if the value is less -// than the other, 0 if both are equal, 1 if the value is greater than -// the other. -func (n *Number) CompareInt64(i int64) int { - this := n.AsInt64() - if this < i { - return -1 - } else if this > i { - return 1 - } - return 0 -} - -// CompareFloat64 assumes that the Number contains a float64 and -// performs a comparison between the value and the other value. It -// returns the typical result of the compare function: -1 if the value -// is less than the other, 0 if both are equal, 1 if the value is -// greater than the other. -// -// Do not compare NaN values. -func (n *Number) CompareFloat64(f float64) int { - this := n.AsFloat64() - if this < f { - return -1 - } else if this > f { - return 1 - } - return 0 -} - -// - relations to zero - -// IsPositive returns true if the actual value is greater than zero. -func (n *Number) IsPositive(kind Kind) bool { - return n.compareWithZero(kind) > 0 -} - -// IsNegative returns true if the actual value is less than zero. -func (n *Number) IsNegative(kind Kind) bool { - return n.compareWithZero(kind) < 0 -} - -// IsZero returns true if the actual value is equal to zero. -func (n *Number) IsZero(kind Kind) bool { - return n.compareWithZero(kind) == 0 -} - -// - misc - -// Emit returns a string representation of the raw value of the -// Number. A %d is used for integral values, %f for floating point -// values. -func (n *Number) Emit(kind Kind) string { - switch kind { - case Int64Kind: - return fmt.Sprintf("%d", n.AsInt64()) - case Float64Kind: - return fmt.Sprintf("%f", n.AsFloat64()) - default: - return "" - } -} - -// AsInterface returns the number as an interface{}, typically used -// for Kind-correct JSON conversion. -func (n *Number) AsInterface(kind Kind) interface{} { - switch kind { - case Int64Kind: - return n.AsInt64() - case Float64Kind: - return n.AsFloat64() - default: - return math.NaN() - } -} - -// - private stuff - -func (n *Number) compareWithZero(kind Kind) int { - switch kind { - case Int64Kind: - return n.CompareInt64(0) - case Float64Kind: - return n.CompareFloat64(0.) - default: - // you get what you deserve - return 0 - } -} diff --git a/vendor/go.opentelemetry.io/otel/metric/registry/doc.go b/vendor/go.opentelemetry.io/otel/metric/registry/doc.go deleted file mode 100644 index a53ba45545..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/registry/doc.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright The OpenTelemetry 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 registry provides a non-standalone implementation of -MeterProvider that adds uniqueness checking for instrument descriptors -on top of other MeterProvider it wraps. - -This package is currently in a pre-GA phase. Backwards incompatible changes -may be introduced in subsequent minor version releases as we work to track the -evolving OpenTelemetry specification and user feedback. -*/ -package registry // import "go.opentelemetry.io/otel/metric/registry" diff --git a/vendor/go.opentelemetry.io/otel/metric/registry/registry.go b/vendor/go.opentelemetry.io/otel/metric/registry/registry.go deleted file mode 100644 index 0a42a0fdf8..0000000000 --- a/vendor/go.opentelemetry.io/otel/metric/registry/registry.go +++ /dev/null @@ -1,170 +0,0 @@ -// Copyright The OpenTelemetry 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 registry // import "go.opentelemetry.io/otel/metric/registry" - -import ( - "context" - "fmt" - "sync" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/metric" -) - -// MeterProvider is a standard MeterProvider for wrapping `MeterImpl` -type MeterProvider struct { - impl metric.MeterImpl -} - -var _ metric.MeterProvider = (*MeterProvider)(nil) - -// uniqueInstrumentMeterImpl implements the metric.MeterImpl interface, adding -// uniqueness checking for instrument descriptors. Use NewUniqueInstrumentMeter -// to wrap an implementation with uniqueness checking. -type uniqueInstrumentMeterImpl struct { - lock sync.Mutex - impl metric.MeterImpl - state map[key]metric.InstrumentImpl -} - -var _ metric.MeterImpl = (*uniqueInstrumentMeterImpl)(nil) - -type key struct { - instrumentName string - instrumentationName string - InstrumentationVersion string -} - -// NewMeterProvider returns a new provider that implements instrument -// name-uniqueness checking. -func NewMeterProvider(impl metric.MeterImpl) *MeterProvider { - return &MeterProvider{ - impl: NewUniqueInstrumentMeterImpl(impl), - } -} - -// Meter implements MeterProvider. -func (p *MeterProvider) Meter(instrumentationName string, opts ...metric.MeterOption) metric.Meter { - return metric.WrapMeterImpl(p.impl, instrumentationName, opts...) -} - -// ErrMetricKindMismatch is the standard error for mismatched metric -// instrument definitions. -var ErrMetricKindMismatch = fmt.Errorf( - "a metric was already registered by this name with another kind or number type") - -// NewUniqueInstrumentMeterImpl returns a wrapped metric.MeterImpl with -// the addition of uniqueness checking. -func NewUniqueInstrumentMeterImpl(impl metric.MeterImpl) metric.MeterImpl { - return &uniqueInstrumentMeterImpl{ - impl: impl, - state: map[key]metric.InstrumentImpl{}, - } -} - -// RecordBatch implements metric.MeterImpl. -func (u *uniqueInstrumentMeterImpl) RecordBatch(ctx context.Context, labels []attribute.KeyValue, ms ...metric.Measurement) { - u.impl.RecordBatch(ctx, labels, ms...) -} - -func keyOf(descriptor metric.Descriptor) key { - return key{ - descriptor.Name(), - descriptor.InstrumentationName(), - descriptor.InstrumentationVersion(), - } -} - -// NewMetricKindMismatchError formats an error that describes a -// mismatched metric instrument definition. -func NewMetricKindMismatchError(desc metric.Descriptor) error { - return fmt.Errorf("metric was %s (%s %s)registered as a %s %s: %w", - desc.Name(), - desc.InstrumentationName(), - desc.InstrumentationVersion(), - desc.NumberKind(), - desc.InstrumentKind(), - ErrMetricKindMismatch) -} - -// Compatible determines whether two metric.Descriptors are considered -// the same for the purpose of uniqueness checking. -func Compatible(candidate, existing metric.Descriptor) bool { - return candidate.InstrumentKind() == existing.InstrumentKind() && - candidate.NumberKind() == existing.NumberKind() -} - -// checkUniqueness returns an ErrMetricKindMismatch error if there is -// a conflict between a descriptor that was already registered and the -// `descriptor` argument. If there is an existing compatible -// registration, this returns the already-registered instrument. If -// there is no conflict and no prior registration, returns (nil, nil). -func (u *uniqueInstrumentMeterImpl) checkUniqueness(descriptor metric.Descriptor) (metric.InstrumentImpl, error) { - impl, ok := u.state[keyOf(descriptor)] - if !ok { - return nil, nil - } - - if !Compatible(descriptor, impl.Descriptor()) { - return nil, NewMetricKindMismatchError(impl.Descriptor()) - } - - return impl, nil -} - -// NewSyncInstrument implements metric.MeterImpl. -func (u *uniqueInstrumentMeterImpl) NewSyncInstrument(descriptor metric.Descriptor) (metric.SyncImpl, error) { - u.lock.Lock() - defer u.lock.Unlock() - - impl, err := u.checkUniqueness(descriptor) - - if err != nil { - return nil, err - } else if impl != nil { - return impl.(metric.SyncImpl), nil - } - - syncInst, err := u.impl.NewSyncInstrument(descriptor) - if err != nil { - return nil, err - } - u.state[keyOf(descriptor)] = syncInst - return syncInst, nil -} - -// NewAsyncInstrument implements metric.MeterImpl. -func (u *uniqueInstrumentMeterImpl) NewAsyncInstrument( - descriptor metric.Descriptor, - runner metric.AsyncRunner, -) (metric.AsyncImpl, error) { - u.lock.Lock() - defer u.lock.Unlock() - - impl, err := u.checkUniqueness(descriptor) - - if err != nil { - return nil, err - } else if impl != nil { - return impl.(metric.AsyncImpl), nil - } - - asyncInst, err := u.impl.NewAsyncInstrument(descriptor, runner) - if err != nil { - return nil, err - } - u.state[keyOf(descriptor)] = asyncInst - return asyncInst, nil -} diff --git a/vendor/go.opentelemetry.io/otel/propagation/baggage.go b/vendor/go.opentelemetry.io/otel/propagation/baggage.go deleted file mode 100644 index bc76191892..0000000000 --- a/vendor/go.opentelemetry.io/otel/propagation/baggage.go +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright The OpenTelemetry 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 propagation // import "go.opentelemetry.io/otel/propagation" - -import ( - "context" - "net/url" - "strings" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/internal/baggage" -) - -const baggageHeader = "baggage" - -// Baggage is a propagator that supports the W3C Baggage format. -// -// This propagates user-defined baggage associated with a trace. The complete -// specification is defined at https://w3c.github.io/baggage/. -type Baggage struct{} - -var _ TextMapPropagator = Baggage{} - -// Inject sets baggage key-values from ctx into the carrier. -func (b Baggage) Inject(ctx context.Context, carrier TextMapCarrier) { - baggageMap := baggage.MapFromContext(ctx) - firstIter := true - var headerValueBuilder strings.Builder - baggageMap.Foreach(func(kv attribute.KeyValue) bool { - if !firstIter { - headerValueBuilder.WriteRune(',') - } - firstIter = false - headerValueBuilder.WriteString(url.QueryEscape(strings.TrimSpace((string)(kv.Key)))) - headerValueBuilder.WriteRune('=') - headerValueBuilder.WriteString(url.QueryEscape(strings.TrimSpace(kv.Value.Emit()))) - return true - }) - if headerValueBuilder.Len() > 0 { - headerString := headerValueBuilder.String() - carrier.Set(baggageHeader, headerString) - } -} - -// Extract returns a copy of parent with the baggage from the carrier added. -func (b Baggage) Extract(parent context.Context, carrier TextMapCarrier) context.Context { - bVal := carrier.Get(baggageHeader) - if bVal == "" { - return parent - } - - baggageValues := strings.Split(bVal, ",") - keyValues := make([]attribute.KeyValue, 0, len(baggageValues)) - for _, baggageValue := range baggageValues { - valueAndProps := strings.Split(baggageValue, ";") - if len(valueAndProps) < 1 { - continue - } - nameValue := strings.Split(valueAndProps[0], "=") - if len(nameValue) < 2 { - continue - } - name, err := url.QueryUnescape(nameValue[0]) - if err != nil { - continue - } - trimmedName := strings.TrimSpace(name) - value, err := url.QueryUnescape(nameValue[1]) - if err != nil { - continue - } - trimmedValue := strings.TrimSpace(value) - - // TODO (skaris): properties defiend https://w3c.github.io/correlation-context/, are currently - // just put as part of the value. - var trimmedValueWithProps strings.Builder - trimmedValueWithProps.WriteString(trimmedValue) - for _, prop := range valueAndProps[1:] { - trimmedValueWithProps.WriteRune(';') - trimmedValueWithProps.WriteString(prop) - } - - keyValues = append(keyValues, attribute.String(trimmedName, trimmedValueWithProps.String())) - } - - if len(keyValues) > 0 { - // Only update the context if valid values were found - return baggage.ContextWithMap(parent, baggage.NewMap(baggage.MapUpdate{ - MultiKV: keyValues, - })) - } - - return parent -} - -// Fields returns the keys who's values are set with Inject. -func (b Baggage) Fields() []string { - return []string{baggageHeader} -} diff --git a/vendor/go.opentelemetry.io/otel/propagation/doc.go b/vendor/go.opentelemetry.io/otel/propagation/doc.go deleted file mode 100644 index 89573f1baa..0000000000 --- a/vendor/go.opentelemetry.io/otel/propagation/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright The OpenTelemetry 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 propagation contains OpenTelemetry context propagators. - -This package is currently in a pre-GA phase. Backwards incompatible changes -may be introduced in subsequent minor version releases as we work to track the -evolving OpenTelemetry specification and user feedback. - -OpenTelemetry propagators are used to extract and inject context data from and -into messages exchanged by applications. The propagator supported by this -package is the W3C Trace Context encoding -(https://www.w3.org/TR/trace-context/), and W3C Baggage -(https://w3c.github.io/baggage/). -*/ -package propagation // import "go.opentelemetry.io/otel/propagation" diff --git a/vendor/go.opentelemetry.io/otel/propagation/propagation.go b/vendor/go.opentelemetry.io/otel/propagation/propagation.go deleted file mode 100644 index 9cfeb347a3..0000000000 --- a/vendor/go.opentelemetry.io/otel/propagation/propagation.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright The OpenTelemetry 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 propagation // import "go.opentelemetry.io/otel/propagation" - -import ( - "context" - "net/http" -) - -// TextMapCarrier is the storage medium used by a TextMapPropagator. -type TextMapCarrier interface { - // Get returns the value associated with the passed key. - Get(key string) string - // Set stores the key-value pair. - Set(key string, value string) - // Keys lists the keys stored in this carrier. - Keys() []string -} - -// HeaderCarrier adapts http.Header to satisfy the TextMapCarrier interface. -type HeaderCarrier http.Header - -// Get returns the value associated with the passed key. -func (hc HeaderCarrier) Get(key string) string { - return http.Header(hc).Get(key) -} - -// Set stores the key-value pair. -func (hc HeaderCarrier) Set(key string, value string) { - http.Header(hc).Set(key, value) -} - -// Keys lists the keys stored in this carrier. -func (hc HeaderCarrier) Keys() []string { - keys := make([]string, 0, len(hc)) - for k := range hc { - keys = append(keys, k) - } - return keys -} - -// TextMapPropagator propagates cross-cutting concerns as key-value text -// pairs within a carrier that travels in-band across process boundaries. -type TextMapPropagator interface { - // Inject set cross-cutting concerns from the Context into the carrier. - Inject(ctx context.Context, carrier TextMapCarrier) - // Extract reads cross-cutting concerns from the carrier into a Context. - Extract(ctx context.Context, carrier TextMapCarrier) context.Context - // Fields returns the keys who's values are set with Inject. - Fields() []string -} - -type compositeTextMapPropagator []TextMapPropagator - -func (p compositeTextMapPropagator) Inject(ctx context.Context, carrier TextMapCarrier) { - for _, i := range p { - i.Inject(ctx, carrier) - } -} - -func (p compositeTextMapPropagator) Extract(ctx context.Context, carrier TextMapCarrier) context.Context { - for _, i := range p { - ctx = i.Extract(ctx, carrier) - } - return ctx -} - -func (p compositeTextMapPropagator) Fields() []string { - unique := make(map[string]struct{}) - for _, i := range p { - for _, k := range i.Fields() { - unique[k] = struct{}{} - } - } - - fields := make([]string, 0, len(unique)) - for k := range unique { - fields = append(fields, k) - } - return fields -} - -// NewCompositeTextMapPropagator returns a unified TextMapPropagator from the -// group of passed TextMapPropagator. This allows different cross-cutting -// concerns to be propagates in a unified manner. -// -// The returned TextMapPropagator will inject and extract cross-cutting -// concerns in the order the TextMapPropagators were provided. Additionally, -// the Fields method will return a de-duplicated slice of the keys that are -// set with the Inject method. -func NewCompositeTextMapPropagator(p ...TextMapPropagator) TextMapPropagator { - return compositeTextMapPropagator(p) -} diff --git a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go b/vendor/go.opentelemetry.io/otel/propagation/trace_context.go deleted file mode 100644 index 82de416bea..0000000000 --- a/vendor/go.opentelemetry.io/otel/propagation/trace_context.go +++ /dev/null @@ -1,178 +0,0 @@ -// Copyright The OpenTelemetry 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 propagation // import "go.opentelemetry.io/otel/propagation" - -import ( - "context" - "encoding/hex" - "fmt" - "regexp" - "strings" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/trace" -) - -const ( - supportedVersion = 0 - maxVersion = 254 - traceparentHeader = "traceparent" - tracestateHeader = "tracestate" -) - -// TraceContext is a propagator that supports the W3C Trace Context format -// (https://www.w3.org/TR/trace-context/) -// -// This propagator will propagate the traceparent and tracestate headers to -// guarantee traces are not broken. It is up to the users of this propagator -// to choose if they want to participate in a trace by modifying the -// traceparent header and relevant parts of the tracestate header containing -// their proprietary information. -type TraceContext struct{} - -var _ TextMapPropagator = TraceContext{} -var traceCtxRegExp = regexp.MustCompile("^(?P<version>[0-9a-f]{2})-(?P<traceID>[a-f0-9]{32})-(?P<spanID>[a-f0-9]{16})-(?P<traceFlags>[a-f0-9]{2})(?:-.*)?$") - -// Inject set tracecontext from the Context into the carrier. -func (tc TraceContext) Inject(ctx context.Context, carrier TextMapCarrier) { - sc := trace.SpanContextFromContext(ctx) - if !sc.IsValid() { - return - } - - carrier.Set(tracestateHeader, sc.TraceState().String()) - - // Clear all flags other than the trace-context supported sampling bit. - flags := sc.TraceFlags() & trace.FlagsSampled - - h := fmt.Sprintf("%.2x-%s-%s-%s", - supportedVersion, - sc.TraceID(), - sc.SpanID(), - flags) - carrier.Set(traceparentHeader, h) -} - -// Extract reads tracecontext from the carrier into a returned Context. -// -// The returned Context will be a copy of ctx and contain the extracted -// tracecontext as the remote SpanContext. If the extracted tracecontext is -// invalid, the passed ctx will be returned directly instead. -func (tc TraceContext) Extract(ctx context.Context, carrier TextMapCarrier) context.Context { - sc := tc.extract(carrier) - if !sc.IsValid() { - return ctx - } - return trace.ContextWithRemoteSpanContext(ctx, sc) -} - -func (tc TraceContext) extract(carrier TextMapCarrier) trace.SpanContext { - h := carrier.Get(traceparentHeader) - if h == "" { - return trace.SpanContext{} - } - - matches := traceCtxRegExp.FindStringSubmatch(h) - - if len(matches) == 0 { - return trace.SpanContext{} - } - - if len(matches) < 5 { // four subgroups plus the overall match - return trace.SpanContext{} - } - - if len(matches[1]) != 2 { - return trace.SpanContext{} - } - ver, err := hex.DecodeString(matches[1]) - if err != nil { - return trace.SpanContext{} - } - version := int(ver[0]) - if version > maxVersion { - return trace.SpanContext{} - } - - if version == 0 && len(matches) != 5 { // four subgroups plus the overall match - return trace.SpanContext{} - } - - if len(matches[2]) != 32 { - return trace.SpanContext{} - } - - var scc trace.SpanContextConfig - - scc.TraceID, err = trace.TraceIDFromHex(matches[2][:32]) - if err != nil { - return trace.SpanContext{} - } - - if len(matches[3]) != 16 { - return trace.SpanContext{} - } - scc.SpanID, err = trace.SpanIDFromHex(matches[3]) - if err != nil { - return trace.SpanContext{} - } - - if len(matches[4]) != 2 { - return trace.SpanContext{} - } - opts, err := hex.DecodeString(matches[4]) - if err != nil || len(opts) < 1 || (version == 0 && opts[0] > 2) { - return trace.SpanContext{} - } - // Clear all flags other than the trace-context supported sampling bit. - scc.TraceFlags = trace.TraceFlags(opts[0]) & trace.FlagsSampled - - scc.TraceState = parseTraceState(carrier.Get(tracestateHeader)) - scc.Remote = true - - sc := trace.NewSpanContext(scc) - if !sc.IsValid() { - return trace.SpanContext{} - } - - return sc -} - -// Fields returns the keys who's values are set with Inject. -func (tc TraceContext) Fields() []string { - return []string{traceparentHeader, tracestateHeader} -} - -func parseTraceState(in string) trace.TraceState { - if in == "" { - return trace.TraceState{} - } - - kvs := []attribute.KeyValue{} - for _, entry := range strings.Split(in, ",") { - parts := strings.SplitN(entry, "=", 2) - if len(parts) != 2 { - // Parse failure, abort! - return trace.TraceState{} - } - kvs = append(kvs, attribute.String(parts[0], parts[1])) - } - - // Ignoring error here as "failure to parse tracestate MUST NOT - // affect the parsing of traceparent." - // https://www.w3.org/TR/trace-context/#tracestate-header - ts, _ := trace.TraceStateFromKeyValues(kvs...) - return ts -} diff --git a/vendor/go.opentelemetry.io/otel/trace/LICENSE b/vendor/go.opentelemetry.io/otel/trace/LICENSE deleted file mode 100644 index 261eeb9e9f..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/LICENSE +++ /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 [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/go.opentelemetry.io/otel/trace/config.go b/vendor/go.opentelemetry.io/otel/trace/config.go deleted file mode 100644 index ea30ee35f1..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/config.go +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright The OpenTelemetry 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 trace - -import ( - "time" - - "go.opentelemetry.io/otel/attribute" -) - -// TracerConfig is a group of options for a Tracer. -type TracerConfig struct { - // InstrumentationVersion is the version of the library providing - // instrumentation. - InstrumentationVersion string -} - -// NewTracerConfig applies all the options to a returned TracerConfig. -func NewTracerConfig(options ...TracerOption) *TracerConfig { - config := new(TracerConfig) - for _, option := range options { - option.ApplyTracer(config) - } - return config -} - -// TracerOption applies an option to a TracerConfig. -type TracerOption interface { - ApplyTracer(*TracerConfig) - - // A private method to prevent users implementing the - // interface and so future additions to it will not - // violate compatibility. - private() -} - -// SpanConfig is a group of options for a Span. -type SpanConfig struct { - // Attributes describe the associated qualities of a Span. - Attributes []attribute.KeyValue - // Timestamp is a time in a Span life-cycle. - Timestamp time.Time - // Links are the associations a Span has with other Spans. - Links []Link - // NewRoot identifies a Span as the root Span for a new trace. This is - // commonly used when an existing trace crosses trust boundaries and the - // remote parent span context should be ignored for security. - NewRoot bool - // SpanKind is the role a Span has in a trace. - SpanKind SpanKind -} - -// NewSpanConfig applies all the options to a returned SpanConfig. -// No validation is performed on the returned SpanConfig (e.g. no uniqueness -// checking or bounding of data), it is left to the SDK to perform this -// action. -func NewSpanConfig(options ...SpanOption) *SpanConfig { - c := new(SpanConfig) - for _, option := range options { - option.ApplySpan(c) - } - return c -} - -// SpanOption applies an option to a SpanConfig. -type SpanOption interface { - ApplySpan(*SpanConfig) - - // A private method to prevent users implementing the - // interface and so future additions to it will not - // violate compatibility. - private() -} - -// NewEventConfig applies all the EventOptions to a returned SpanConfig. If no -// timestamp option is passed, the returned SpanConfig will have a Timestamp -// set to the call time, otherwise no validation is performed on the returned -// SpanConfig. -func NewEventConfig(options ...EventOption) *SpanConfig { - c := new(SpanConfig) - for _, option := range options { - option.ApplyEvent(c) - } - if c.Timestamp.IsZero() { - c.Timestamp = time.Now() - } - return c -} - -// EventOption applies span event options to a SpanConfig. -type EventOption interface { - ApplyEvent(*SpanConfig) - - // A private method to prevent users implementing the - // interface and so future additions to it will not - // violate compatibility. - private() -} - -// LifeCycleOption applies span life-cycle options to a SpanConfig. These -// options set values releated to events in a spans life-cycle like starting, -// ending, experiencing an error and other user defined notable events. -type LifeCycleOption interface { - SpanOption - EventOption -} - -type attributeSpanOption []attribute.KeyValue - -func (o attributeSpanOption) ApplySpan(c *SpanConfig) { o.apply(c) } -func (o attributeSpanOption) ApplyEvent(c *SpanConfig) { o.apply(c) } -func (attributeSpanOption) private() {} -func (o attributeSpanOption) apply(c *SpanConfig) { - c.Attributes = append(c.Attributes, []attribute.KeyValue(o)...) -} - -// WithAttributes adds the attributes related to a span life-cycle event. -// These attributes are used to describe the work a Span represents when this -// option is provided to a Span's start or end events. Otherwise, these -// attributes provide additional information about the event being recorded -// (e.g. error, state change, processing progress, system event). -// -// If multiple of these options are passed the attributes of each successive -// option will extend the attributes instead of overwriting. There is no -// guarantee of uniqueness in the resulting attributes. -func WithAttributes(attributes ...attribute.KeyValue) LifeCycleOption { - return attributeSpanOption(attributes) -} - -type timestampSpanOption time.Time - -func (o timestampSpanOption) ApplySpan(c *SpanConfig) { o.apply(c) } -func (o timestampSpanOption) ApplyEvent(c *SpanConfig) { o.apply(c) } -func (timestampSpanOption) private() {} -func (o timestampSpanOption) apply(c *SpanConfig) { c.Timestamp = time.Time(o) } - -// WithTimestamp sets the time of a Span life-cycle moment (e.g. started, -// stopped, errored). -func WithTimestamp(t time.Time) LifeCycleOption { - return timestampSpanOption(t) -} - -type linksSpanOption []Link - -func (o linksSpanOption) ApplySpan(c *SpanConfig) { c.Links = append(c.Links, []Link(o)...) } -func (linksSpanOption) private() {} - -// WithLinks adds links to a Span. The links are added to the existing Span -// links, i.e. this does not overwrite. -func WithLinks(links ...Link) SpanOption { - return linksSpanOption(links) -} - -type newRootSpanOption bool - -func (o newRootSpanOption) ApplySpan(c *SpanConfig) { c.NewRoot = bool(o) } -func (newRootSpanOption) private() {} - -// WithNewRoot specifies that the Span should be treated as a root Span. Any -// existing parent span context will be ignored when defining the Span's trace -// identifiers. -func WithNewRoot() SpanOption { - return newRootSpanOption(true) -} - -type spanKindSpanOption SpanKind - -func (o spanKindSpanOption) ApplySpan(c *SpanConfig) { c.SpanKind = SpanKind(o) } -func (o spanKindSpanOption) private() {} - -// WithSpanKind sets the SpanKind of a Span. -func WithSpanKind(kind SpanKind) SpanOption { - return spanKindSpanOption(kind) -} - -// InstrumentationOption is an interface for applying instrumentation specific -// options. -type InstrumentationOption interface { - TracerOption -} - -// WithInstrumentationVersion sets the instrumentation version. -func WithInstrumentationVersion(version string) InstrumentationOption { - return instrumentationVersionOption(version) -} - -type instrumentationVersionOption string - -func (i instrumentationVersionOption) ApplyTracer(config *TracerConfig) { - config.InstrumentationVersion = string(i) -} - -func (instrumentationVersionOption) private() {} diff --git a/vendor/go.opentelemetry.io/otel/trace/context.go b/vendor/go.opentelemetry.io/otel/trace/context.go deleted file mode 100644 index 76f9a083c4..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/context.go +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright The OpenTelemetry 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 trace // import "go.opentelemetry.io/otel/trace" - -import "context" - -type traceContextKeyType int - -const currentSpanKey traceContextKeyType = iota - -// ContextWithSpan returns a copy of parent with span set as the current Span. -func ContextWithSpan(parent context.Context, span Span) context.Context { - return context.WithValue(parent, currentSpanKey, span) -} - -// ContextWithSpanContext returns a copy of parent with sc as the current -// Span. The Span implementation that wraps sc is non-recording and performs -// no operations other than to return sc as the SpanContext from the -// SpanContext method. -func ContextWithSpanContext(parent context.Context, sc SpanContext) context.Context { - return ContextWithSpan(parent, nonRecordingSpan{sc: sc}) -} - -// ContextWithRemoteSpanContext returns a copy of parent with rsc set explicly -// as a remote SpanContext and as the current Span. The Span implementation -// that wraps rsc is non-recording and performs no operations other than to -// return rsc as the SpanContext from the SpanContext method. -func ContextWithRemoteSpanContext(parent context.Context, rsc SpanContext) context.Context { - return ContextWithSpanContext(parent, rsc.WithRemote(true)) -} - -// SpanFromContext returns the current Span from ctx. -// -// If no Span is currently set in ctx an implementation of a Span that -// performs no operations is returned. -func SpanFromContext(ctx context.Context) Span { - if ctx == nil { - return noopSpan{} - } - if span, ok := ctx.Value(currentSpanKey).(Span); ok { - return span - } - return noopSpan{} -} - -// SpanContextFromContext returns the current Span's SpanContext. -func SpanContextFromContext(ctx context.Context) SpanContext { - return SpanFromContext(ctx).SpanContext() -} diff --git a/vendor/go.opentelemetry.io/otel/trace/doc.go b/vendor/go.opentelemetry.io/otel/trace/doc.go deleted file mode 100644 index c962f3bc62..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/doc.go +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright The OpenTelemetry 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 trace provides an implementation of the tracing part of the -OpenTelemetry API. - -This package is currently in a pre-GA phase. Backwards incompatible changes -may be introduced in subsequent minor version releases as we work to track the -evolving OpenTelemetry specification and user feedback. - -To participate in distributed traces a Span needs to be created for the -operation being performed as part of a traced workflow. It its simplest form: - - var tracer trace.Tracer - - func init() { - tracer = otel.Tracer("instrumentation/package/name") - } - - func operation(ctx context.Context) { - var span trace.Span - ctx, span = tracer.Start(ctx, "operation") - defer span.End() - // ... - } - -A Tracer is unique to the instrumentation and is used to create Spans. -Instrumentation should be designed to accept a TracerProvider from which it -can create its own unique Tracer. Alternatively, the registered global -TracerProvider from the go.opentelemetry.io/otel package can be used as -a default. - - const ( - name = "instrumentation/package/name" - version = "0.1.0" - ) - - type Instrumentation struct { - tracer trace.Tracer - } - - func NewInstrumentation(tp trace.TracerProvider) *Instrumentation { - if tp == nil { - tp = otel.TracerProvider() - } - return &Instrumentation{ - tracer: tp.Tracer(name, trace.WithInstrumentationVersion(version)), - } - } - - func operation(ctx context.Context, inst *Instrumentation) { - var span trace.Span - ctx, span = inst.tracer.Start(ctx, "operation") - defer span.End() - // ... - } -*/ -package trace // import "go.opentelemetry.io/otel/trace" diff --git a/vendor/go.opentelemetry.io/otel/trace/go.mod b/vendor/go.opentelemetry.io/otel/trace/go.mod deleted file mode 100644 index 914e4f4384..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/go.mod +++ /dev/null @@ -1,53 +0,0 @@ -module go.opentelemetry.io/otel/trace - -go 1.14 - -replace go.opentelemetry.io/otel => ../ - -replace go.opentelemetry.io/otel/bridge/opencensus => ../bridge/opencensus - -replace go.opentelemetry.io/otel/bridge/opentracing => ../bridge/opentracing - -replace go.opentelemetry.io/otel/example/jaeger => ../example/jaeger - -replace go.opentelemetry.io/otel/example/namedtracer => ../example/namedtracer - -replace go.opentelemetry.io/otel/example/opencensus => ../example/opencensus - -replace go.opentelemetry.io/otel/example/otel-collector => ../example/otel-collector - -replace go.opentelemetry.io/otel/example/prom-collector => ../example/prom-collector - -replace go.opentelemetry.io/otel/example/prometheus => ../example/prometheus - -replace go.opentelemetry.io/otel/example/zipkin => ../example/zipkin - -replace go.opentelemetry.io/otel/exporters/metric/prometheus => ../exporters/metric/prometheus - -replace go.opentelemetry.io/otel/exporters/otlp => ../exporters/otlp - -replace go.opentelemetry.io/otel/exporters/stdout => ../exporters/stdout - -replace go.opentelemetry.io/otel/exporters/trace/jaeger => ../exporters/trace/jaeger - -replace go.opentelemetry.io/otel/exporters/trace/zipkin => ../exporters/trace/zipkin - -replace go.opentelemetry.io/otel/internal/tools => ../internal/tools - -replace go.opentelemetry.io/otel/metric => ../metric - -replace go.opentelemetry.io/otel/oteltest => ../oteltest - -replace go.opentelemetry.io/otel/sdk => ../sdk - -replace go.opentelemetry.io/otel/sdk/export/metric => ../sdk/export/metric - -replace go.opentelemetry.io/otel/sdk/metric => ../sdk/metric - -replace go.opentelemetry.io/otel/trace => ./ - -require ( - github.com/google/go-cmp v0.5.5 - github.com/stretchr/testify v1.7.0 - go.opentelemetry.io/otel v0.20.0 -) diff --git a/vendor/go.opentelemetry.io/otel/trace/go.sum b/vendor/go.opentelemetry.io/otel/trace/go.sum deleted file mode 100644 index b69f2e56da..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/go.sum +++ /dev/null @@ -1,15 +0,0 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= -github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= -github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vendor/go.opentelemetry.io/otel/trace/nonrecording.go b/vendor/go.opentelemetry.io/otel/trace/nonrecording.go deleted file mode 100644 index 88fcb81611..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/nonrecording.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright The OpenTelemetry 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 trace // import "go.opentelemetry.io/otel/trace" - -// nonRecordingSpan is a minimal implementation of a Span that wraps a -// SpanContext. It performs no operations other than to return the wrapped -// SpanContext. -type nonRecordingSpan struct { - noopSpan - - sc SpanContext -} - -// SpanContext returns the wrapped SpanContext. -func (s nonRecordingSpan) SpanContext() SpanContext { return s.sc } diff --git a/vendor/go.opentelemetry.io/otel/trace/noop.go b/vendor/go.opentelemetry.io/otel/trace/noop.go deleted file mode 100644 index 4a20f20cb4..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/noop.go +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright The OpenTelemetry 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 trace // import "go.opentelemetry.io/otel/trace" - -import ( - "context" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" -) - -// NewNoopTracerProvider returns an implementation of TracerProvider that -// performs no operations. The Tracer and Spans created from the returned -// TracerProvider also perform no operations. -func NewNoopTracerProvider() TracerProvider { - return noopTracerProvider{} -} - -type noopTracerProvider struct{} - -var _ TracerProvider = noopTracerProvider{} - -// Tracer returns noop implementation of Tracer. -func (p noopTracerProvider) Tracer(string, ...TracerOption) Tracer { - return noopTracer{} -} - -// noopTracer is an implementation of Tracer that preforms no operations. -type noopTracer struct{} - -var _ Tracer = noopTracer{} - -// Start starts a noop span. -func (t noopTracer) Start(ctx context.Context, name string, _ ...SpanOption) (context.Context, Span) { - span := noopSpan{} - return ContextWithSpan(ctx, span), span -} - -// noopSpan is an implementation of Span that preforms no operations. -type noopSpan struct{} - -var _ Span = noopSpan{} - -// SpanContext returns an empty span context. -func (noopSpan) SpanContext() SpanContext { return SpanContext{} } - -// IsRecording always returns false. -func (noopSpan) IsRecording() bool { return false } - -// SetStatus does nothing. -func (noopSpan) SetStatus(codes.Code, string) {} - -// SetError does nothing. -func (noopSpan) SetError(bool) {} - -// SetAttributes does nothing. -func (noopSpan) SetAttributes(...attribute.KeyValue) {} - -// End does nothing. -func (noopSpan) End(...SpanOption) {} - -// RecordError does nothing. -func (noopSpan) RecordError(error, ...EventOption) {} - -// Tracer returns the Tracer that created this Span. -func (noopSpan) Tracer() Tracer { return noopTracer{} } - -// AddEvent does nothing. -func (noopSpan) AddEvent(string, ...EventOption) {} - -// SetName does nothing. -func (noopSpan) SetName(string) {} diff --git a/vendor/go.opentelemetry.io/otel/trace/trace.go b/vendor/go.opentelemetry.io/otel/trace/trace.go deleted file mode 100644 index d372e7d9d7..0000000000 --- a/vendor/go.opentelemetry.io/otel/trace/trace.go +++ /dev/null @@ -1,673 +0,0 @@ -// Copyright The OpenTelemetry 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 trace // import "go.opentelemetry.io/otel/trace" - -import ( - "bytes" - "context" - "encoding/hex" - "encoding/json" - "regexp" - "strings" - "time" - - "go.opentelemetry.io/otel/attribute" - "go.opentelemetry.io/otel/codes" -) - -const ( - // FlagsSampled is a bitmask with the sampled bit set. A SpanContext - // with the sampling bit set means the span is sampled. - FlagsSampled = TraceFlags(0x01) - - errInvalidHexID errorConst = "trace-id and span-id can only contain [0-9a-f] characters, all lowercase" - - errInvalidTraceIDLength errorConst = "hex encoded trace-id must have length equals to 32" - errNilTraceID errorConst = "trace-id can't be all zero" - - errInvalidSpanIDLength errorConst = "hex encoded span-id must have length equals to 16" - errNilSpanID errorConst = "span-id can't be all zero" - - // based on the W3C Trace Context specification, see https://www.w3.org/TR/trace-context-1/#tracestate-header - traceStateKeyFormat = `[a-z][_0-9a-z\-\*\/]{0,255}` - traceStateKeyFormatWithMultiTenantVendor = `[a-z0-9][_0-9a-z\-\*\/]{0,240}@[a-z][_0-9a-z\-\*\/]{0,13}` - traceStateValueFormat = `[\x20-\x2b\x2d-\x3c\x3e-\x7e]{0,255}[\x21-\x2b\x2d-\x3c\x3e-\x7e]` - - traceStateMaxListMembers = 32 - - errInvalidTraceStateKeyValue errorConst = "provided key or value is not valid according to the" + - " W3C Trace Context specification" - errInvalidTraceStateMembersNumber errorConst = "trace state would exceed the maximum limit of members (32)" - errInvalidTraceStateDuplicate errorConst = "trace state key/value pairs with duplicate keys provided" -) - -type errorConst string - -func (e errorConst) Error() string { - return string(e) -} - -// TraceID is a unique identity of a trace. -// nolint:golint -type TraceID [16]byte - -var nilTraceID TraceID -var _ json.Marshaler = nilTraceID - -// IsValid checks whether the trace TraceID is valid. A valid trace ID does -// not consist of zeros only. -func (t TraceID) IsValid() bool { - return !bytes.Equal(t[:], nilTraceID[:]) -} - -// MarshalJSON implements a custom marshal function to encode TraceID -// as a hex string. -func (t TraceID) MarshalJSON() ([]byte, error) { - return json.Marshal(t.String()) -} - -// String returns the hex string representation form of a TraceID -func (t TraceID) String() string { - return hex.EncodeToString(t[:]) -} - -// SpanID is a unique identity of a span in a trace. -type SpanID [8]byte - -var nilSpanID SpanID -var _ json.Marshaler = nilSpanID - -// IsValid checks whether the SpanID is valid. A valid SpanID does not consist -// of zeros only. -func (s SpanID) IsValid() bool { - return !bytes.Equal(s[:], nilSpanID[:]) -} - -// MarshalJSON implements a custom marshal function to encode SpanID -// as a hex string. -func (s SpanID) MarshalJSON() ([]byte, error) { - return json.Marshal(s.String()) -} - -// String returns the hex string representation form of a SpanID -func (s SpanID) String() string { - return hex.EncodeToString(s[:]) -} - -// TraceIDFromHex returns a TraceID from a hex string if it is compliant with -// the W3C trace-context specification. See more at -// https://www.w3.org/TR/trace-context/#trace-id -// nolint:golint -func TraceIDFromHex(h string) (TraceID, error) { - t := TraceID{} - if len(h) != 32 { - return t, errInvalidTraceIDLength - } - - if err := decodeHex(h, t[:]); err != nil { - return t, err - } - - if !t.IsValid() { - return t, errNilTraceID - } - return t, nil -} - -// SpanIDFromHex returns a SpanID from a hex string if it is compliant -// with the w3c trace-context specification. -// See more at https://www.w3.org/TR/trace-context/#parent-id -func SpanIDFromHex(h string) (SpanID, error) { - s := SpanID{} - if len(h) != 16 { - return s, errInvalidSpanIDLength - } - - if err := decodeHex(h, s[:]); err != nil { - return s, err - } - - if !s.IsValid() { - return s, errNilSpanID - } - return s, nil -} - -func decodeHex(h string, b []byte) error { - for _, r := range h { - switch { - case 'a' <= r && r <= 'f': - continue - case '0' <= r && r <= '9': - continue - default: - return errInvalidHexID - } - } - - decoded, err := hex.DecodeString(h) - if err != nil { - return err - } - - copy(b, decoded) - return nil -} - -// TraceState provides additional vendor-specific trace identification information -// across different distributed tracing systems. It represents an immutable list consisting -// of key/value pairs. There can be a maximum of 32 entries in the list. -// -// Key and value of each list member must be valid according to the W3C Trace Context specification -// (see https://www.w3.org/TR/trace-context-1/#key and https://www.w3.org/TR/trace-context-1/#value -// respectively). -// -// Trace state must be valid according to the W3C Trace Context specification at all times. All -// mutating operations validate their input and, in case of valid parameters, return a new TraceState. -type TraceState struct { //nolint:golint - // TODO @matej-g: Consider implementing this as attribute.Set, see - // comment https://github.com/open-telemetry/opentelemetry-go/pull/1340#discussion_r540599226 - kvs []attribute.KeyValue -} - -var _ json.Marshaler = TraceState{} -var _ json.Marshaler = SpanContext{} - -var keyFormatRegExp = regexp.MustCompile( - `^((` + traceStateKeyFormat + `)|(` + traceStateKeyFormatWithMultiTenantVendor + `))$`, -) -var valueFormatRegExp = regexp.MustCompile(`^(` + traceStateValueFormat + `)$`) - -// MarshalJSON implements a custom marshal function to encode trace state. -func (ts TraceState) MarshalJSON() ([]byte, error) { - return json.Marshal(ts.kvs) -} - -// String returns trace state as a string valid according to the -// W3C Trace Context specification. -func (ts TraceState) String() string { - var sb strings.Builder - - for i, kv := range ts.kvs { - sb.WriteString((string)(kv.Key)) - sb.WriteByte('=') - sb.WriteString(kv.Value.Emit()) - - if i != len(ts.kvs)-1 { - sb.WriteByte(',') - } - } - - return sb.String() -} - -// Get returns a value for given key from the trace state. -// If no key is found or provided key is invalid, returns an empty value. -func (ts TraceState) Get(key attribute.Key) attribute.Value { - if !isTraceStateKeyValid(key) { - return attribute.Value{} - } - - for _, kv := range ts.kvs { - if kv.Key == key { - return kv.Value - } - } - - return attribute.Value{} -} - -// Insert adds a new key/value, if one doesn't exists; otherwise updates the existing entry. -// The new or updated entry is always inserted at the beginning of the TraceState, i.e. -// on the left side, as per the W3C Trace Context specification requirement. -func (ts TraceState) Insert(entry attribute.KeyValue) (TraceState, error) { - if !isTraceStateKeyValueValid(entry) { - return ts, errInvalidTraceStateKeyValue - } - - ckvs := ts.copyKVsAndDeleteEntry(entry.Key) - if len(ckvs)+1 > traceStateMaxListMembers { - return ts, errInvalidTraceStateMembersNumber - } - - ckvs = append(ckvs, attribute.KeyValue{}) - copy(ckvs[1:], ckvs) - ckvs[0] = entry - - return TraceState{ckvs}, nil -} - -// Delete removes specified entry from the trace state. -func (ts TraceState) Delete(key attribute.Key) (TraceState, error) { - if !isTraceStateKeyValid(key) { - return ts, errInvalidTraceStateKeyValue - } - - return TraceState{ts.copyKVsAndDeleteEntry(key)}, nil -} - -// IsEmpty returns true if the TraceState does not contain any entries -func (ts TraceState) IsEmpty() bool { - return len(ts.kvs) == 0 -} - -func (ts TraceState) copyKVsAndDeleteEntry(key attribute.Key) []attribute.KeyValue { - ckvs := make([]attribute.KeyValue, len(ts.kvs)) - copy(ckvs, ts.kvs) - for i, kv := range ts.kvs { - if kv.Key == key { - ckvs = append(ckvs[:i], ckvs[i+1:]...) - break - } - } - - return ckvs -} - -// TraceStateFromKeyValues is a convenience method to create a new TraceState from -// provided key/value pairs. -func TraceStateFromKeyValues(kvs ...attribute.KeyValue) (TraceState, error) { //nolint:golint - if len(kvs) == 0 { - return TraceState{}, nil - } - - if len(kvs) > traceStateMaxListMembers { - return TraceState{}, errInvalidTraceStateMembersNumber - } - - km := make(map[attribute.Key]bool) - for _, kv := range kvs { - if !isTraceStateKeyValueValid(kv) { - return TraceState{}, errInvalidTraceStateKeyValue - } - _, ok := km[kv.Key] - if ok { - return TraceState{}, errInvalidTraceStateDuplicate - } - km[kv.Key] = true - } - - ckvs := make([]attribute.KeyValue, len(kvs)) - copy(ckvs, kvs) - return TraceState{ckvs}, nil -} - -func isTraceStateKeyValid(key attribute.Key) bool { - return keyFormatRegExp.MatchString(string(key)) -} - -func isTraceStateKeyValueValid(kv attribute.KeyValue) bool { - return isTraceStateKeyValid(kv.Key) && - valueFormatRegExp.MatchString(kv.Value.Emit()) -} - -// TraceFlags contains flags that can be set on a SpanContext -type TraceFlags byte //nolint:golint - -// IsSampled returns if the sampling bit is set in the TraceFlags. -func (tf TraceFlags) IsSampled() bool { - return tf&FlagsSampled == FlagsSampled -} - -// WithSampled sets the sampling bit in a new copy of the TraceFlags. -func (tf TraceFlags) WithSampled(sampled bool) TraceFlags { - if sampled { - return tf | FlagsSampled - } - - return tf &^ FlagsSampled -} - -// MarshalJSON implements a custom marshal function to encode TraceFlags -// as a hex string. -func (tf TraceFlags) MarshalJSON() ([]byte, error) { - return json.Marshal(tf.String()) -} - -// String returns the hex string representation form of TraceFlags -func (tf TraceFlags) String() string { - return hex.EncodeToString([]byte{byte(tf)}[:]) -} - -// SpanContextConfig contains mutable fields usable for constructing -// an immutable SpanContext. -type SpanContextConfig struct { - TraceID TraceID - SpanID SpanID - TraceFlags TraceFlags - TraceState TraceState - Remote bool -} - -// NewSpanContext constructs a SpanContext using values from the provided -// SpanContextConfig. -func NewSpanContext(config SpanContextConfig) SpanContext { - return SpanContext{ - traceID: config.TraceID, - spanID: config.SpanID, - traceFlags: config.TraceFlags, - traceState: config.TraceState, - remote: config.Remote, - } -} - -// SpanContext contains identifying trace information about a Span. -type SpanContext struct { - traceID TraceID - spanID SpanID - traceFlags TraceFlags - traceState TraceState - remote bool -} - -// IsValid returns if the SpanContext is valid. A valid span context has a -// valid TraceID and SpanID. -func (sc SpanContext) IsValid() bool { - return sc.HasTraceID() && sc.HasSpanID() -} - -// IsRemote indicates whether the SpanContext represents a remotely-created Span. -func (sc SpanContext) IsRemote() bool { - return sc.remote -} - -// WithRemote returns a copy of sc with the Remote property set to remote. -func (sc SpanContext) WithRemote(remote bool) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: sc.spanID, - traceFlags: sc.traceFlags, - traceState: sc.traceState, - remote: remote, - } -} - -// TraceID returns the TraceID from the SpanContext. -func (sc SpanContext) TraceID() TraceID { - return sc.traceID -} - -// HasTraceID checks if the SpanContext has a valid TraceID. -func (sc SpanContext) HasTraceID() bool { - return sc.traceID.IsValid() -} - -// WithTraceID returns a new SpanContext with the TraceID replaced. -func (sc SpanContext) WithTraceID(traceID TraceID) SpanContext { - return SpanContext{ - traceID: traceID, - spanID: sc.spanID, - traceFlags: sc.traceFlags, - traceState: sc.traceState, - remote: sc.remote, - } -} - -// SpanID returns the SpanID from the SpanContext. -func (sc SpanContext) SpanID() SpanID { - return sc.spanID -} - -// HasSpanID checks if the SpanContext has a valid SpanID. -func (sc SpanContext) HasSpanID() bool { - return sc.spanID.IsValid() -} - -// WithSpanID returns a new SpanContext with the SpanID replaced. -func (sc SpanContext) WithSpanID(spanID SpanID) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: spanID, - traceFlags: sc.traceFlags, - traceState: sc.traceState, - remote: sc.remote, - } -} - -// TraceFlags returns the flags from the SpanContext. -func (sc SpanContext) TraceFlags() TraceFlags { - return sc.traceFlags -} - -// IsSampled returns if the sampling bit is set in the SpanContext's TraceFlags. -func (sc SpanContext) IsSampled() bool { - return sc.traceFlags.IsSampled() -} - -// WithTraceFlags returns a new SpanContext with the TraceFlags replaced. -func (sc SpanContext) WithTraceFlags(flags TraceFlags) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: sc.spanID, - traceFlags: flags, - traceState: sc.traceState, - remote: sc.remote, - } -} - -// TraceState returns the TraceState from the SpanContext. -func (sc SpanContext) TraceState() TraceState { - return sc.traceState -} - -// WithTraceState returns a new SpanContext with the TraceState replaced. -func (sc SpanContext) WithTraceState(state TraceState) SpanContext { - return SpanContext{ - traceID: sc.traceID, - spanID: sc.spanID, - traceFlags: sc.traceFlags, - traceState: state, - remote: sc.remote, - } -} - -// Equal is a predicate that determines whether two SpanContext values are equal. -func (sc SpanContext) Equal(other SpanContext) bool { - return sc.traceID == other.traceID && - sc.spanID == other.spanID && - sc.traceFlags == other.traceFlags && - sc.traceState.String() == other.traceState.String() && - sc.remote == other.remote -} - -// MarshalJSON implements a custom marshal function to encode a SpanContext. -func (sc SpanContext) MarshalJSON() ([]byte, error) { - return json.Marshal(SpanContextConfig{ - TraceID: sc.traceID, - SpanID: sc.spanID, - TraceFlags: sc.traceFlags, - TraceState: sc.traceState, - Remote: sc.remote, - }) -} - -// Span is the individual component of a trace. It represents a single named -// and timed operation of a workflow that is traced. A Tracer is used to -// create a Span and it is then up to the operation the Span represents to -// properly end the Span when the operation itself ends. -type Span interface { - // Tracer returns the Tracer that created the Span. Tracer MUST NOT be - // nil. - Tracer() Tracer - - // End completes the Span. The Span is considered complete and ready to be - // delivered through the rest of the telemetry pipeline after this method - // is called. Therefore, updates to the Span are not allowed after this - // method has been called. - End(options ...SpanOption) - - // AddEvent adds an event with the provided name and options. - AddEvent(name string, options ...EventOption) - - // IsRecording returns the recording state of the Span. It will return - // true if the Span is active and events can be recorded. - IsRecording() bool - - // RecordError will record err as an exception span event for this span. An - // additional call toSetStatus is required if the Status of the Span should - // be set to Error, this method does not change the Span status. If this - // span is not being recorded or err is nil than this method does nothing. - RecordError(err error, options ...EventOption) - - // SpanContext returns the SpanContext of the Span. The returned - // SpanContext is usable even after the End has been called for the Span. - SpanContext() SpanContext - - // SetStatus sets the status of the Span in the form of a code and a - // message. SetStatus overrides the value of previous calls to SetStatus - // on the Span. - SetStatus(code codes.Code, msg string) - - // SetName sets the Span name. - SetName(name string) - - // SetAttributes sets kv as attributes of the Span. If a key from kv - // already exists for an attribute of the Span it will be overwritten with - // the value contained in kv. - SetAttributes(kv ...attribute.KeyValue) -} - -// Event is a thing that happened during a Span's lifetime. -type Event struct { - // Name is the name of this event - Name string - - // Attributes describe the aspects of the event. - Attributes []attribute.KeyValue - - // DroppedAttributeCount is the number of attributes that were not - // recorded due to configured limits being reached. - DroppedAttributeCount int - - // Time at which this event was recorded. - Time time.Time -} - -// Link is the relationship between two Spans. The relationship can be within -// the same Trace or across different Traces. -// -// For example, a Link is used in the following situations: -// -// 1. Batch Processing: A batch of operations may contain operations -// associated with one or more traces/spans. Since there can only be one -// parent SpanContext, a Link is used to keep reference to the -// SpanContext of all operations in the batch. -// 2. Public Endpoint: A SpanContext for an in incoming client request on a -// public endpoint should be considered untrusted. In such a case, a new -// trace with its own identity and sampling decision needs to be created, -// but this new trace needs to be related to the original trace in some -// form. A Link is used to keep reference to the original SpanContext and -// track the relationship. -type Link struct { - // SpanContext of the linked Span. - SpanContext - - // Attributes describe the aspects of the link. - Attributes []attribute.KeyValue - - // DroppedAttributeCount is the number of attributes that were not - // recorded due to configured limits being reached. - DroppedAttributeCount int -} - -// SpanKind is the role a Span plays in a Trace. -type SpanKind int - -// As a convenience, these match the proto definition, see -// https://github.com/open-telemetry/opentelemetry-proto/blob/30d237e1ff3ab7aa50e0922b5bebdd93505090af/opentelemetry/proto/trace/v1/trace.proto#L101-L129 -// -// The unspecified value is not a valid `SpanKind`. Use `ValidateSpanKind()` -// to coerce a span kind to a valid value. -const ( - // SpanKindUnspecified is an unspecified SpanKind and is not a valid - // SpanKind. SpanKindUnspecified should be replaced with SpanKindInternal - // if it is received. - SpanKindUnspecified SpanKind = 0 - // SpanKindInternal is a SpanKind for a Span that represents an internal - // operation within an application. - SpanKindInternal SpanKind = 1 - // SpanKindServer is a SpanKind for a Span that represents the operation - // of handling a request from a client. - SpanKindServer SpanKind = 2 - // SpanKindClient is a SpanKind for a Span that represents the operation - // of client making a request to a server. - SpanKindClient SpanKind = 3 - // SpanKindProducer is a SpanKind for a Span that represents the operation - // of a producer sending a message to a message broker. Unlike - // SpanKindClient and SpanKindServer, there is often no direct - // relationship between this kind of Span and a SpanKindConsumer kind. A - // SpanKindProducer Span will end once the message is accepted by the - // message broker which might not overlap with the processing of that - // message. - SpanKindProducer SpanKind = 4 - // SpanKindConsumer is a SpanKind for a Span that represents the operation - // of a consumer receiving a message from a message broker. Like - // SpanKindProducer Spans, there is often no direct relationship between - // this Span and the Span that produced the message. - SpanKindConsumer SpanKind = 5 -) - -// ValidateSpanKind returns a valid span kind value. This will coerce -// invalid values into the default value, SpanKindInternal. -func ValidateSpanKind(spanKind SpanKind) SpanKind { - switch spanKind { - case SpanKindInternal, - SpanKindServer, - SpanKindClient, - SpanKindProducer, - SpanKindConsumer: - // valid - return spanKind - default: - return SpanKindInternal - } -} - -// String returns the specified name of the SpanKind in lower-case. -func (sk SpanKind) String() string { - switch sk { - case SpanKindInternal: - return "internal" - case SpanKindServer: - return "server" - case SpanKindClient: - return "client" - case SpanKindProducer: - return "producer" - case SpanKindConsumer: - return "consumer" - default: - return "unspecified" - } -} - -// Tracer is the creator of Spans. -type Tracer interface { - // Start creates a span. - Start(ctx context.Context, spanName string, opts ...SpanOption) (context.Context, Span) -} - -// TracerProvider provides access to instrumentation Tracers. -type TracerProvider interface { - // Tracer creates an implementation of the Tracer interface. - // The instrumentationName must be the name of the library providing - // instrumentation. This name may be the same as the instrumented code - // only if that code provides built-in instrumentation. If the - // instrumentationName is empty, then a implementation defined default - // name will be used instead. - // - // This method must be concurrency safe. - Tracer(instrumentationName string, opts ...TracerOption) Tracer -} diff --git a/vendor/go.opentelemetry.io/otel/unit/doc.go b/vendor/go.opentelemetry.io/otel/unit/doc.go deleted file mode 100644 index 0d77a750cc..0000000000 --- a/vendor/go.opentelemetry.io/otel/unit/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright The OpenTelemetry 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 unit provides units. -// -// This package is currently in a pre-GA phase. Backwards incompatible changes -// may be introduced in subsequent minor version releases as we work to track -// the evolving OpenTelemetry specification and user feedback. -package unit // import "go.opentelemetry.io/otel/unit" diff --git a/vendor/go.opentelemetry.io/otel/unit/unit.go b/vendor/go.opentelemetry.io/otel/unit/unit.go deleted file mode 100644 index 523bfe1d0a..0000000000 --- a/vendor/go.opentelemetry.io/otel/unit/unit.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright The OpenTelemetry 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 unit // import "go.opentelemetry.io/otel/unit" - -type Unit string - -const ( - Dimensionless Unit = "1" - Bytes Unit = "By" - Milliseconds Unit = "ms" -) diff --git a/vendor/go.uber.org/atomic/.gitignore b/vendor/go.uber.org/atomic/.gitignore index c3fa253893..2e337a0ed5 100644 --- a/vendor/go.uber.org/atomic/.gitignore +++ b/vendor/go.uber.org/atomic/.gitignore @@ -10,3 +10,6 @@ lint.log # Profiling output *.prof + +# Output of fossa analyzer +/fossa diff --git a/vendor/go.uber.org/atomic/.travis.yml b/vendor/go.uber.org/atomic/.travis.yml deleted file mode 100644 index 13d0a4f254..0000000000 --- a/vendor/go.uber.org/atomic/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -sudo: false -language: go -go_import_path: go.uber.org/atomic - -env: - global: - - GO111MODULE=on - -matrix: - include: - - go: oldstable - - go: stable - env: LINT=1 - -cache: - directories: - - vendor - -before_install: - - go version - -script: - - test -z "$LINT" || make lint - - make cover - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/vendor/go.uber.org/atomic/CHANGELOG.md b/vendor/go.uber.org/atomic/CHANGELOG.md index 24c0274dc3..3c3f2380cd 100644 --- a/vendor/go.uber.org/atomic/CHANGELOG.md +++ b/vendor/go.uber.org/atomic/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.8.0] - 2021-06-09 +### Added +- Add `atomic.Uintptr` type for atomic operations on `uintptr` values. +- Add `atomic.UnsafePointer` type for atomic operations on `unsafe.Pointer` values. + ## [1.7.0] - 2020-09-14 ### Added - Support JSON serialization and deserialization of primitive atomic types. @@ -63,6 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release. +[1.8.0]: https://github.com/uber-go/atomic/compare/v1.7.0...v1.8.0 [1.7.0]: https://github.com/uber-go/atomic/compare/v1.6.0...v1.7.0 [1.6.0]: https://github.com/uber-go/atomic/compare/v1.5.1...v1.6.0 [1.5.1]: https://github.com/uber-go/atomic/compare/v1.5.0...v1.5.1 diff --git a/vendor/go.uber.org/atomic/Makefile b/vendor/go.uber.org/atomic/Makefile index 1b1376d425..46c945b32b 100644 --- a/vendor/go.uber.org/atomic/Makefile +++ b/vendor/go.uber.org/atomic/Makefile @@ -69,6 +69,7 @@ generate: $(GEN_ATOMICINT) $(GEN_ATOMICWRAPPER) generatenodirty: @[ -z "$$(git status --porcelain)" ] || ( \ echo "Working tree is dirty. Commit your changes first."; \ + git status; \ exit 1 ) @make generate @status=$$(git status --porcelain); \ diff --git a/vendor/go.uber.org/atomic/README.md b/vendor/go.uber.org/atomic/README.md index ade0c20f16..96b47a1f12 100644 --- a/vendor/go.uber.org/atomic/README.md +++ b/vendor/go.uber.org/atomic/README.md @@ -55,8 +55,8 @@ Released under the [MIT License](LICENSE.txt). [doc-img]: https://godoc.org/github.com/uber-go/atomic?status.svg [doc]: https://godoc.org/go.uber.org/atomic -[ci-img]: https://travis-ci.com/uber-go/atomic.svg?branch=master -[ci]: https://travis-ci.com/uber-go/atomic +[ci-img]: https://github.com/uber-go/atomic/actions/workflows/go.yml/badge.svg +[ci]: https://github.com/uber-go/atomic/actions/workflows/go.yml [cov-img]: https://codecov.io/gh/uber-go/atomic/branch/master/graph/badge.svg [cov]: https://codecov.io/gh/uber-go/atomic [reportcard-img]: https://goreportcard.com/badge/go.uber.org/atomic diff --git a/vendor/go.uber.org/atomic/bool.go b/vendor/go.uber.org/atomic/bool.go index 9cf1914b1f..de5f72ad28 100644 --- a/vendor/go.uber.org/atomic/bool.go +++ b/vendor/go.uber.org/atomic/bool.go @@ -1,6 +1,6 @@ // @generated Code generated by gen-atomicwrapper. -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2020-2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/go.uber.org/atomic/duration.go b/vendor/go.uber.org/atomic/duration.go index 027cfcb20b..2bad9c010f 100644 --- a/vendor/go.uber.org/atomic/duration.go +++ b/vendor/go.uber.org/atomic/duration.go @@ -1,6 +1,6 @@ // @generated Code generated by gen-atomicwrapper. -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2020-2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/go.uber.org/atomic/error.go b/vendor/go.uber.org/atomic/error.go index a6166fbea0..fc529756cf 100644 --- a/vendor/go.uber.org/atomic/error.go +++ b/vendor/go.uber.org/atomic/error.go @@ -1,6 +1,6 @@ // @generated Code generated by gen-atomicwrapper. -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2020-2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/go.uber.org/atomic/float64.go b/vendor/go.uber.org/atomic/float64.go index 0719060207..f833fd373f 100644 --- a/vendor/go.uber.org/atomic/float64.go +++ b/vendor/go.uber.org/atomic/float64.go @@ -1,6 +1,6 @@ // @generated Code generated by gen-atomicwrapper. -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2020-2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/go.uber.org/atomic/gen.go b/vendor/go.uber.org/atomic/gen.go index 50d6b24858..1e9ef4f879 100644 --- a/vendor/go.uber.org/atomic/gen.go +++ b/vendor/go.uber.org/atomic/gen.go @@ -24,3 +24,4 @@ package atomic //go:generate bin/gen-atomicint -name=Int64 -wrapped=int64 -file=int64.go //go:generate bin/gen-atomicint -name=Uint32 -wrapped=uint32 -unsigned -file=uint32.go //go:generate bin/gen-atomicint -name=Uint64 -wrapped=uint64 -unsigned -file=uint64.go +//go:generate bin/gen-atomicint -name=Uintptr -wrapped=uintptr -unsigned -file=uintptr.go diff --git a/vendor/go.uber.org/atomic/go.sum b/vendor/go.uber.org/atomic/go.sum index 4f76e62c1f..4f89841505 100644 --- a/vendor/go.uber.org/atomic/go.sum +++ b/vendor/go.uber.org/atomic/go.sum @@ -1,4 +1,3 @@ -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/vendor/go.uber.org/atomic/int32.go b/vendor/go.uber.org/atomic/int32.go index 18ae56493e..a20fc998e1 100644 --- a/vendor/go.uber.org/atomic/int32.go +++ b/vendor/go.uber.org/atomic/int32.go @@ -1,6 +1,6 @@ // @generated Code generated by gen-atomicint. -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2020-2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/go.uber.org/atomic/int64.go b/vendor/go.uber.org/atomic/int64.go index 2bcbbfaa95..f03ee00905 100644 --- a/vendor/go.uber.org/atomic/int64.go +++ b/vendor/go.uber.org/atomic/int64.go @@ -1,6 +1,6 @@ // @generated Code generated by gen-atomicint. -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2020-2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/go.uber.org/atomic/string.go b/vendor/go.uber.org/atomic/string.go index 225b7a2be0..f8a6f339a6 100644 --- a/vendor/go.uber.org/atomic/string.go +++ b/vendor/go.uber.org/atomic/string.go @@ -1,6 +1,6 @@ // @generated Code generated by gen-atomicwrapper. -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2020-2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/go.uber.org/atomic/uint32.go b/vendor/go.uber.org/atomic/uint32.go index a973aba1a6..0b5173230c 100644 --- a/vendor/go.uber.org/atomic/uint32.go +++ b/vendor/go.uber.org/atomic/uint32.go @@ -1,6 +1,6 @@ // @generated Code generated by gen-atomicint. -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2020-2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/go.uber.org/atomic/uint64.go b/vendor/go.uber.org/atomic/uint64.go index 3b6c71fd5a..71e3f3247f 100644 --- a/vendor/go.uber.org/atomic/uint64.go +++ b/vendor/go.uber.org/atomic/uint64.go @@ -1,6 +1,6 @@ // @generated Code generated by gen-atomicint. -// Copyright (c) 2020 Uber Technologies, Inc. +// Copyright (c) 2020-2021 Uber Technologies, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/go.uber.org/atomic/uintptr.go b/vendor/go.uber.org/atomic/uintptr.go new file mode 100644 index 0000000000..6b363ada35 --- /dev/null +++ b/vendor/go.uber.org/atomic/uintptr.go @@ -0,0 +1,102 @@ +// @generated Code generated by gen-atomicint. + +// Copyright (c) 2020-2021 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package atomic + +import ( + "encoding/json" + "strconv" + "sync/atomic" +) + +// Uintptr is an atomic wrapper around uintptr. +type Uintptr struct { + _ nocmp // disallow non-atomic comparison + + v uintptr +} + +// NewUintptr creates a new Uintptr. +func NewUintptr(i uintptr) *Uintptr { + return &Uintptr{v: i} +} + +// Load atomically loads the wrapped value. +func (i *Uintptr) Load() uintptr { + return atomic.LoadUintptr(&i.v) +} + +// Add atomically adds to the wrapped uintptr and returns the new value. +func (i *Uintptr) Add(n uintptr) uintptr { + return atomic.AddUintptr(&i.v, n) +} + +// Sub atomically subtracts from the wrapped uintptr and returns the new value. +func (i *Uintptr) Sub(n uintptr) uintptr { + return atomic.AddUintptr(&i.v, ^(n - 1)) +} + +// Inc atomically increments the wrapped uintptr and returns the new value. +func (i *Uintptr) Inc() uintptr { + return i.Add(1) +} + +// Dec atomically decrements the wrapped uintptr and returns the new value. +func (i *Uintptr) Dec() uintptr { + return i.Sub(1) +} + +// CAS is an atomic compare-and-swap. +func (i *Uintptr) CAS(old, new uintptr) bool { + return atomic.CompareAndSwapUintptr(&i.v, old, new) +} + +// Store atomically stores the passed value. +func (i *Uintptr) Store(n uintptr) { + atomic.StoreUintptr(&i.v, n) +} + +// Swap atomically swaps the wrapped uintptr and returns the old value. +func (i *Uintptr) Swap(n uintptr) uintptr { + return atomic.SwapUintptr(&i.v, n) +} + +// MarshalJSON encodes the wrapped uintptr into JSON. +func (i *Uintptr) MarshalJSON() ([]byte, error) { + return json.Marshal(i.Load()) +} + +// UnmarshalJSON decodes JSON into the wrapped uintptr. +func (i *Uintptr) UnmarshalJSON(b []byte) error { + var v uintptr + if err := json.Unmarshal(b, &v); err != nil { + return err + } + i.Store(v) + return nil +} + +// String encodes the wrapped value as a string. +func (i *Uintptr) String() string { + v := i.Load() + return strconv.FormatUint(uint64(v), 10) +} diff --git a/vendor/go.uber.org/atomic/unsafe_pointer.go b/vendor/go.uber.org/atomic/unsafe_pointer.go new file mode 100644 index 0000000000..a3830c665d --- /dev/null +++ b/vendor/go.uber.org/atomic/unsafe_pointer.go @@ -0,0 +1,58 @@ +// Copyright (c) 2021 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package atomic + +import ( + "sync/atomic" + "unsafe" +) + +// UnsafePointer is an atomic wrapper around unsafe.Pointer. +type UnsafePointer struct { + _ nocmp // disallow non-atomic comparison + + v unsafe.Pointer +} + +// NewUnsafePointer creates a new UnsafePointer. +func NewUnsafePointer(p unsafe.Pointer) *UnsafePointer { + return &UnsafePointer{v: p} +} + +// Load atomically loads the wrapped value. +func (p *UnsafePointer) Load() unsafe.Pointer { + return atomic.LoadPointer(&p.v) +} + +// Store atomically stores the passed value. +func (p *UnsafePointer) Store(q unsafe.Pointer) { + atomic.StorePointer(&p.v, q) +} + +// Swap atomically swaps the wrapped unsafe.Pointer and returns the old value. +func (p *UnsafePointer) Swap(q unsafe.Pointer) unsafe.Pointer { + return atomic.SwapPointer(&p.v, q) +} + +// CAS is an atomic compare-and-swap. +func (p *UnsafePointer) CAS(old, new unsafe.Pointer) bool { + return atomic.CompareAndSwapPointer(&p.v, old, new) +} diff --git a/vendor/go.uber.org/zap/CHANGELOG.md b/vendor/go.uber.org/zap/CHANGELOG.md index 3b99bf0ac8..6c32101216 100644 --- a/vendor/go.uber.org/zap/CHANGELOG.md +++ b/vendor/go.uber.org/zap/CHANGELOG.md @@ -1,5 +1,37 @@ # Changelog +## 1.18.1 (28 Jun 2021) + +Bugfixes: +* [#974][]: Fix nil dereference in logger constructed by `zap.NewNop`. + +[#974]: https://github.com/uber-go/zap/pull/974 + +## 1.18.0 (28 Jun 2021) + +Enhancements: +* [#961][]: Add `zapcore.BufferedWriteSyncer`, a new `WriteSyncer` that buffers + messages in-memory and flushes them periodically. +* [#971][]: Add `zapio.Writer` to use a Zap logger as an `io.Writer`. +* [#897][]: Add `zap.WithClock` option to control the source of time via the + new `zapcore.Clock` interface. +* [#949][]: Avoid panicking in `zap.SugaredLogger` when arguments of `*w` + methods don't match expectations. +* [#943][]: Add support for filtering by level or arbitrary matcher function to + `zaptest/observer`. +* [#691][]: Comply with `io.StringWriter` and `io.ByteWriter` in Zap's + `buffer.Buffer`. + +Thanks to @atrn0, @ernado, @heyanfu, @hnlq715, @zchee +for their contributions to this release. + +[#691]: https://github.com/uber-go/zap/pull/691 +[#897]: https://github.com/uber-go/zap/pull/897 +[#943]: https://github.com/uber-go/zap/pull/943 +[#949]: https://github.com/uber-go/zap/pull/949 +[#961]: https://github.com/uber-go/zap/pull/961 +[#971]: https://github.com/uber-go/zap/pull/971 + ## 1.17.0 (25 May 2021) Bugfixes: diff --git a/vendor/go.uber.org/zap/buffer/buffer.go b/vendor/go.uber.org/zap/buffer/buffer.go index 3f4b86e081..9e929cd98e 100644 --- a/vendor/go.uber.org/zap/buffer/buffer.go +++ b/vendor/go.uber.org/zap/buffer/buffer.go @@ -106,6 +106,24 @@ func (b *Buffer) Write(bs []byte) (int, error) { return len(bs), nil } +// WriteByte writes a single byte to the Buffer. +// +// Error returned is always nil, function signature is compatible +// with bytes.Buffer and bufio.Writer +func (b *Buffer) WriteByte(v byte) error { + b.AppendByte(v) + return nil +} + +// WriteString writes a string to the Buffer. +// +// Error returned is always nil, function signature is compatible +// with bytes.Buffer and bufio.Writer +func (b *Buffer) WriteString(s string) (int, error) { + b.AppendString(s) + return len(s), nil +} + // TrimNewline trims any final "\n" byte from the end of the buffer. func (b *Buffer) TrimNewline() { if i := len(b.bs) - 1; i >= 0 { diff --git a/vendor/go.uber.org/zap/go.mod b/vendor/go.uber.org/zap/go.mod index 6578a35454..9455c99cc9 100644 --- a/vendor/go.uber.org/zap/go.mod +++ b/vendor/go.uber.org/zap/go.mod @@ -3,9 +3,11 @@ module go.uber.org/zap go 1.13 require ( + github.com/benbjohnson/clock v1.1.0 github.com/pkg/errors v0.8.1 github.com/stretchr/testify v1.7.0 go.uber.org/atomic v1.7.0 + go.uber.org/goleak v1.1.10 go.uber.org/multierr v1.6.0 gopkg.in/yaml.v2 v2.2.8 gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect diff --git a/vendor/go.uber.org/zap/go.sum b/vendor/go.uber.org/zap/go.sum index 911a87ae1c..b330071a06 100644 --- a/vendor/go.uber.org/zap/go.sum +++ b/vendor/go.uber.org/zap/go.sum @@ -1,20 +1,52 @@ +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2 h1:VklqNMn3ovrHsnt90PveolxSbWFaJdECFbxSq0Mqo2M= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/sync v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a h1:1BGLXjeY4akVXGgbC9HugT3Jv3hCI0z56oJR5vAMgBU= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11 h1:Yq9t9jnGoR+dBuitxdo9l6Q7xh/zOyNnYUtDKaQ3x0E= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7 h1:9zdDQZ7Thm29KFXgAX/+yaf3eVbP7djjWp/dXAppNCc= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/vendor/go.uber.org/zap/logger.go b/vendor/go.uber.org/zap/logger.go index 553f258e74..f116bd936f 100644 --- a/vendor/go.uber.org/zap/logger.go +++ b/vendor/go.uber.org/zap/logger.go @@ -26,7 +26,6 @@ import ( "os" "runtime" "strings" - "time" "go.uber.org/zap/zapcore" ) @@ -51,6 +50,8 @@ type Logger struct { addStack zapcore.LevelEnabler callerSkip int + + clock zapcore.Clock } // New constructs a new Logger from the provided zapcore.Core and Options. If @@ -71,6 +72,7 @@ func New(core zapcore.Core, options ...Option) *Logger { core: core, errorOutput: zapcore.Lock(os.Stderr), addStack: zapcore.FatalLevel + 1, + clock: zapcore.DefaultClock, } return log.WithOptions(options...) } @@ -85,6 +87,7 @@ func NewNop() *Logger { core: zapcore.NewNopCore(), errorOutput: zapcore.AddSync(ioutil.Discard), addStack: zapcore.FatalLevel + 1, + clock: zapcore.DefaultClock, } } @@ -270,7 +273,7 @@ func (log *Logger) check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry { // log message will actually be written somewhere. ent := zapcore.Entry{ LoggerName: log.name, - Time: time.Now(), + Time: log.clock.Now(), Level: lvl, Message: msg, } @@ -307,7 +310,7 @@ func (log *Logger) check(lvl zapcore.Level, msg string) *zapcore.CheckedEntry { if log.addCaller { frame, defined := getCallerFrame(log.callerSkip + callerSkipOffset) if !defined { - fmt.Fprintf(log.errorOutput, "%v Logger.check error: failed to get caller\n", time.Now().UTC()) + fmt.Fprintf(log.errorOutput, "%v Logger.check error: failed to get caller\n", ent.Time.UTC()) log.errorOutput.Sync() } diff --git a/vendor/go.uber.org/zap/options.go b/vendor/go.uber.org/zap/options.go index 0135c20923..e9e66161f5 100644 --- a/vendor/go.uber.org/zap/options.go +++ b/vendor/go.uber.org/zap/options.go @@ -138,3 +138,11 @@ func OnFatal(action zapcore.CheckWriteAction) Option { log.onFatal = action }) } + +// WithClock specifies the clock used by the logger to determine the current +// time for logged entries. Defaults to the system clock with time.Now. +func WithClock(clock zapcore.Clock) Option { + return optionFunc(func(log *Logger) { + log.clock = clock + }) +} diff --git a/vendor/go.uber.org/zap/sugar.go b/vendor/go.uber.org/zap/sugar.go index 4084dada79..0b9651981a 100644 --- a/vendor/go.uber.org/zap/sugar.go +++ b/vendor/go.uber.org/zap/sugar.go @@ -266,7 +266,7 @@ func (s *SugaredLogger) sweetenFields(args []interface{}) []Field { // Make sure this element isn't a dangling key. if i == len(args)-1 { - s.base.DPanic(_oddNumberErrMsg, Any("ignored", args[i])) + s.base.Error(_oddNumberErrMsg, Any("ignored", args[i])) break } @@ -287,7 +287,7 @@ func (s *SugaredLogger) sweetenFields(args []interface{}) []Field { // If we encountered any invalid key-value pairs, log an error. if len(invalid) > 0 { - s.base.DPanic(_nonStringKeyErrMsg, Array("invalid", invalid)) + s.base.Error(_nonStringKeyErrMsg, Array("invalid", invalid)) } return fields } diff --git a/vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go b/vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go new file mode 100644 index 0000000000..0c1436f76c --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/buffered_write_syncer.go @@ -0,0 +1,188 @@ +// Copyright (c) 2021 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import ( + "bufio" + "sync" + "time" + + "go.uber.org/multierr" +) + +const ( + // _defaultBufferSize specifies the default size used by Buffer. + _defaultBufferSize = 256 * 1024 // 256 kB + + // _defaultFlushInterval specifies the default flush interval for + // Buffer. + _defaultFlushInterval = 30 * time.Second +) + +// A BufferedWriteSyncer is a WriteSyncer that buffers writes in-memory before +// flushing them to a wrapped WriteSyncer after reaching some limit, or at some +// fixed interval--whichever comes first. +// +// BufferedWriteSyncer is safe for concurrent use. You don't need to use +// zapcore.Lock for WriteSyncers with BufferedWriteSyncer. +type BufferedWriteSyncer struct { + // WS is the WriteSyncer around which BufferedWriteSyncer will buffer + // writes. + // + // This field is required. + WS WriteSyncer + + // Size specifies the maximum amount of data the writer will buffered + // before flushing. + // + // Defaults to 256 kB if unspecified. + Size int + + // FlushInterval specifies how often the writer should flush data if + // there have been no writes. + // + // Defaults to 30 seconds if unspecified. + FlushInterval time.Duration + + // Clock, if specified, provides control of the source of time for the + // writer. + // + // Defaults to the system clock. + Clock Clock + + // unexported fields for state + mu sync.Mutex + initialized bool // whether initialize() has run + writer *bufio.Writer + ticker *time.Ticker + stop chan struct{} // closed when flushLoop should stop + stopped bool // whether Stop() has run + done chan struct{} // closed when flushLoop has stopped +} + +func (s *BufferedWriteSyncer) initialize() { + size := s.Size + if size == 0 { + size = _defaultBufferSize + } + + flushInterval := s.FlushInterval + if flushInterval == 0 { + flushInterval = _defaultFlushInterval + } + + if s.Clock == nil { + s.Clock = DefaultClock + } + + s.ticker = s.Clock.NewTicker(flushInterval) + s.writer = bufio.NewWriterSize(s.WS, size) + s.stop = make(chan struct{}) + s.done = make(chan struct{}) + s.initialized = true + go s.flushLoop() +} + +// Write writes log data into buffer syncer directly, multiple Write calls will be batched, +// and log data will be flushed to disk when the buffer is full or periodically. +func (s *BufferedWriteSyncer) Write(bs []byte) (int, error) { + s.mu.Lock() + defer s.mu.Unlock() + + if !s.initialized { + s.initialize() + } + + // To avoid partial writes from being flushed, we manually flush the existing buffer if: + // * The current write doesn't fit into the buffer fully, and + // * The buffer is not empty (since bufio will not split large writes when the buffer is empty) + if len(bs) > s.writer.Available() && s.writer.Buffered() > 0 { + if err := s.writer.Flush(); err != nil { + return 0, err + } + } + + return s.writer.Write(bs) +} + +// Sync flushes buffered log data into disk directly. +func (s *BufferedWriteSyncer) Sync() error { + s.mu.Lock() + defer s.mu.Unlock() + + var err error + if s.initialized { + err = s.writer.Flush() + } + + return multierr.Append(err, s.WS.Sync()) +} + +// flushLoop flushes the buffer at the configured interval until Stop is +// called. +func (s *BufferedWriteSyncer) flushLoop() { + defer close(s.done) + + for { + select { + case <-s.ticker.C: + // we just simply ignore error here + // because the underlying bufio writer stores any errors + // and we return any error from Sync() as part of the close + _ = s.Sync() + case <-s.stop: + return + } + } +} + +// Stop closes the buffer, cleans up background goroutines, and flushes +// remaining unwritten data. +func (s *BufferedWriteSyncer) Stop() (err error) { + var stopped bool + + // Critical section. + func() { + s.mu.Lock() + defer s.mu.Unlock() + + if !s.initialized { + return + } + + stopped = s.stopped + if stopped { + return + } + s.stopped = true + + s.ticker.Stop() + close(s.stop) // tell flushLoop to stop + <-s.done // and wait until it has + }() + + // Don't call Sync on consecutive Stops. + if !stopped { + err = s.Sync() + } + + return err +} diff --git a/vendor/go.uber.org/zap/zapcore/clock.go b/vendor/go.uber.org/zap/zapcore/clock.go new file mode 100644 index 0000000000..d2ea95b394 --- /dev/null +++ b/vendor/go.uber.org/zap/zapcore/clock.go @@ -0,0 +1,50 @@ +// Copyright (c) 2021 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +package zapcore + +import ( + "time" +) + +// DefaultClock is the default clock used by Zap in operations that require +// time. This clock uses the system clock for all operations. +var DefaultClock = systemClock{} + +// Clock is a source of time for logged entries. +type Clock interface { + // Now returns the current local time. + Now() time.Time + + // NewTicker returns *time.Ticker that holds a channel + // that delivers "ticks" of a clock. + NewTicker(time.Duration) *time.Ticker +} + +// systemClock implements default Clock that uses system time. +type systemClock struct{} + +func (systemClock) Now() time.Time { + return time.Now() +} + +func (systemClock) NewTicker(duration time.Duration) *time.Ticker { + return time.NewTicker(duration) +} diff --git a/vendor/go.uber.org/zap/zapcore/entry.go b/vendor/go.uber.org/zap/zapcore/entry.go index 4aa8b4f90b..2d815feb84 100644 --- a/vendor/go.uber.org/zap/zapcore/entry.go +++ b/vendor/go.uber.org/zap/zapcore/entry.go @@ -208,7 +208,7 @@ func (ce *CheckedEntry) Write(fields ...Field) { // If the entry is dirty, log an internal error; because the // CheckedEntry is being used after it was returned to the pool, // the message may be an amalgamation from multiple call sites. - fmt.Fprintf(ce.ErrorOutput, "%v Unsafe CheckedEntry re-use near Entry %+v.\n", time.Now(), ce.Entry) + fmt.Fprintf(ce.ErrorOutput, "%v Unsafe CheckedEntry re-use near Entry %+v.\n", ce.Time, ce.Entry) ce.ErrorOutput.Sync() } return @@ -221,7 +221,7 @@ func (ce *CheckedEntry) Write(fields ...Field) { } if ce.ErrorOutput != nil { if err != nil { - fmt.Fprintf(ce.ErrorOutput, "%v write error: %v\n", time.Now(), err) + fmt.Fprintf(ce.ErrorOutput, "%v write error: %v\n", ce.Time, err) ce.ErrorOutput.Sync() } } diff --git a/vendor/golang.org/x/oauth2/google/doc.go b/vendor/golang.org/x/oauth2/google/doc.go index b241c728a6..8e6a57ce96 100644 --- a/vendor/golang.org/x/oauth2/google/doc.go +++ b/vendor/golang.org/x/oauth2/google/doc.go @@ -4,9 +4,9 @@ // Package google provides support for making OAuth2 authorized and authenticated // HTTP requests to Google APIs. It supports the Web server flow, client-side -// credentials, service accounts, Google Compute Engine service accounts, Google -// App Engine service accounts and workload identity federation from non-Google -// cloud platforms. +// credentials, service accounts, Google Compute Engine service accounts, +// Google App Engine service accounts and workload identity federation +// from non-Google cloud platforms. // // A brief overview of the package follows. For more information, please read // https://developers.google.com/accounts/docs/OAuth2 diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/aws.go b/vendor/golang.org/x/oauth2/google/internal/externalaccount/aws.go index fbcefb474e..a5a5423c65 100644 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/aws.go +++ b/vendor/golang.org/x/oauth2/google/internal/externalaccount/aws.go @@ -13,7 +13,6 @@ import ( "encoding/json" "errors" "fmt" - "golang.org/x/oauth2" "io" "io/ioutil" "net/http" @@ -23,6 +22,8 @@ import ( "sort" "strings" "time" + + "golang.org/x/oauth2" ) type awsSecurityCredentials struct { @@ -343,6 +344,9 @@ func (cs *awsCredentialSource) getRegion() (string, error) { if envAwsRegion := getenv("AWS_REGION"); envAwsRegion != "" { return envAwsRegion, nil } + if envAwsRegion := getenv("AWS_DEFAULT_REGION"); envAwsRegion != "" { + return envAwsRegion, nil + } if cs.RegionURL == "" { return "", errors.New("oauth2/google: unable to determine AWS region") diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go b/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go index 1a6e93cec7..a4d45d9202 100644 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go +++ b/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go @@ -20,15 +20,34 @@ var now = func() time.Time { // Config stores the configuration for fetching tokens with external credentials. type Config struct { + // Audience is the Secure Token Service (STS) audience which contains the resource name for the workload + // identity pool or the workforce pool and the provider identifier in that pool. Audience string + // SubjectTokenType is the STS token type based on the Oauth2.0 token exchange spec + // e.g. `urn:ietf:params:oauth:token-type:jwt`. SubjectTokenType string + // TokenURL is the STS token exchange endpoint. TokenURL string + // TokenInfoURL is the token_info endpoint used to retrieve the account related information ( + // user attributes like account identifier, eg. email, username, uid, etc). This is + // needed for gCloud session account identification. TokenInfoURL string + // ServiceAccountImpersonationURL is the URL for the service account impersonation request. This is only + // required for workload identity pools when APIs to be accessed have not integrated with UberMint. ServiceAccountImpersonationURL string + // ClientSecret is currently only required if token_info endpoint also + // needs to be called with the generated GCP access token. When provided, STS will be + // called with additional basic authentication using client_id as username and client_secret as password. ClientSecret string + // ClientID is only required in conjunction with ClientSecret, as described above. ClientID string + // CredentialSource contains the necessary information to retrieve the token itself, as well + // as some environmental information. CredentialSource CredentialSource + // QuotaProjectID is injected by gCloud. If the value is non-empty, the Auth libraries + // will set the x-goog-user-project which overrides the project associated with the credentials. QuotaProjectID string + // Scopes contains the desired scopes for the returned access token. Scopes []string } @@ -66,6 +85,8 @@ type format struct { } // CredentialSource stores the information necessary to retrieve the credentials for the STS exchange. +// Either the File or the URL field should be filled, depending on the kind of credential in question. +// The EnvironmentID should start with AWS if being used for an AWS credential. type CredentialSource struct { File string `json:"file"` @@ -107,7 +128,7 @@ type baseCredentialSource interface { subjectToken() (string, error) } -// tokenSource is the source that handles external credentials. +// tokenSource is the source that handles external credentials. It is used to retrieve Tokens. type tokenSource struct { ctx context.Context conf *Config diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/clientauth.go b/vendor/golang.org/x/oauth2/google/internal/externalaccount/clientauth.go index feccf8b68e..62c2e36cc1 100644 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/clientauth.go +++ b/vendor/golang.org/x/oauth2/google/internal/externalaccount/clientauth.go @@ -19,6 +19,9 @@ type clientAuthentication struct { ClientSecret string } +// InjectAuthentication is used to add authentication to a Secure Token Service exchange +// request. It modifies either the passed url.Values or http.Header depending on the desired +// authentication format. func (c *clientAuthentication) InjectAuthentication(values url.Values, headers http.Header) { if c.ClientID == "" || c.ClientSecret == "" || values == nil || headers == nil { return diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go b/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go index 1d29c467f7..1f6009b38f 100644 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go +++ b/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go @@ -36,7 +36,7 @@ type impersonateTokenSource struct { scopes []string } -// Token performs the exchange to get a temporary service account +// Token performs the exchange to get a temporary service account token to allow access to GCP. func (its impersonateTokenSource) Token() (*oauth2.Token, error) { reqBody := generateAccessTokenReq{ Lifetime: "3600s", diff --git a/vendor/golang.org/x/oauth2/google/jwt.go b/vendor/golang.org/x/oauth2/google/jwt.go index b0fdb3a888..67d97b9904 100644 --- a/vendor/golang.org/x/oauth2/google/jwt.go +++ b/vendor/golang.org/x/oauth2/google/jwt.go @@ -7,6 +7,7 @@ package google import ( "crypto/rsa" "fmt" + "strings" "time" "golang.org/x/oauth2" @@ -24,6 +25,28 @@ import ( // optimization supported by a few Google services. // Unless you know otherwise, you should use JWTConfigFromJSON instead. func JWTAccessTokenSourceFromJSON(jsonKey []byte, audience string) (oauth2.TokenSource, error) { + return newJWTSource(jsonKey, audience, nil) +} + +// JWTAccessTokenSourceWithScope uses a Google Developers service account JSON +// key file to read the credentials that authorize and authenticate the +// requests, and returns a TokenSource that does not use any OAuth2 flow but +// instead creates a JWT and sends that as the access token. +// The scope is typically a list of URLs that specifies the scope of the +// credentials. +// +// Note that this is not a standard OAuth flow, but rather an +// optimization supported by a few Google services. +// Unless you know otherwise, you should use JWTConfigFromJSON instead. +func JWTAccessTokenSourceWithScope(jsonKey []byte, scope ...string) (oauth2.TokenSource, error) { + return newJWTSource(jsonKey, "", scope) +} + +func newJWTSource(jsonKey []byte, audience string, scopes []string) (oauth2.TokenSource, error) { + if len(scopes) == 0 && audience == "" { + return nil, fmt.Errorf("google: missing scope/audience for JWT access token") + } + cfg, err := JWTConfigFromJSON(jsonKey) if err != nil { return nil, fmt.Errorf("google: could not parse JSON key: %v", err) @@ -35,6 +58,7 @@ func JWTAccessTokenSourceFromJSON(jsonKey []byte, audience string) (oauth2.Token ts := &jwtAccessTokenSource{ email: cfg.Email, audience: audience, + scopes: scopes, pk: pk, pkID: cfg.PrivateKeyID, } @@ -47,6 +71,7 @@ func JWTAccessTokenSourceFromJSON(jsonKey []byte, audience string) (oauth2.Token type jwtAccessTokenSource struct { email, audience string + scopes []string pk *rsa.PrivateKey pkID string } @@ -54,12 +79,14 @@ type jwtAccessTokenSource struct { func (ts *jwtAccessTokenSource) Token() (*oauth2.Token, error) { iat := time.Now() exp := iat.Add(time.Hour) + scope := strings.Join(ts.scopes, " ") cs := &jws.ClaimSet{ - Iss: ts.email, - Sub: ts.email, - Aud: ts.audience, - Iat: iat.Unix(), - Exp: exp.Unix(), + Iss: ts.email, + Sub: ts.email, + Aud: ts.audience, + Scope: scope, + Iat: iat.Unix(), + Exp: exp.Unix(), } hdr := &jws.Header{ Algorithm: "RS256", diff --git a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go index 8fb1d9e086..179d6e8fc1 100644 --- a/vendor/google.golang.org/protobuf/encoding/prototext/decode.go +++ b/vendor/google.golang.org/protobuf/encoding/prototext/decode.go @@ -744,9 +744,6 @@ func (d decoder) skipValue() error { // Skip items. This will not validate whether skipped values are // of the same type or not, same behavior as C++ // TextFormat::Parser::AllowUnknownField(true) version 3.8.0. - if err := d.skipValue(); err != nil { - return err - } } } } diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go index aa66bdd06a..da289ccce6 100644 --- a/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go +++ b/vendor/google.golang.org/protobuf/internal/encoding/text/encode.go @@ -263,3 +263,8 @@ func (e *Encoder) Snapshot() encoderState { func (e *Encoder) Reset(es encoderState) { e.encoderState = es } + +// AppendString appends the escaped form of the input string to b. +func AppendString(b []byte, s string) []byte { + return appendString(b, s, false) +} diff --git a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go index 3759b010c0..029feeefd7 100644 --- a/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go +++ b/vendor/google.golang.org/protobuf/internal/impl/legacy_message.go @@ -440,6 +440,13 @@ func legacyMerge(in piface.MergeInput) piface.MergeOutput { if !ok { return piface.MergeOutput{} } + if !in.Source.IsValid() { + // Legacy Marshal methods may not function on nil messages. + // Check for a typed nil source only after we confirm that + // legacy Marshal/Unmarshal methods are present, for + // consistency. + return piface.MergeOutput{Flags: piface.MergeComplete} + } b, err := marshaler.Marshal() if err != nil { return piface.MergeOutput{} diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go index 5879131da7..14e774fb2e 100644 --- a/vendor/google.golang.org/protobuf/internal/version/version.go +++ b/vendor/google.golang.org/protobuf/internal/version/version.go @@ -52,8 +52,8 @@ import ( // 10. Send out the CL for review and submit it. const ( Major = 1 - Minor = 26 - Patch = 0 + Minor = 27 + Patch = 1 PreRelease = "" ) diff --git a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go index 66dcbcd0d2..59f024c444 100644 --- a/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go +++ b/vendor/google.golang.org/protobuf/reflect/protoregistry/registry.go @@ -94,7 +94,8 @@ type Files struct { // Note that enum values are in the top-level since that are in the same // scope as the parent enum. descsByName map[protoreflect.FullName]interface{} - filesByPath map[string]protoreflect.FileDescriptor + filesByPath map[string][]protoreflect.FileDescriptor + numFiles int } type packageDescriptor struct { @@ -117,17 +118,16 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error { r.descsByName = map[protoreflect.FullName]interface{}{ "": &packageDescriptor{}, } - r.filesByPath = make(map[string]protoreflect.FileDescriptor) + r.filesByPath = make(map[string][]protoreflect.FileDescriptor) } path := file.Path() - if prev := r.filesByPath[path]; prev != nil { + if prev := r.filesByPath[path]; len(prev) > 0 { r.checkGenProtoConflict(path) err := errors.New("file %q is already registered", file.Path()) - err = amendErrorWithCaller(err, prev, file) - if r == GlobalFiles && ignoreConflict(file, err) { - err = nil + err = amendErrorWithCaller(err, prev[0], file) + if !(r == GlobalFiles && ignoreConflict(file, err)) { + return err } - return err } for name := file.Package(); name != ""; name = name.Parent() { @@ -168,7 +168,8 @@ func (r *Files) RegisterFile(file protoreflect.FileDescriptor) error { rangeTopLevelDescriptors(file, func(d protoreflect.Descriptor) { r.descsByName[d.FullName()] = d }) - r.filesByPath[path] = file + r.filesByPath[path] = append(r.filesByPath[path], file) + r.numFiles++ return nil } @@ -308,6 +309,7 @@ func (s *nameSuffix) Pop() (name protoreflect.Name) { // FindFileByPath looks up a file by the path. // // This returns (nil, NotFound) if not found. +// This returns an error if multiple files have the same path. func (r *Files) FindFileByPath(path string) (protoreflect.FileDescriptor, error) { if r == nil { return nil, NotFound @@ -316,13 +318,19 @@ func (r *Files) FindFileByPath(path string) (protoreflect.FileDescriptor, error) globalMutex.RLock() defer globalMutex.RUnlock() } - if fd, ok := r.filesByPath[path]; ok { - return fd, nil + fds := r.filesByPath[path] + switch len(fds) { + case 0: + return nil, NotFound + case 1: + return fds[0], nil + default: + return nil, errors.New("multiple files named %q", path) } - return nil, NotFound } -// NumFiles reports the number of registered files. +// NumFiles reports the number of registered files, +// including duplicate files with the same name. func (r *Files) NumFiles() int { if r == nil { return 0 @@ -331,10 +339,11 @@ func (r *Files) NumFiles() int { globalMutex.RLock() defer globalMutex.RUnlock() } - return len(r.filesByPath) + return r.numFiles } // RangeFiles iterates over all registered files while f returns true. +// If multiple files have the same name, RangeFiles iterates over all of them. // The iteration order is undefined. func (r *Files) RangeFiles(f func(protoreflect.FileDescriptor) bool) { if r == nil { @@ -344,9 +353,11 @@ func (r *Files) RangeFiles(f func(protoreflect.FileDescriptor) bool) { globalMutex.RLock() defer globalMutex.RUnlock() } - for _, file := range r.filesByPath { - if !f(file) { - return + for _, files := range r.filesByPath { + for _, file := range files { + if !f(file) { + return + } } } } diff --git a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go index f77239fc3b..abe4ab5115 100644 --- a/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go +++ b/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go @@ -43,7 +43,6 @@ package descriptorpb import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" @@ -829,15 +828,6 @@ func (*ExtensionRangeOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{3} } -var extRange_ExtensionRangeOptions = []protoiface.ExtensionRangeV1{ - {Start: 1000, End: 536870911}, -} - -// Deprecated: Use ExtensionRangeOptions.ProtoReflect.Descriptor.ExtensionRanges instead. -func (*ExtensionRangeOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { - return extRange_ExtensionRangeOptions -} - func (x *ExtensionRangeOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -1520,15 +1510,6 @@ func (*FileOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{10} } -var extRange_FileOptions = []protoiface.ExtensionRangeV1{ - {Start: 1000, End: 536870911}, -} - -// Deprecated: Use FileOptions.ProtoReflect.Descriptor.ExtensionRanges instead. -func (*FileOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { - return extRange_FileOptions -} - func (x *FileOptions) GetJavaPackage() string { if x != nil && x.JavaPackage != nil { return *x.JavaPackage @@ -1776,15 +1757,6 @@ func (*MessageOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{11} } -var extRange_MessageOptions = []protoiface.ExtensionRangeV1{ - {Start: 1000, End: 536870911}, -} - -// Deprecated: Use MessageOptions.ProtoReflect.Descriptor.ExtensionRanges instead. -func (*MessageOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { - return extRange_MessageOptions -} - func (x *MessageOptions) GetMessageSetWireFormat() bool { if x != nil && x.MessageSetWireFormat != nil { return *x.MessageSetWireFormat @@ -1930,15 +1902,6 @@ func (*FieldOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{12} } -var extRange_FieldOptions = []protoiface.ExtensionRangeV1{ - {Start: 1000, End: 536870911}, -} - -// Deprecated: Use FieldOptions.ProtoReflect.Descriptor.ExtensionRanges instead. -func (*FieldOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { - return extRange_FieldOptions -} - func (x *FieldOptions) GetCtype() FieldOptions_CType { if x != nil && x.Ctype != nil { return *x.Ctype @@ -2030,15 +1993,6 @@ func (*OneofOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{13} } -var extRange_OneofOptions = []protoiface.ExtensionRangeV1{ - {Start: 1000, End: 536870911}, -} - -// Deprecated: Use OneofOptions.ProtoReflect.Descriptor.ExtensionRanges instead. -func (*OneofOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { - return extRange_OneofOptions -} - func (x *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { if x != nil { return x.UninterpretedOption @@ -2101,15 +2055,6 @@ func (*EnumOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{14} } -var extRange_EnumOptions = []protoiface.ExtensionRangeV1{ - {Start: 1000, End: 536870911}, -} - -// Deprecated: Use EnumOptions.ProtoReflect.Descriptor.ExtensionRanges instead. -func (*EnumOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { - return extRange_EnumOptions -} - func (x *EnumOptions) GetAllowAlias() bool { if x != nil && x.AllowAlias != nil { return *x.AllowAlias @@ -2183,15 +2128,6 @@ func (*EnumValueOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{15} } -var extRange_EnumValueOptions = []protoiface.ExtensionRangeV1{ - {Start: 1000, End: 536870911}, -} - -// Deprecated: Use EnumValueOptions.ProtoReflect.Descriptor.ExtensionRanges instead. -func (*EnumValueOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { - return extRange_EnumValueOptions -} - func (x *EnumValueOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated @@ -2258,15 +2194,6 @@ func (*ServiceOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{16} } -var extRange_ServiceOptions = []protoiface.ExtensionRangeV1{ - {Start: 1000, End: 536870911}, -} - -// Deprecated: Use ServiceOptions.ProtoReflect.Descriptor.ExtensionRanges instead. -func (*ServiceOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { - return extRange_ServiceOptions -} - func (x *ServiceOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated @@ -2335,15 +2262,6 @@ func (*MethodOptions) Descriptor() ([]byte, []int) { return file_google_protobuf_descriptor_proto_rawDescGZIP(), []int{17} } -var extRange_MethodOptions = []protoiface.ExtensionRangeV1{ - {Start: 1000, End: 536870911}, -} - -// Deprecated: Use MethodOptions.ProtoReflect.Descriptor.ExtensionRanges instead. -func (*MethodOptions) ExtensionRangeArray() []protoiface.ExtensionRangeV1 { - return extRange_MethodOptions -} - func (x *MethodOptions) GetDeprecated() bool { if x != nil && x.Deprecated != nil { return *x.Deprecated diff --git a/vendor/modules.txt b/vendor/modules.txt index b26a42b589..136d828e94 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -55,20 +55,20 @@ github.com/ProtonMail/go-crypto/openpgp/internal/ecc github.com/ProtonMail/go-crypto/openpgp/internal/encoding github.com/ProtonMail/go-crypto/openpgp/packet github.com/ProtonMail/go-crypto/openpgp/s2k -# github.com/PuerkitoBio/goquery v1.6.1 +# github.com/PuerkitoBio/goquery v1.7.0 ## explicit github.com/PuerkitoBio/goquery # github.com/PuerkitoBio/purell v1.1.1 github.com/PuerkitoBio/purell # github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 github.com/PuerkitoBio/urlesc -# github.com/RoaringBitmap/roaring v0.7.3 +# github.com/RoaringBitmap/roaring v0.8.0 ## explicit github.com/RoaringBitmap/roaring github.com/RoaringBitmap/roaring/internal # github.com/acomagu/bufpipe v1.0.3 github.com/acomagu/bufpipe -# github.com/alecthomas/chroma v0.9.1 +# github.com/alecthomas/chroma v0.9.2 ## explicit github.com/alecthomas/chroma github.com/alecthomas/chroma/formatters/html @@ -118,7 +118,7 @@ github.com/aymerick/douceur/parser github.com/beorn7/perks/quantile # github.com/bits-and-blooms/bitset v1.2.0 github.com/bits-and-blooms/bitset -# github.com/blevesearch/bleve/v2 v2.0.5 +# github.com/blevesearch/bleve/v2 v2.0.6 ## explicit github.com/blevesearch/bleve/v2 github.com/blevesearch/bleve/v2/analysis @@ -171,20 +171,20 @@ github.com/blevesearch/snowballstem github.com/blevesearch/snowballstem/english # github.com/blevesearch/upsidedown_store_api v1.0.1 github.com/blevesearch/upsidedown_store_api -# github.com/blevesearch/vellum v1.0.4 +# github.com/blevesearch/vellum v1.0.5 github.com/blevesearch/vellum github.com/blevesearch/vellum/levenshtein github.com/blevesearch/vellum/regexp github.com/blevesearch/vellum/utf8 -# github.com/blevesearch/zapx/v11 v11.2.0 +# github.com/blevesearch/zapx/v11 v11.2.1 github.com/blevesearch/zapx/v11 -# github.com/blevesearch/zapx/v12 v12.2.0 +# github.com/blevesearch/zapx/v12 v12.2.1 github.com/blevesearch/zapx/v12 -# github.com/blevesearch/zapx/v13 v13.2.0 +# github.com/blevesearch/zapx/v13 v13.2.1 github.com/blevesearch/zapx/v13 -# github.com/blevesearch/zapx/v14 v14.2.0 +# github.com/blevesearch/zapx/v14 v14.2.1 github.com/blevesearch/zapx/v14 -# github.com/blevesearch/zapx/v15 v15.2.0 +# github.com/blevesearch/zapx/v15 v15.2.1 github.com/blevesearch/zapx/v15 # github.com/boombuler/barcode v1.0.1 ## explicit @@ -194,7 +194,7 @@ github.com/boombuler/barcode/utils # github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b ## explicit github.com/bradfitz/gomemcache/memcache -# github.com/caddyserver/certmagic v0.13.1 +# github.com/caddyserver/certmagic v0.14.0 ## explicit github.com/caddyserver/certmagic # github.com/cespare/xxhash/v2 v2.1.1 @@ -282,7 +282,7 @@ github.com/go-chi/chi/middleware # github.com/go-chi/cors v1.2.0 ## explicit github.com/go-chi/cors -# github.com/go-enry/go-enry/v2 v2.7.0 +# github.com/go-enry/go-enry/v2 v2.7.1 ## explicit github.com/go-enry/go-enry/v2 github.com/go-enry/go-enry/v2/data @@ -384,7 +384,7 @@ github.com/go-openapi/strfmt github.com/go-openapi/swag # github.com/go-openapi/validate v0.20.2 github.com/go-openapi/validate -# github.com/go-redis/redis/v8 v8.10.0 +# github.com/go-redis/redis/v8 v8.11.0 ## explicit github.com/go-redis/redis/v8 github.com/go-redis/redis/v8/internal @@ -439,7 +439,8 @@ github.com/golang/protobuf/ptypes github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/duration github.com/golang/protobuf/ptypes/timestamp -# github.com/golang/snappy v0.0.3 +# github.com/golang/snappy v0.0.4 +## explicit github.com/golang/snappy # github.com/google/go-github/v32 v32.1.0 ## explicit @@ -474,7 +475,7 @@ github.com/hashicorp/go-retryablehttp # github.com/hashicorp/go-version v1.3.1 => github.com/6543/go-version v1.3.1 ## explicit github.com/hashicorp/go-version -# github.com/hashicorp/golang-lru v0.5.1 +# github.com/hashicorp/golang-lru v0.5.4 ## explicit github.com/hashicorp/golang-lru github.com/hashicorp/golang-lru/simplelru @@ -530,7 +531,7 @@ github.com/keybase/go-crypto/openpgp/errors github.com/keybase/go-crypto/openpgp/packet github.com/keybase/go-crypto/openpgp/s2k github.com/keybase/go-crypto/rsa -# github.com/klauspost/compress v1.13.0 +# github.com/klauspost/compress v1.13.1 ## explicit github.com/klauspost/compress/flate github.com/klauspost/compress/fse @@ -538,7 +539,8 @@ github.com/klauspost/compress/gzip github.com/klauspost/compress/huff0 github.com/klauspost/compress/zstd github.com/klauspost/compress/zstd/internal/xxhash -# github.com/klauspost/cpuid/v2 v2.0.6 +# github.com/klauspost/cpuid/v2 v2.0.7 +## explicit github.com/klauspost/cpuid/v2 # github.com/klauspost/pgzip v1.2.5 ## explicit @@ -557,7 +559,6 @@ github.com/lib/pq github.com/lib/pq/oid github.com/lib/pq/scram # github.com/libdns/libdns v0.2.1 -## explicit github.com/libdns/libdns # github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96 ## explicit @@ -603,16 +604,17 @@ github.com/mholt/acmez/acme # github.com/mholt/archiver/v3 v3.5.0 ## explicit github.com/mholt/archiver/v3 -# github.com/microcosm-cc/bluemonday v1.0.9 +# github.com/microcosm-cc/bluemonday v1.0.14 ## explicit github.com/microcosm-cc/bluemonday -# github.com/miekg/dns v1.1.42 +github.com/microcosm-cc/bluemonday/css +# github.com/miekg/dns v1.1.43 ## explicit github.com/miekg/dns # github.com/minio/md5-simd v1.1.2 ## explicit github.com/minio/md5-simd -# github.com/minio/minio-go/v7 v7.0.10 +# github.com/minio/minio-go/v7 v7.0.12 ## explicit github.com/minio/minio-go/v7 github.com/minio/minio-go/v7/pkg/credentials @@ -660,7 +662,7 @@ github.com/olekukonko/tablewriter # github.com/oliamb/cutter v0.2.2 ## explicit github.com/oliamb/cutter -# github.com/olivere/elastic/v7 v7.0.24 +# github.com/olivere/elastic/v7 v7.0.25 ## explicit github.com/olivere/elastic/v7 github.com/olivere/elastic/v7/config @@ -668,7 +670,7 @@ github.com/olivere/elastic/v7/uritemplates # github.com/pelletier/go-toml v1.9.0 ## explicit github.com/pelletier/go-toml -# github.com/pierrec/lz4/v4 v4.1.7 +# github.com/pierrec/lz4/v4 v4.1.8 ## explicit github.com/pierrec/lz4/v4 github.com/pierrec/lz4/v4/internal/lz4block @@ -721,6 +723,8 @@ github.com/shurcooL/httpfs/vfsutil # github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 ## explicit github.com/shurcooL/vfsgen +# github.com/sirupsen/logrus v1.8.1 +github.com/sirupsen/logrus # github.com/spf13/afero v1.6.0 github.com/spf13/afero github.com/spf13/afero/mem @@ -783,7 +787,7 @@ github.com/unrolled/render # github.com/urfave/cli v1.22.5 ## explicit github.com/urfave/cli -# github.com/xanzy/go-gitlab v0.50.0 +# github.com/xanzy/go-gitlab v0.50.1 ## explicit github.com/xanzy/go-gitlab # github.com/xanzy/ssh-agent v0.3.0 @@ -793,7 +797,7 @@ github.com/xi2/xz # github.com/yohcop/openid-go v1.0.0 ## explicit github.com/yohcop/openid-go -# github.com/yuin/goldmark v1.3.7 +# github.com/yuin/goldmark v1.3.9 ## explicit github.com/yuin/goldmark github.com/yuin/goldmark/ast @@ -827,28 +831,13 @@ go.mongodb.org/mongo-driver/bson/bsonrw go.mongodb.org/mongo-driver/bson/bsontype go.mongodb.org/mongo-driver/bson/primitive go.mongodb.org/mongo-driver/x/bsonx/bsoncore -# go.opentelemetry.io/otel v0.20.0 -go.opentelemetry.io/otel/attribute -go.opentelemetry.io/otel/codes -go.opentelemetry.io/otel/internal -go.opentelemetry.io/otel/internal/baggage -go.opentelemetry.io/otel/internal/global -go.opentelemetry.io/otel/internal/trace/noop -go.opentelemetry.io/otel/propagation -go.opentelemetry.io/otel/unit -# go.opentelemetry.io/otel/metric v0.20.0 -go.opentelemetry.io/otel/metric -go.opentelemetry.io/otel/metric/global -go.opentelemetry.io/otel/metric/number -go.opentelemetry.io/otel/metric/registry -# go.opentelemetry.io/otel/trace v0.20.0 -go.opentelemetry.io/otel/trace -# go.uber.org/atomic v1.7.0 +# go.uber.org/atomic v1.8.0 +## explicit go.uber.org/atomic # go.uber.org/multierr v1.7.0 ## explicit go.uber.org/multierr -# go.uber.org/zap v1.17.0 +# go.uber.org/zap v1.18.1 ## explicit go.uber.org/zap go.uber.org/zap/buffer @@ -904,7 +893,7 @@ golang.org/x/net/ipv4 golang.org/x/net/ipv6 golang.org/x/net/proxy golang.org/x/net/publicsuffix -# golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c +# golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 ## explicit golang.org/x/oauth2 golang.org/x/oauth2/authhandler @@ -945,7 +934,7 @@ golang.org/x/text/transform golang.org/x/text/unicode/bidi golang.org/x/text/unicode/norm golang.org/x/text/width -# golang.org/x/time v0.0.0-20210608053304-ed9ce3a009e4 +# golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 ## explicit golang.org/x/time/rate # golang.org/x/tools v0.1.0 @@ -991,7 +980,8 @@ google.golang.org/appengine/internal/modules google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch -# google.golang.org/protobuf v1.26.0 +# google.golang.org/protobuf v1.27.1 +## explicit google.golang.org/protobuf/encoding/prototext google.golang.org/protobuf/encoding/protowire google.golang.org/protobuf/internal/descfmt |