From 32b1fe0d8f9e799a60eb182f8d219cc67e848810 Mon Sep 17 00:00:00 2001 From: cmg2146 <120140190+cmg2146@users.noreply.github.com> Date: Sat, 22 Apr 2023 12:26:22 -0700 Subject: [PATCH 01/57] Update to Iris v12.2.0, fix tests (#405) --- _examples/go.mod | 24 ++++++++++++++++---- _examples/go.sum | 56 +++++++++++++++++++++++++++++++++++++++++++++++ _examples/iris.go | 18 ++++++++++----- 3 files changed, 88 insertions(+), 10 deletions(-) diff --git a/_examples/go.mod b/_examples/go.mod index d47a0ba4d..b2d244dc6 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -9,7 +9,7 @@ require ( github.com/gin-gonic/gin v1.8.1 github.com/go-oauth2/oauth2/v4 v4.5.1 github.com/gorilla/websocket v1.5.0 - github.com/kataras/iris/v12 v12.1.8 + github.com/kataras/iris/v12 v12.2.0 github.com/labstack/echo/v4 v4.10.0 github.com/valyala/fasthttp v1.45.0 golang.org/x/oauth2 v0.4.0 @@ -20,6 +20,8 @@ require ( github.com/BurntSushi/toml v1.2.1 // indirect github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect github.com/CloudyKit/jet/v3 v3.0.1 // indirect + github.com/CloudyKit/jet/v6 v6.2.0 // indirect + github.com/Joker/jade v1.1.3 // indirect github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect github.com/ajg/form v1.5.1 // indirect github.com/andybalholm/brotli v1.0.5 // indirect @@ -29,6 +31,7 @@ require ( github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 // indirect github.com/fatih/color v1.15.0 // indirect github.com/fatih/structs v1.1.0 // indirect + github.com/flosch/pongo2/v4 v4.0.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect github.com/go-playground/locales v0.14.0 // indirect github.com/go-playground/universal-translator v0.18.0 // indirect @@ -37,6 +40,7 @@ require ( github.com/goccy/go-json v0.9.11 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang/protobuf v1.5.2 // indirect + github.com/golang/snappy v0.0.4 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/uuid v1.3.0 // indirect github.com/gorilla/css v1.0.0 // indirect @@ -46,29 +50,38 @@ require ( github.com/iris-contrib/jade v1.1.4 // indirect github.com/iris-contrib/pongo2 v0.0.1 // indirect github.com/iris-contrib/schema v0.0.6 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kataras/blocks v0.0.7 // indirect github.com/kataras/golog v0.1.8 // indirect github.com/kataras/pio v0.0.11 // indirect github.com/kataras/sitemap v0.0.6 // indirect + github.com/kataras/tunnel v0.0.4 // indirect github.com/klauspost/compress v1.16.4 // indirect github.com/labstack/gommon v0.4.0 // indirect github.com/leodido/go-urn v1.2.1 // indirect + github.com/mailgun/raymond/v2 v2.0.48 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.18 // indirect - github.com/microcosm-cc/bluemonday v1.0.21 // indirect + github.com/microcosm-cc/bluemonday v1.0.23 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/ryanuber/columnize v2.1.2+incompatible // indirect github.com/sanity-io/litter v1.5.5 // indirect github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d // indirect github.com/schollz/closestmatch v2.1.0+incompatible // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect + github.com/sirupsen/logrus v1.8.1 // indirect github.com/smartystreets/goconvey v1.7.2 // indirect github.com/stretchr/testify v1.8.2 // indirect + github.com/tdewolff/minify/v2 v2.12.4 // indirect + github.com/tdewolff/parse/v2 v2.6.4 // indirect github.com/tidwall/btree v0.0.0-20191029221954-400434d76274 // indirect github.com/tidwall/buntdb v1.1.2 // indirect github.com/tidwall/gjson v1.12.1 // indirect @@ -80,18 +93,21 @@ require ( github.com/ugorji/go/codec v1.2.7 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect + github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect + github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/xeipuuv/gojsonschema v1.2.0 // indirect github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect + github.com/yosssi/ace v0.0.5 // indirect github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect golang.org/x/crypto v0.7.0 // indirect golang.org/x/net v0.9.0 // indirect golang.org/x/sys v0.7.0 // indirect golang.org/x/text v0.9.0 // indirect - golang.org/x/time v0.2.0 // indirect - google.golang.org/protobuf v1.28.1 // indirect + golang.org/x/time v0.3.0 // indirect + google.golang.org/protobuf v1.29.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/_examples/go.sum b/_examples/go.sum index ed79fbcec..cdc325b1c 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -9,8 +9,12 @@ github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3 github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/CloudyKit/jet/v3 v3.0.1 h1:LUBMIJtW92Fqi+fOqXbGsT/xKiwNWjYktaNAASPE7E4= github.com/CloudyKit/jet/v3 v3.0.1/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= +github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= +github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= +github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= +github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= @@ -25,6 +29,7 @@ github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuP github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible h1:Ppm0npCCsmuR9oQaBtRuZcmILVE74aXE+AmrJj8L2ns= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= 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= @@ -38,6 +43,7 @@ github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6ps github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= @@ -51,9 +57,12 @@ github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= +github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU5kORdjhlA1yX8= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gavv/httpexpect/v2 v2.15.0 h1:CCnFk9of4l4ijUhnMxyoEpJsIIBKcuWIFLMwwGTZxNs= @@ -99,6 +108,8 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= 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= @@ -141,17 +152,23 @@ github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0Gqw github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= 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/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= +github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= +github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= github.com/kataras/golog v0.1.8 h1:isP8th4PJH2SrbkciKnylaND9xoTtfxv++NB+DF0l9g= github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= github.com/kataras/iris/v12 v12.1.8 h1:O3gJasjm7ZxpxwTH8tApZsvf274scSGQAUpNe47c37U= github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= +github.com/kataras/iris/v12 v12.2.0 h1:WzDY5nGuW/LgVaFS5BtTkW3crdSKJ/FEgWnxPnIVVLI= +github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= github.com/kataras/pio v0.0.11 h1:kqreJ5KOEXGMwHAWHDwIl+mjfNCPhAwZPa8gK7MKlyw= @@ -159,6 +176,8 @@ github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZ github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= +github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= +github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= @@ -181,6 +200,11 @@ github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3 github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= +github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= @@ -197,6 +221,8 @@ github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= github.com/microcosm-cc/bluemonday v1.0.21 h1:dNH3e4PSyE4vNX+KlRGHT5KrSvjeUkoNPwEORjffHJg= github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= +github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= +github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= @@ -213,6 +239,7 @@ github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5Vgl github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -239,6 +266,8 @@ github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTE github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.2+incompatible h1:C89EOx/XBWwIXl8wm8OPJBd7kPF25UfsK2X7Ph/zCAk= github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -257,6 +286,8 @@ github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +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 v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs= github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= @@ -268,6 +299,7 @@ github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkU github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= @@ -286,6 +318,11 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502/go.mod h1:p9lPsd+cx33L3H9nNoecRRxPssFKUwwI50I3pZ0yT+8= +github.com/tdewolff/minify/v2 v2.12.4 h1:kejsHQMM17n6/gwdw53qsi6lg0TGddZADVyQOz1KMdE= +github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= +github.com/tdewolff/parse/v2 v2.6.4 h1:KCkDvNUMof10e3QExio9OPZJT8SbdKojLBumw8YZycQ= +github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= +github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/tidwall/btree v0.0.0-20191029221954-400434d76274 h1:G6Z6HvJuPjG6XfNGi/feOATzeJrfgTNJY+rGrHbA04E= github.com/tidwall/btree v0.0.0-20191029221954-400434d76274/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8= github.com/tidwall/buntdb v1.1.2 h1:noCrqQXL9EKMtcdwJcmuVKSEjqu1ua99RHHgbLTEHRo= @@ -321,6 +358,10 @@ github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+ github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc= +github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= +github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= +github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= +github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= @@ -331,6 +372,8 @@ github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQ github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= +github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= +github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg= github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= @@ -338,6 +381,7 @@ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDf github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 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= @@ -356,6 +400,7 @@ golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -373,6 +418,7 @@ golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -394,6 +440,7 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -403,6 +450,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -416,10 +464,12 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -454,12 +504,15 @@ golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/time v0.2.0 h1:52I/1L54xyEQAYdtcSuxtiT84KGYTBGXwayxmIpNJhE= golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= +golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -482,9 +535,12 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.0 h1:44S3JjaKmLEE4YIkjzexaP+NzZsudE3Zin5Njn/pYX0= +google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/_examples/iris.go b/_examples/iris.go index e2b2602a9..c2ba801e8 100644 --- a/_examples/iris.go +++ b/_examples/iris.go @@ -75,15 +75,21 @@ func IrisHandler() http.Handler { }) app.Get("/stream", func(ctx iris.Context) { - ctx.StreamWriter(func(w io.Writer) bool { - for i := 0; i < 10; i++ { - fmt.Fprintf(w, "%d", i) + i := 0 + ctx.StreamWriter(func(w io.Writer) error { + if i == 10 { + // causes StreamWriter to stop writing + return io.EOF + } else if _, err := fmt.Fprintf(w, "%d", i); err != nil { + return err } - // return true to continue, return false to stop and flush - return false + + i++ + // return nil to continue writing + return nil }) // if we had to write here then the StreamWriter callback should - // return true + // return nil instead of EOF }) app.Post("/stream", func(ctx iris.Context) { From 93285cf21461f34f4afdd319cffdd9a2cc8e3729 Mon Sep 17 00:00:00 2001 From: Matt <20505926+MattSilvaa@users.noreply.github.com> Date: Sat, 22 Apr 2023 12:28:26 -0700 Subject: [PATCH 02/57] chore(value_test): Splitting testvalue_schema test to subtests (#401) --- value_test.go | 147 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 116 insertions(+), 31 deletions(-) diff --git a/value_test.go b/value_test.go index 78c3d1db1..c64839c5d 100644 --- a/value_test.go +++ b/value_test.go @@ -1130,8 +1130,6 @@ func TestValue_PathExpressions(t *testing.T) { } func TestValue_Schema(t *testing.T) { - reporter := newMockReporter(t) - schema := `{ "type": "object", "properties": { @@ -1143,45 +1141,132 @@ func TestValue_Schema(t *testing.T) { } }, "require": ["foo", "bar"] - }` + }` - data1 := map[string]interface{}{ - "foo": "a", - "bar": 1, - } + t.Run("schema with valid data", func(t *testing.T) { + reporter := newMockReporter(t) + data := map[string]interface{}{ + "foo": "a", + "bar": 1, + } + NewValue(reporter, data).Schema(schema). + chain.assert(t, success) + }) - data2 := map[string]interface{}{ - "foo": "a", - "bar": "b", - } + t.Run("byte slice schema with valid data", func(t *testing.T) { + reporter := newMockReporter(t) + data := map[string]interface{}{ + "foo": "a", + "bar": 1, + } + NewValue(reporter, data).Schema([]byte(schema)). + chain.assert(t, success) + }) - NewValue(reporter, data1).Schema(schema).chain.assert(t, success) - NewValue(reporter, data2).Schema(schema).chain.assert(t, failure) + t.Run("schema with invalid data", func(t *testing.T) { + reporter := newMockReporter(t) + data := map[string]interface{}{ + "foo": "a", + "bar": "b", + } + NewValue(reporter, data).Schema(schema). + chain.assert(t, failure) + }) - NewValue(reporter, data1).Schema([]byte(schema)).chain.assert(t, success) - NewValue(reporter, data2).Schema([]byte(schema)).chain.assert(t, failure) + t.Run("byte slice schema with invalid data", func(t *testing.T) { + reporter := newMockReporter(t) + data := map[string]interface{}{ + "foo": "a", + "bar": "b", + } + NewValue(reporter, data).Schema([]byte(schema)). + chain.assert(t, failure) + }) - var b interface{} - err := json.Unmarshal([]byte(schema), &b) - require.Nil(t, err) + t.Run("schema from unmarshalled JSON with valid data", func(t *testing.T) { + reporter := newMockReporter(t) + data := map[string]interface{}{ + "foo": "a", + "bar": 1, + } + var b interface{} + err := json.Unmarshal([]byte(schema), &b) + require.Nil(t, err) + NewValue(reporter, data).Schema(b). + chain.assert(t, success) + }) - NewValue(reporter, data1).Schema(b).chain.assert(t, success) - NewValue(reporter, data2).Schema(b).chain.assert(t, failure) + t.Run("schema from unmarshalled JSON with invalid data", func(t *testing.T) { + reporter := newMockReporter(t) + data := map[string]interface{}{ + "foo": "a", + "bar": "b", + } + var b interface{} + err := json.Unmarshal([]byte(schema), &b) + require.Nil(t, err) + NewValue(reporter, data).Schema(b). + chain.assert(t, failure) + }) + + t.Run("schema with valid file url with valid data", func(t *testing.T) { + reporter := newMockReporter(t) + data := map[string]interface{}{ + "foo": "a", + "bar": 1, + } + tmp, _ := ioutil.TempFile("", "httpexpect") + defer os.Remove(tmp.Name()) + + _, err := tmp.Write([]byte(schema)) + require.Nil(t, err) + + err = tmp.Close() + require.Nil(t, err) + + url := "file://" + tmp.Name() + NewValue(reporter, data).Schema(url). + chain.assert(t, success) + }) + + t.Run("schema with valid file url with invalid data", func(t *testing.T) { + reporter := newMockReporter(t) + data := map[string]interface{}{ + "foo": "a", + "bar": "b", + } - tmp, _ := ioutil.TempFile("", "httpexpect") - defer os.Remove(tmp.Name()) + tmp, _ := ioutil.TempFile("", "httpexpect") + defer os.Remove(tmp.Name()) - _, err = tmp.Write([]byte(schema)) - require.Nil(t, err) + _, err := tmp.Write([]byte(schema)) + require.Nil(t, err) - err = tmp.Close() - require.Nil(t, err) + err = tmp.Close() + require.Nil(t, err) - url := "file://" + tmp.Name() + url := "file://" + tmp.Name() + NewValue(reporter, data).Schema(url). + chain.assert(t, failure) + }) - NewValue(reporter, data1).Schema(url).chain.assert(t, success) - NewValue(reporter, data2).Schema(url).chain.assert(t, failure) + t.Run("invalid schema file url", func(t *testing.T) { + reporter := newMockReporter(t) + data := map[string]interface{}{ + "foo": "a", + "bar": 1, + } + NewValue(reporter, data).Schema("file:///bad/path"). + chain.assert(t, failure) + }) - NewValue(reporter, data1).Schema("file:///bad/path").chain.assert(t, failure) - NewValue(reporter, data1).Schema("{ bad json").chain.assert(t, failure) + t.Run("invalid schema json", func(t *testing.T) { + reporter := newMockReporter(t) + data := map[string]interface{}{ + "foo": "a", + "bar": 1, + } + NewValue(reporter, data).Schema("{ bad json"). + chain.assert(t, failure) + }) } From 401c41b5d37820e5fea63294f970cf25b51ad9d1 Mon Sep 17 00:00:00 2001 From: azc <74764847+aliziyacevik@users.noreply.github.com> Date: Sat, 22 Apr 2023 22:36:59 +0300 Subject: [PATCH 03/57] altered websocketmessage ctor, added propriate tests (#394) --- websocket_message.go | 13 +++++++++++++ websocket_message_test.go | 27 +++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/websocket_message.go b/websocket_message.go index 6ed99709d..0206df9db 100644 --- a/websocket_message.go +++ b/websocket_message.go @@ -66,6 +66,19 @@ func newWebsocketMessage( wm.typ = typ wm.content = content + opChain := wm.chain.enter("") + defer opChain.leave() + + if len(closeCode) > 1 { + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{ + errors.New("unexpected multiple closeCode arguments"), + }, + }) + return wm + } + if len(closeCode) != 0 { wm.closeCode = closeCode[0] } diff --git a/websocket_message_test.go b/websocket_message_test.go index c4e78ff49..82eb2025e 100644 --- a/websocket_message_test.go +++ b/websocket_message_test.go @@ -674,3 +674,30 @@ func TestWebsocketMessage_Codes(t *testing.T) { } }) } + +func TestWebsocketMessage_CloseCode(t *testing.T) { + t.Run("close code is not passed", func(t *testing.T) { + reporter := newMockReporter(t) + + NewWebsocketMessage(reporter, websocket.CloseMessage, nil).Code(0). + chain.assert(t, success) + NewWebsocketMessage(reporter, websocket.CloseMessage, nil).NotCode(0). + chain.assert(t, failure) + }) + + t.Run("single close code is passed", func(t *testing.T) { + reporter := newMockReporter(t) + + NewWebsocketMessage(reporter, websocket.CloseMessage, nil, 10).Code(10). + chain.assert(t, success) + NewWebsocketMessage(reporter, websocket.CloseMessage, nil, 10).NotCode(10). + chain.assert(t, failure) + }) + + t.Run("multiple close code is passed", func(t *testing.T) { + reporter := newMockReporter(t) + + NewWebsocketMessage(reporter, websocket.CloseMessage, nil, 10, 20). + chain.assert(t, failure) + }) +} From 874f26b529a3f6da2678d1e3cc0e56292ed51578 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sat, 22 Apr 2023 23:36:43 +0400 Subject: [PATCH 04/57] Reorder code in socket message --- websocket_message.go | 6 ++--- websocket_message_test.go | 54 +++++++++++++++++++-------------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/websocket_message.go b/websocket_message.go index 0206df9db..23b27c375 100644 --- a/websocket_message.go +++ b/websocket_message.go @@ -63,12 +63,12 @@ func newWebsocketMessage( ) *WebsocketMessage { wm := newEmptyWebsocketMessage(parent) - wm.typ = typ - wm.content = content - opChain := wm.chain.enter("") defer opChain.leave() + wm.typ = typ + wm.content = content + if len(closeCode) > 1 { opChain.fail(AssertionFailure{ Type: AssertUsage, diff --git a/websocket_message_test.go b/websocket_message_test.go index 82eb2025e..6fc912968 100644 --- a/websocket_message_test.go +++ b/websocket_message_test.go @@ -73,6 +73,33 @@ func TestWebsocketMessage_Alias(t *testing.T) { assert.Equal(t, []string{"foo", "Body()"}, childValue.chain.context.AliasedPath) } +func TestWebsocketMessage_CloseCode(t *testing.T) { + t.Run("close code is not passed", func(t *testing.T) { + reporter := newMockReporter(t) + + NewWebsocketMessage(reporter, websocket.CloseMessage, nil).Code(0). + chain.assert(t, success) + NewWebsocketMessage(reporter, websocket.CloseMessage, nil).NotCode(0). + chain.assert(t, failure) + }) + + t.Run("single close code is passed", func(t *testing.T) { + reporter := newMockReporter(t) + + NewWebsocketMessage(reporter, websocket.CloseMessage, nil, 10).Code(10). + chain.assert(t, success) + NewWebsocketMessage(reporter, websocket.CloseMessage, nil, 10).NotCode(10). + chain.assert(t, failure) + }) + + t.Run("multiple close code is passed", func(t *testing.T) { + reporter := newMockReporter(t) + + NewWebsocketMessage(reporter, websocket.CloseMessage, nil, 10, 20). + chain.assert(t, failure) + }) +} + func TestWebsocketMessage_CloseMessage(t *testing.T) { t.Run("CloseMessage type with functions", func(t *testing.T) { cases := []struct { @@ -674,30 +701,3 @@ func TestWebsocketMessage_Codes(t *testing.T) { } }) } - -func TestWebsocketMessage_CloseCode(t *testing.T) { - t.Run("close code is not passed", func(t *testing.T) { - reporter := newMockReporter(t) - - NewWebsocketMessage(reporter, websocket.CloseMessage, nil).Code(0). - chain.assert(t, success) - NewWebsocketMessage(reporter, websocket.CloseMessage, nil).NotCode(0). - chain.assert(t, failure) - }) - - t.Run("single close code is passed", func(t *testing.T) { - reporter := newMockReporter(t) - - NewWebsocketMessage(reporter, websocket.CloseMessage, nil, 10).Code(10). - chain.assert(t, success) - NewWebsocketMessage(reporter, websocket.CloseMessage, nil, 10).NotCode(10). - chain.assert(t, failure) - }) - - t.Run("multiple close code is passed", func(t *testing.T) { - reporter := newMockReporter(t) - - NewWebsocketMessage(reporter, websocket.CloseMessage, nil, 10, 20). - chain.assert(t, failure) - }) -} From 6442ac7bebebf7dfb92be3b516838a60d99dbb6f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Apr 2023 23:38:22 +0400 Subject: [PATCH 05/57] Bump google.golang.org/protobuf from 1.29.0 to 1.29.1 in /_examples (#406) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- _examples/go.mod | 10 +-- _examples/go.sum | 169 +++++++++++++++++++++++++++++------------------ 2 files changed, 106 insertions(+), 73 deletions(-) diff --git a/_examples/go.mod b/_examples/go.mod index b2d244dc6..9a8ac3b60 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -19,14 +19,12 @@ require ( require ( github.com/BurntSushi/toml v1.2.1 // indirect github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 // indirect - github.com/CloudyKit/jet/v3 v3.0.1 // indirect github.com/CloudyKit/jet/v6 v6.2.0 // indirect github.com/Joker/jade v1.1.3 // indirect github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect github.com/ajg/form v1.5.1 // indirect github.com/andybalholm/brotli v1.0.5 // indirect github.com/aymerick/douceur v0.2.0 // indirect - github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 // indirect github.com/fatih/color v1.15.0 // indirect @@ -45,10 +43,6 @@ require ( github.com/google/uuid v1.3.0 // indirect github.com/gorilla/css v1.0.0 // indirect github.com/imkira/go-interpol v1.1.0 // indirect - github.com/iris-contrib/blackfriday v2.0.0+incompatible // indirect - github.com/iris-contrib/go.uuid v2.0.0+incompatible // indirect - github.com/iris-contrib/jade v1.1.4 // indirect - github.com/iris-contrib/pongo2 v0.0.1 // indirect github.com/iris-contrib/schema v0.0.6 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -71,12 +65,10 @@ require ( github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/ryanuber/columnize v2.1.2+incompatible // indirect github.com/sanity-io/litter v1.5.5 // indirect github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d // indirect github.com/schollz/closestmatch v2.1.0+incompatible // indirect github.com/sergi/go-diff v1.3.1 // indirect - github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/smartystreets/goconvey v1.7.2 // indirect github.com/stretchr/testify v1.8.2 // indirect @@ -107,7 +99,7 @@ require ( golang.org/x/sys v0.7.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect - google.golang.org/protobuf v1.29.0 // indirect + google.golang.org/protobuf v1.29.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/_examples/go.sum b/_examples/go.sum index cdc325b1c..35cd7afe4 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -1,21 +1,17 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= -github.com/CloudyKit/jet/v3 v3.0.1 h1:LUBMIJtW92Fqi+fOqXbGsT/xKiwNWjYktaNAASPE7E4= -github.com/CloudyKit/jet/v3 v3.0.1/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo= github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= -github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= @@ -27,9 +23,13 @@ github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHG github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 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/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible h1:Ppm0npCCsmuR9oQaBtRuZcmILVE74aXE+AmrJj8L2ns= -github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= +github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 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= @@ -39,15 +39,16 @@ github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2 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/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4= +github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= github.com/fasthttp/websocket v1.4.3-rc.6/go.mod h1:43W9OM2T8FeXpCWMsBd9Cb7nE2CACNqNvCqQCoty/Lc= github.com/fasthttp/websocket v1.5.0 h1:B4zbe3xXyvIdnqjOZrafVFklCUq5ZLo/TqCt5JA1wLE= @@ -60,8 +61,8 @@ github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU5kORdjhlA1yX8= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= @@ -71,10 +72,10 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127 h1:0gkP6mzaMqkmpcJYCFOLkIBwI7xFExG03bbkOkCvUPI= -github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-oauth2/oauth2/v4 v4.5.1 h1:3vxp+cjLqDe1TbogbwtMyeHRHr1tD+ksrK7xNppYRDs= github.com/go-oauth2/oauth2/v4 v4.5.1/go.mod h1:wk/2uLImWIa9VVQDgxz99H2GDbhmfi/9/Xr+GvkSUSQ= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= @@ -84,12 +85,14 @@ github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-session/session v3.1.2+incompatible/go.mod h1:8B3iivBQjrz/JtC68Np2T1yBBLxTan3mn/3OM0CyRt0= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= -github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= @@ -110,18 +113,21 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu 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/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= 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.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= @@ -130,31 +136,23 @@ github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGa github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/blackfriday v2.0.0+incompatible h1:o5sHQHHm0ToHUlAJSTjW9UWicjJSDDauOOQ2AHuIVp4= -github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI= -github.com/iris-contrib/go.uuid v2.0.0+incompatible h1:XZubAYg61/JwnJNbZilGjf3b3pB80+OQg2qf6c8BfWE= github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= -github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk= -github.com/iris-contrib/jade v1.1.4 h1:WoYdfyJFfZIUgqNAeOyRfTNQZOksSlZ6+FnXR3AEpX0= -github.com/iris-contrib/jade v1.1.4/go.mod h1:EDqR+ur9piDl6DUgs6qRrlfzmlx/D5UybogqrXvJTBE= -github.com/iris-contrib/pongo2 v0.0.1 h1:zGP7pW51oi5eQZMIlGA3I+FHY9/HOQWDB+572yin0to= -github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g= -github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw= +github.com/iris-contrib/httpexpect/v2 v2.12.1 h1:3cTZSyBBen/kfjCtgNFoUKi1u0FVXNaAjyRJOo6AVS4= +github.com/iris-contrib/httpexpect/v2 v2.12.1/go.mod h1:7+RB6W5oNClX7PTwJgJnsQP3ZuUUYB3u61KCqeSgZ88= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= @@ -162,26 +160,24 @@ github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfV github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= -github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8= github.com/kataras/golog v0.1.8 h1:isP8th4PJH2SrbkciKnylaND9xoTtfxv++NB+DF0l9g= github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= -github.com/kataras/iris/v12 v12.1.8 h1:O3gJasjm7ZxpxwTH8tApZsvf274scSGQAUpNe47c37U= -github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE= github.com/kataras/iris/v12 v12.2.0 h1:WzDY5nGuW/LgVaFS5BtTkW3crdSKJ/FEgWnxPnIVVLI= github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= -github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE= -github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro= +github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= +github.com/kataras/neffos v0.0.21/go.mod h1:FeGka8lu8cjD2H+0OpBvW8c6xXawy3fj5VX6xcIJ1Fg= github.com/kataras/pio v0.0.11 h1:kqreJ5KOEXGMwHAWHDwIl+mjfNCPhAwZPa8gK7MKlyw= github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= -github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8= github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= -github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.16.4 h1:91KN02FnsOYhuunwU4ssRe8lc2JosWmizWa91B5v1PU= github.com/klauspost/compress v1.16.4/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= @@ -199,6 +195,7 @@ github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8 github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= @@ -216,13 +213,10 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= -github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= -github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc= -github.com/microcosm-cc/bluemonday v1.0.21 h1:dNH3e4PSyE4vNX+KlRGHT5KrSvjeUkoNPwEORjffHJg= -github.com/microcosm-cc/bluemonday v1.0.21/go.mod h1:ytNkv4RrDrLJ2pqlsSI46O6IVXmZOBBD4SaJyDwwTkM= +github.com/mediocregopher/radix/v3 v3.8.1/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= @@ -230,27 +224,53 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh 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/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= -github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= -github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/jwt/v2 v2.3.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= +github.com/nats-io/nats-server/v2 v2.9.11/go.mod h1:b0oVuxSlkvS3ZjMkncFeACGyZohbO4XhSqW1Lt7iRRY= +github.com/nats-io/nats.go v1.19.0/go.mod h1:tLqubohF7t4z3du1QDPYJIQQyhb4wl6DhjxEajSI7UA= +github.com/nats-io/nats.go v1.23.0/go.mod h1:ki/Scsa23edbh8IRZbCuNXR9TDcbvfaSijKtaqQgw+Q= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= +github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= +github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= +github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= +github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= +github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= +github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= +github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= +github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= +github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/onsi/gomega v1.27.1 h1:rfztXRbg6nv/5f+Raen9RcGoSecHIFgBBLQK3Wdj754= +github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= @@ -262,15 +282,15 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.2+incompatible h1:C89EOx/XBWwIXl8wm8OPJBd7kPF25UfsK2X7Ph/zCAk= -github.com/ryanuber/columnize v2.1.2+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= github.com/savsgio/gotils v0.0.0-20210617111740-97865ed5a873/go.mod h1:dmPawKuiAeG/aFYVs2i+Dyosoo7FNcm+Pi8iK6ZUrX8= @@ -284,8 +304,7 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= 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= @@ -294,6 +313,8 @@ github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYl github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg= github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= @@ -310,6 +331,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf 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.5.0/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -322,6 +344,7 @@ github.com/tdewolff/minify/v2 v2.12.4 h1:kejsHQMM17n6/gwdw53qsi6lg0TGddZADVyQOz1 github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= github.com/tdewolff/parse/v2 v2.6.4 h1:KCkDvNUMof10e3QExio9OPZJT8SbdKojLBumw8YZycQ= github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= +github.com/tdewolff/test v1.0.7 h1:8Vs0142DmPFW/bQeHRP3MV19m1gvndjUb1sn8yy74LM= github.com/tdewolff/test v1.0.7/go.mod h1:6DAvZliBAAnD7rhVgwaM7DE5/d9NMOAJ09SqYqeK4QE= github.com/tidwall/btree v0.0.0-20191029221954-400434d76274 h1:G6Z6HvJuPjG6XfNGi/feOATzeJrfgTNJY+rGrHbA04E= github.com/tidwall/btree v0.0.0-20191029221954-400434d76274/go.mod h1:huei1BkDWJ3/sLXmO+bsCNELL+Bp2Kks9OLyQFkzvA8= @@ -342,6 +365,8 @@ github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e h1:+NL1GDIUOKxVfbp2K github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao= github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 h1:Otn9S136ELckZ3KKDyCkxapfufrqDqwmGjcHfAyXRrE= github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= @@ -383,48 +408,57 @@ github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= +go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= 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-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/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-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20221002022538-bcab6841153b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= @@ -438,26 +472,31 @@ golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/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-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -469,12 +508,14 @@ golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -484,6 +525,7 @@ golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= @@ -502,18 +544,20 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.2.0 h1:52I/1L54xyEQAYdtcSuxtiT84KGYTBGXwayxmIpNJhE= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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= @@ -533,10 +577,10 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.29.0 h1:44S3JjaKmLEE4YIkjzexaP+NzZsudE3Zin5Njn/pYX0= google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.1 h1:7QBf+IK2gx70Ap/hDsOmam3GE0v9HicjfEdAxE62UoM= +google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -545,10 +589,8 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -557,7 +599,6 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= From 16a1e245c2c08b5ecf8e7ccf399c00d1ef5b1249 Mon Sep 17 00:00:00 2001 From: Rafi Ramadhana <42462215+neverbeenthisweeb@users.noreply.github.com> Date: Sun, 23 Apr 2023 03:24:06 +0700 Subject: [PATCH 06/57] Add unit test for error propagation (#369) Co-authored-by: Victor Gaydov --- expect_test.go | 124 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/expect_test.go b/expect_test.go index 860f74c69..b7f2fc9b0 100644 --- a/expect_test.go +++ b/expect_test.go @@ -341,6 +341,130 @@ func TestExpect_Branches(t *testing.T) { e5.chain.assertFlags(t, 0) } +func TestExpect_Propagation(t *testing.T) { + t.Run("subsequent operations", func(t *testing.T) { + ctr := 0 + reporter := newMockReporter(t) + reporter.reportCb = func() { + ctr++ + } + + // Failed operation + value := NewArray(reporter, []interface{}{"foo"}) + value.IsEmpty() + value.chain.assertFlags(t, flagFailed) + assert.Equal(t, 1, ctr) + + // Subsequent failed operation won't report failures + value.IsEmpty() + value.chain.assertFlags(t, flagFailed) + assert.Equal(t, 1, ctr) + }) + + t.Run("newly created child", func(t *testing.T) { + ctr := 0 + reporter := newMockReporter(t) + reporter.reportCb = func() { + ctr++ + } + + // Parent's failed operation reports failure + parent := NewArray(reporter, []interface{}{"foo"}) + parent.IsEmpty() + parent.chain.assertFlags(t, flagFailed) + assert.Equal(t, 1, ctr) + + // Child created after parent's failure + // Child's failed operation won't report failures + child := parent.Value(0) + child.IsEqual("bar") + parent.chain.assertFlags(t, flagFailed|flagFailedChildren) + child.chain.assertFlags(t, flagFailed) + assert.Equal(t, 1, ctr) + }) + + t.Run("previously created child", func(t *testing.T) { + ctr := 0 + reporter := newMockReporter(t) + reporter.reportCb = func() { + ctr++ + } + + // Parent and child + parent := NewArray(reporter, []interface{}{"foo"}) + child := parent.Value(0) + + // Parent's failed operation reports failure + parent.IsEmpty() + parent.chain.assertFlags(t, flagFailed) + child.chain.assertFlags(t, 0) + assert.Equal(t, 1, ctr) + + // Child was created before parent's failure + // Child's failed operation will report failures + child.IsEqual("bar") + parent.chain.assertFlags(t, flagFailed|flagFailedChildren) + child.chain.assertFlags(t, flagFailed) + assert.Equal(t, 2, ctr) + }) + + t.Run("newly created child of parent", func(t *testing.T) { + ctr := 0 + reporter := newMockReporter(t) + reporter.reportCb = func() { + ctr++ + } + + // Parent + parent := NewArray(reporter, []interface{}{"foo"}) + + // Child's failed operation will report failures + child := parent.Value(0) + child.IsEqual("bar") + parent.chain.assertFlags(t, flagFailedChildren) + child.chain.assertFlags(t, flagFailed) + assert.Equal(t, 1, ctr) + + // New child created after failure in another child + // New child's failed operation will report failures + newChild := parent.Value(0) + newChild.IsEqual("bar") + parent.chain.assertFlags(t, flagFailedChildren) + child.chain.assertFlags(t, flagFailed) + newChild.chain.assertFlags(t, flagFailed) + assert.Equal(t, 2, ctr) + }) + + t.Run("previously created child of parent", func(t *testing.T) { + ctr := 0 + reporter := newMockReporter(t) + reporter.reportCb = func() { + ctr++ + } + + // Parent + parent := NewArray(reporter, []interface{}{"foo"}) + + // Children + child1 := parent.Value(0) + child2 := parent.Value(0) + + // child1's failed operation will report failures + child1.IsEqual("bar") + parent.chain.assertFlags(t, flagFailedChildren) + child1.chain.assertFlags(t, flagFailed) + child2.chain.assertFlags(t, 0) + assert.Equal(t, 1, ctr) + + // child2's failed operation will report failures + child2.IsEqual("bar") + parent.chain.assertFlags(t, flagFailedChildren) + child1.chain.assertFlags(t, flagFailed) + child2.chain.assertFlags(t, flagFailed) + assert.Equal(t, 2, ctr) + }) +} + func TestExpect_RequestFactory(t *testing.T) { t.Run("default factory", func(t *testing.T) { e := WithConfig(Config{ From 1bfa8d4863637f989219799b5d66daf27bcc03b2 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sun, 23 Apr 2023 00:27:56 +0400 Subject: [PATCH 07/57] Bump examples deps --- Makefile | 4 +- _examples/go.mod | 4 +- _examples/go.sum | 203 +---------------------------------------------- 3 files changed, 8 insertions(+), 203 deletions(-) diff --git a/Makefile b/Makefile index a14787ebb..6f31bfaa9 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ all: tidy gen build lint test spell tidy: - go mod tidy -v + go mod tidy -v cd _examples && go get -v -u github.com/gavv/httpexpect/v2 - cd _examples && go mod tidy -v + cd _examples && go mod tidy -v -compat=1.17 gen: go generate ./... diff --git a/_examples/go.mod b/_examples/go.mod index 9a8ac3b60..b9e3bd3ba 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -11,7 +11,7 @@ require ( github.com/gorilla/websocket v1.5.0 github.com/kataras/iris/v12 v12.2.0 github.com/labstack/echo/v4 v4.10.0 - github.com/valyala/fasthttp v1.45.0 + github.com/valyala/fasthttp v1.46.0 golang.org/x/oauth2 v0.4.0 google.golang.org/appengine v1.6.7 ) @@ -51,7 +51,7 @@ require ( github.com/kataras/pio v0.0.11 // indirect github.com/kataras/sitemap v0.0.6 // indirect github.com/kataras/tunnel v0.0.4 // indirect - github.com/klauspost/compress v1.16.4 // indirect + github.com/klauspost/compress v1.16.5 // indirect github.com/labstack/gommon v0.4.0 // indirect github.com/leodido/go-urn v1.2.1 // indirect github.com/mailgun/raymond/v2 v2.0.48 // indirect diff --git a/_examples/go.sum b/_examples/go.sum index 35cd7afe4..1d37b9af4 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -1,6 +1,4 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= @@ -11,49 +9,30 @@ github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 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/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fasthttp/websocket v1.4.3-rc.6/go.mod h1:43W9OM2T8FeXpCWMsBd9Cb7nE2CACNqNvCqQCoty/Lc= github.com/fasthttp/websocket v1.5.0 h1:B4zbe3xXyvIdnqjOZrafVFklCUq5ZLo/TqCt5JA1wLE= github.com/fasthttp/websocket v1.5.0/go.mod h1:n0BlOQvJdPbTuBkZT0O5+jk/sp/1/VCzquR1BehI2F4= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= @@ -72,28 +51,19 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-oauth2/oauth2/v4 v4.5.1 h1:3vxp+cjLqDe1TbogbwtMyeHRHr1tD+ksrK7xNppYRDs= github.com/go-oauth2/oauth2/v4 v4.5.1/go.mod h1:wk/2uLImWIa9VVQDgxz99H2GDbhmfi/9/Xr+GvkSUSQ= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.10.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos= github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= -github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-session/session v3.1.2+incompatible/go.mod h1:8B3iivBQjrz/JtC68Np2T1yBBLxTan3mn/3OM0CyRt0= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= -github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= -github.com/goccy/go-json v0.9.7/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= @@ -110,7 +80,6 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -118,37 +87,25 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= github.com/iris-contrib/httpexpect/v2 v2.12.1 h1:3cTZSyBBen/kfjCtgNFoUKi1u0FVXNaAjyRJOo6AVS4= -github.com/iris-contrib/httpexpect/v2 v2.12.1/go.mod h1:7+RB6W5oNClX7PTwJgJnsQP3ZuUUYB3u61KCqeSgZ88= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -164,23 +121,16 @@ github.com/kataras/golog v0.1.8 h1:isP8th4PJH2SrbkciKnylaND9xoTtfxv++NB+DF0l9g= github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= github.com/kataras/iris/v12 v12.2.0 h1:WzDY5nGuW/LgVaFS5BtTkW3crdSKJ/FEgWnxPnIVVLI= github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= -github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= -github.com/kataras/neffos v0.0.21/go.mod h1:FeGka8lu8cjD2H+0OpBvW8c6xXawy3fj5VX6xcIJ1Fg= github.com/kataras/pio v0.0.11 h1:kqreJ5KOEXGMwHAWHDwIl+mjfNCPhAwZPa8gK7MKlyw= github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= -github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/compress v1.16.4 h1:91KN02FnsOYhuunwU4ssRe8lc2JosWmizWa91B5v1PU= -github.com/klauspost/compress v1.16.4/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= +github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -195,32 +145,24 @@ github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8 github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mediocregopher/radix/v3 v3.8.1/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= -github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 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= @@ -228,72 +170,30 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/nats-io/jwt/v2 v2.3.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= -github.com/nats-io/nats-server/v2 v2.9.11/go.mod h1:b0oVuxSlkvS3ZjMkncFeACGyZohbO4XhSqW1Lt7iRRY= -github.com/nats-io/nats.go v1.19.0/go.mod h1:tLqubohF7t4z3du1QDPYJIQQyhb4wl6DhjxEajSI7UA= -github.com/nats-io/nats.go v1.23.0/go.mod h1:ki/Scsa23edbh8IRZbCuNXR9TDcbvfaSijKtaqQgw+Q= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= -github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= -github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= -github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= -github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= -github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= -github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= -github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= -github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= -github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= -github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= -github.com/onsi/gomega v1.27.1 h1:rfztXRbg6nv/5f+Raen9RcGoSecHIFgBBLQK3Wdj754= -github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/pkg/diff v0.0.0-20200914180035-5b29258ca4f7/go.mod h1:zO8QMzTeZd5cpnIkz/Gn6iK0jDfGicM1nynOkkPIl28= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= -github.com/savsgio/gotils v0.0.0-20210617111740-97865ed5a873/go.mod h1:dmPawKuiAeG/aFYVs2i+Dyosoo7FNcm+Pi8iK6ZUrX8= github.com/savsgio/gotils v0.0.0-20211223103454-d0aaa54c5899/go.mod h1:oejLrk1Y/5zOF+c/aHtXqn3TFlzzbAgPWg8zBiAHDas= github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d h1:Q+gqLBOPkFGHyCJxXMRqtUgUbTjI8/Ze8vu8GGyNFwo= github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d/go.mod h1:Gy+0tqhJvgGlqnTF8CVGP0AaGRjwBtXs/a5PA0Y3+A4= @@ -304,7 +204,6 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= -github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= 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= @@ -313,25 +212,14 @@ github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYl github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg= github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.0/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -365,20 +253,15 @@ github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e h1:+NL1GDIUOKxVfbp2K github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao= github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 h1:Otn9S136ELckZ3KKDyCkxapfufrqDqwmGjcHfAyXRrE= github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ= -github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= -github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= -github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.27.0/go.mod h1:cmWIqlu99AO/RKcp1HWaViTqc57FswJOfYYdPJBl8BA= github.com/valyala/fasthttp v1.33.0/go.mod h1:KJRK/MXx0J+yd0c5hlR+s1tIHD72sniU8ZJjl97LIw4= github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0= -github.com/valyala/fasthttp v1.45.0 h1:zPkkzpIn8tdHZUrVa6PzYd0i5verqiPSkgTd3bSUcpA= -github.com/valyala/fasthttp v1.45.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= +github.com/valyala/fasthttp v1.46.0 h1:6ZRhrFg8zBXTRYY6vdzbFhqsBd7FVv123pV2m9V87U4= +github.com/valyala/fasthttp v1.46.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= @@ -394,7 +277,6 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= @@ -407,36 +289,17 @@ github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcm github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= -go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= -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/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -447,23 +310,10 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -474,31 +324,20 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/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-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -508,57 +347,27 @@ golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -576,9 +385,6 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.29.1 h1:7QBf+IK2gx70Ap/hDsOmam3GE0v9HicjfEdAxE62UoM= google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -593,7 +399,6 @@ gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 7faff01fc9dbe5c4339e1e4394844576fa1e5bf9 Mon Sep 17 00:00:00 2001 From: Antara Gandhi <68969268+antara-gandhi@users.noreply.github.com> Date: Sat, 22 Apr 2023 16:55:44 -0400 Subject: [PATCH 08/57] refactor json path and schema tests (#400) --- array_test.go | 64 ++++++++++++++++++++++++++++++++++++------------- boolean_test.go | 24 ++++++++++++------- number_test.go | 24 ++++++++++++------- object_test.go | 47 +++++++++++++++++++++++++----------- string_test.go | 23 ++++++++++++------ 5 files changed, 128 insertions(+), 54 deletions(-) diff --git a/array_test.go b/array_test.go index b26b771bf..15af4f2a2 100644 --- a/array_test.go +++ b/array_test.go @@ -227,7 +227,7 @@ func TestArray_Alias(t *testing.T) { assert.Equal(t, []string{"foo", "Filter()"}, childValue.chain.context.AliasedPath) } -func TestArray_Getters(t *testing.T) { +func TestArray_Path(t *testing.T) { t.Run("empty", func(t *testing.T) { reporter := newMockReporter(t) @@ -235,20 +235,62 @@ func TestArray_Getters(t *testing.T) { value := NewArray(reporter, data) - assert.Equal(t, data, value.Raw()) + assert.Equal(t, data, value.Path("$").Raw()) value.chain.assert(t, success) - value.chain.clear() + }) + + t.Run("not empty", func(t *testing.T) { + reporter := newMockReporter(t) + + data := []interface{}{} + + value := NewArray(reporter, data) assert.Equal(t, data, value.Path("$").Raw()) value.chain.assert(t, success) - value.chain.clear() + }) +} + +func TestArray_Schema(t *testing.T) { + t.Run("empty", func(t *testing.T) { + reporter := newMockReporter(t) + + data := []interface{}{} + + value := NewArray(reporter, data) + + value.Schema(`{"type": "array"}`) + value.chain.assert(t, success) + + value.Schema(`{"type": "object"}`) + value.chain.assert(t, failure) + }) + + t.Run("not empty", func(t *testing.T) { + reporter := newMockReporter(t) + + data := []interface{}{} + + value := NewArray(reporter, data) value.Schema(`{"type": "array"}`) value.chain.assert(t, success) - value.chain.clear() value.Schema(`{"type": "object"}`) value.chain.assert(t, failure) + }) +} + +func TestArray_Getters(t *testing.T) { + t.Run("empty", func(t *testing.T) { + reporter := newMockReporter(t) + + data := []interface{}{} + + value := NewArray(reporter, data) + + assert.Equal(t, data, value.Raw()) + value.chain.assert(t, success) value.chain.clear() assert.Equal(t, 0.0, value.Length().Raw()) @@ -283,18 +325,6 @@ func TestArray_Getters(t *testing.T) { value.chain.assert(t, success) value.chain.clear() - assert.Equal(t, data, value.Path("$").Raw()) - value.chain.assert(t, success) - value.chain.clear() - - value.Schema(`{"type": "array"}`) - value.chain.assert(t, success) - value.chain.clear() - - value.Schema(`{"type": "object"}`) - value.chain.assert(t, failure) - value.chain.clear() - assert.Equal(t, 2.0, value.Length().Raw()) value.chain.assert(t, success) value.chain.clear() diff --git a/boolean_test.go b/boolean_test.go index 5b9ce70e5..4641e9220 100644 --- a/boolean_test.go +++ b/boolean_test.go @@ -111,26 +111,34 @@ func TestBoolean_Alias(t *testing.T) { assert.Equal(t, []string{"foo"}, value.chain.context.AliasedPath) } -func TestBoolean_Getters(t *testing.T) { +func TestBoolean_Path(t *testing.T) { reporter := newMockReporter(t) value := NewBoolean(reporter, true) - assert.Equal(t, true, value.Raw()) - value.chain.assert(t, success) - value.chain.clear() - assert.Equal(t, true, value.Path("$").Raw()) value.chain.assert(t, success) - value.chain.clear() +} + +func TestBoolean_Schema(t *testing.T) { + reporter := newMockReporter(t) + + value := NewBoolean(reporter, true) value.Schema(`{"type": "boolean"}`) value.chain.assert(t, success) - value.chain.clear() value.Schema(`{"type": "object"}`) value.chain.assert(t, failure) - value.chain.clear() +} + +func TestBoolean_Raw(t *testing.T) { + reporter := newMockReporter(t) + + value := NewBoolean(reporter, true) + + assert.Equal(t, true, value.Raw()) + value.chain.assert(t, success) } func TestBoolean_IsEqual(t *testing.T) { diff --git a/number_test.go b/number_test.go index 475ab9cae..1d7333246 100644 --- a/number_test.go +++ b/number_test.go @@ -135,26 +135,34 @@ func TestNumber_Alias(t *testing.T) { assert.Equal(t, []string{"foo"}, value.chain.context.AliasedPath) } -func TestNumber_Getters(t *testing.T) { +func TestNumber_Path(t *testing.T) { reporter := newMockReporter(t) value := NewNumber(reporter, 123.0) - assert.Equal(t, 123.0, value.Raw()) - value.chain.assert(t, success) - value.chain.clear() - assert.Equal(t, 123.0, value.Path("$").Raw()) value.chain.assert(t, success) - value.chain.clear() +} + +func TestNumber_Schema(t *testing.T) { + reporter := newMockReporter(t) + + value := NewNumber(reporter, 123.0) value.Schema(`{"type": "number"}`) value.chain.assert(t, success) - value.chain.clear() value.Schema(`{"type": "object"}`) value.chain.assert(t, failure) - value.chain.clear() +} + +func TestNumber_Raw(t *testing.T) { + reporter := newMockReporter(t) + + value := NewNumber(reporter, 123.0) + + assert.Equal(t, 123.0, value.Raw()) + value.chain.assert(t, success) } func TestNumber_IsEqual(t *testing.T) { diff --git a/object_test.go b/object_test.go index 468021989..dcf49310f 100644 --- a/object_test.go +++ b/object_test.go @@ -260,6 +260,37 @@ func TestObject_Alias(t *testing.T) { assert.Equal(t, []string{"bar", "Values()"}, childValue.chain.context.AliasedPath) } +func TestObject_Path(t *testing.T) { + reporter := newMockReporter(t) + + m := map[string]interface{}{ + "foo": 123.0, + "bar": []interface{}{"456", 789.0}, + "baz": map[string]interface{}{ + "a": "b", + }, + } + + value := NewObject(reporter, m) + + assert.Equal(t, m, value.Path("$").Raw()) + value.chain.assert(t, success) +} + +func TestObject_Schema(t *testing.T) { + reporter := newMockReporter(t) + + value := NewObject(reporter, map[string]interface{}{ + "foo": "bar", + }) + + value.Schema(`{"type": "object"}`) + value.chain.assert(t, success) + + value.Schema(`{"type": "array"}`) + value.chain.assert(t, failure) +} + func TestObject_Getters(t *testing.T) { reporter := newMockReporter(t) @@ -287,18 +318,6 @@ func TestObject_Getters(t *testing.T) { value.chain.assert(t, success) value.chain.clear() - assert.Equal(t, m, value.Path("$").Raw()) - value.chain.assert(t, success) - value.chain.clear() - - value.Schema(`{"type": "object"}`) - value.chain.assert(t, success) - value.chain.clear() - - value.Schema(`{"type": "array"}`) - value.chain.assert(t, failure) - value.chain.clear() - value.Keys().ContainsOnly(keys...) value.chain.assert(t, success) value.chain.clear() @@ -1567,9 +1586,9 @@ func TestObject_Transform(t *testing.T) { newObject := object.Transform(func(_ string, val interface{}) interface{} { if v, err := strconv.ParseFloat(val.(string), 64); err == nil { return myInt(v) - } else { - return val } + + return val }) assert.Equal(t, diff --git a/string_test.go b/string_test.go index 344d572cd..6315daa9b 100644 --- a/string_test.go +++ b/string_test.go @@ -145,25 +145,34 @@ func TestString_Alias(t *testing.T) { assert.Equal(t, []string{"foo", "AsNumber()"}, childValue.chain.context.AliasedPath) } -func TestString_Getters(t *testing.T) { +func TestString_Path(t *testing.T) { reporter := newMockReporter(t) value := NewString(reporter, "foo") - assert.Equal(t, "foo", value.Raw()) - value.chain.assert(t, success) - value.chain.clear() - assert.Equal(t, "foo", value.Path("$").Raw()) value.chain.assert(t, success) - value.chain.clear() +} + +func TestString_Schema(t *testing.T) { + reporter := newMockReporter(t) + + value := NewString(reporter, "foo") value.Schema(`{"type": "string"}`) value.chain.assert(t, success) - value.chain.clear() value.Schema(`{"type": "object"}`) value.chain.assert(t, failure) +} + +func TestString_Getters(t *testing.T) { + reporter := newMockReporter(t) + + value := NewString(reporter, "foo") + + assert.Equal(t, "foo", value.Raw()) + value.chain.assert(t, success) value.chain.clear() num := value.Length() From 318b1a45b5070532adc7aa605b4e2bef62e9696a Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sun, 23 Apr 2023 00:57:24 +0400 Subject: [PATCH 09/57] Refactor tests --- array_test.go | 85 +++++++++++++++++++++++++------------------------ boolean_test.go | 80 +++++++++++++++++++++++----------------------- number_test.go | 28 ++++++++-------- object_test.go | 13 ++++---- string_test.go | 10 +++--- value_test.go | 2 +- 6 files changed, 108 insertions(+), 110 deletions(-) diff --git a/array_test.go b/array_test.go index 15af4f2a2..bde4500ab 100644 --- a/array_test.go +++ b/array_test.go @@ -228,57 +228,58 @@ func TestArray_Alias(t *testing.T) { } func TestArray_Path(t *testing.T) { - t.Run("empty", func(t *testing.T) { - reporter := newMockReporter(t) - - data := []interface{}{} - - value := NewArray(reporter, data) - - assert.Equal(t, data, value.Path("$").Raw()) - value.chain.assert(t, success) - }) - - t.Run("not empty", func(t *testing.T) { - reporter := newMockReporter(t) + cases := []struct { + name string + value []interface{} + }{ + { + name: "empty", + value: []interface{}{}, + }, + { + name: "not empty", + value: []interface{}{"foo", 123.0}, + }, + } - data := []interface{}{} + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + reporter := newMockReporter(t) - value := NewArray(reporter, data) + value := NewArray(reporter, tc.value) - assert.Equal(t, data, value.Path("$").Raw()) - value.chain.assert(t, success) - }) + assert.Equal(t, tc.value, value.Path("$").Raw()) + value.chain.assert(t, success) + }) + } } func TestArray_Schema(t *testing.T) { - t.Run("empty", func(t *testing.T) { - reporter := newMockReporter(t) - - data := []interface{}{} - - value := NewArray(reporter, data) - - value.Schema(`{"type": "array"}`) - value.chain.assert(t, success) - - value.Schema(`{"type": "object"}`) - value.chain.assert(t, failure) - }) - - t.Run("not empty", func(t *testing.T) { - reporter := newMockReporter(t) - - data := []interface{}{} + cases := []struct { + name string + value []interface{} + }{ + { + name: "empty", + value: []interface{}{}, + }, + { + name: "not empty", + value: []interface{}{"foo", 123.0}, + }, + } - value := NewArray(reporter, data) + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + reporter := newMockReporter(t) - value.Schema(`{"type": "array"}`) - value.chain.assert(t, success) + NewArray(reporter, tc.value).Schema(`{"type": "array"}`). + chain.assert(t, success) - value.Schema(`{"type": "object"}`) - value.chain.assert(t, failure) - }) + NewArray(reporter, tc.value).Schema(`{"type": "object"}`). + chain.assert(t, failure) + }) + } } func TestArray_Getters(t *testing.T) { diff --git a/boolean_test.go b/boolean_test.go index 4641e9220..96ee6637d 100644 --- a/boolean_test.go +++ b/boolean_test.go @@ -53,6 +53,19 @@ func TestBoolean_Constructors(t *testing.T) { }) } +func TestBoolean_Raw(t *testing.T) { + for _, data := range []bool{true, false} { + t.Run(fmt.Sprintf("%v", data), func(t *testing.T) { + reporter := newMockReporter(t) + + value := NewBoolean(reporter, data) + + assert.Equal(t, data, value.Raw()) + value.chain.assert(t, success) + }) + } +} + func TestBoolean_Decode(t *testing.T) { t.Run("target is empty interface", func(t *testing.T) { reporter := newMockReporter(t) @@ -123,60 +136,49 @@ func TestBoolean_Path(t *testing.T) { func TestBoolean_Schema(t *testing.T) { reporter := newMockReporter(t) - value := NewBoolean(reporter, true) - - value.Schema(`{"type": "boolean"}`) - value.chain.assert(t, success) - - value.Schema(`{"type": "object"}`) - value.chain.assert(t, failure) -} - -func TestBoolean_Raw(t *testing.T) { - reporter := newMockReporter(t) - - value := NewBoolean(reporter, true) + NewBoolean(reporter, true).Schema(`{"type": "boolean"}`). + chain.assert(t, success) - assert.Equal(t, true, value.Raw()) - value.chain.assert(t, success) + NewBoolean(reporter, true).Schema(`{"type": "object"}`). + chain.assert(t, failure) } func TestBoolean_IsEqual(t *testing.T) { - for _, value := range []bool{true, false} { - t.Run(fmt.Sprintf("%v", value), func(t *testing.T) { + for _, data := range []bool{true, false} { + t.Run(fmt.Sprintf("%v", data), func(t *testing.T) { reporter := newMockReporter(t) - NewBoolean(reporter, value).IsEqual(value). + NewBoolean(reporter, data).IsEqual(data). chain.assert(t, success) - NewBoolean(reporter, value).IsEqual(!value). + NewBoolean(reporter, data).IsEqual(!data). chain.assert(t, failure) - NewBoolean(reporter, value).NotEqual(value). + NewBoolean(reporter, data).NotEqual(data). chain.assert(t, failure) - NewBoolean(reporter, value).NotEqual(!value). + NewBoolean(reporter, data).NotEqual(!data). chain.assert(t, success) }) } } func TestBoolean_IsValue(t *testing.T) { - for _, value := range []bool{true, false} { - t.Run(fmt.Sprintf("%v", value), func(t *testing.T) { + for _, data := range []bool{true, false} { + t.Run(fmt.Sprintf("%v", data), func(t *testing.T) { reporter := newMockReporter(t) - if value { - NewBoolean(reporter, value).IsTrue(). + if data { + NewBoolean(reporter, data).IsTrue(). chain.assert(t, success) - NewBoolean(reporter, value).IsFalse(). + NewBoolean(reporter, data).IsFalse(). chain.assert(t, failure) } else { - NewBoolean(reporter, value).IsTrue(). + NewBoolean(reporter, data).IsTrue(). chain.assert(t, failure) - NewBoolean(reporter, value).IsFalse(). + NewBoolean(reporter, data).IsFalse(). chain.assert(t, success) } }) @@ -185,39 +187,39 @@ func TestBoolean_IsValue(t *testing.T) { func TestBoolean_InList(t *testing.T) { t.Run("basic", func(t *testing.T) { - for _, value := range []bool{true, false} { - t.Run(fmt.Sprintf("%v", value), func(t *testing.T) { + for _, data := range []bool{true, false} { + t.Run(fmt.Sprintf("%v", data), func(t *testing.T) { reporter := newMockReporter(t) - NewBoolean(reporter, value).InList(value). + NewBoolean(reporter, data).InList(data). chain.assert(t, success) - NewBoolean(reporter, value).InList(!value, value). + NewBoolean(reporter, data).InList(!data, data). chain.assert(t, success) - NewBoolean(reporter, value).InList(!value, !value). + NewBoolean(reporter, data).InList(!data, !data). chain.assert(t, failure) - NewBoolean(reporter, value).NotInList(value). + NewBoolean(reporter, data).NotInList(data). chain.assert(t, failure) - NewBoolean(reporter, value).NotInList(!value, value). + NewBoolean(reporter, data).NotInList(!data, data). chain.assert(t, failure) - NewBoolean(reporter, value).NotInList(!value, !value). + NewBoolean(reporter, data).NotInList(!data, !data). chain.assert(t, success) }) } }) t.Run("invalid argument", func(t *testing.T) { - for _, value := range []bool{true, false} { + for _, data := range []bool{true, false} { reporter := newMockReporter(t) - NewBoolean(reporter, value).InList(). + NewBoolean(reporter, data).InList(). chain.assert(t, failure) - NewBoolean(reporter, value).NotInList(). + NewBoolean(reporter, data).NotInList(). chain.assert(t, failure) } }) diff --git a/number_test.go b/number_test.go index 1d7333246..8778f14b9 100644 --- a/number_test.go +++ b/number_test.go @@ -65,6 +65,15 @@ func TestNumber_Constructors(t *testing.T) { }) } +func TestNumber_Raw(t *testing.T) { + reporter := newMockReporter(t) + + value := NewNumber(reporter, 123.0) + + assert.Equal(t, 123.0, value.Raw()) + value.chain.assert(t, success) +} + func TestNumber_Decode(t *testing.T) { t.Run("target is empty interface", func(t *testing.T) { reporter := newMockReporter(t) @@ -147,22 +156,11 @@ func TestNumber_Path(t *testing.T) { func TestNumber_Schema(t *testing.T) { reporter := newMockReporter(t) - value := NewNumber(reporter, 123.0) - - value.Schema(`{"type": "number"}`) - value.chain.assert(t, success) - - value.Schema(`{"type": "object"}`) - value.chain.assert(t, failure) -} - -func TestNumber_Raw(t *testing.T) { - reporter := newMockReporter(t) - - value := NewNumber(reporter, 123.0) + NewNumber(reporter, 123.0).Schema(`{"type": "number"}`). + chain.assert(t, success) - assert.Equal(t, 123.0, value.Raw()) - value.chain.assert(t, success) + NewNumber(reporter, 123.0).Schema(`{"type": "object"}`). + chain.assert(t, failure) } func TestNumber_IsEqual(t *testing.T) { diff --git a/object_test.go b/object_test.go index dcf49310f..992687e7c 100644 --- a/object_test.go +++ b/object_test.go @@ -280,15 +280,15 @@ func TestObject_Path(t *testing.T) { func TestObject_Schema(t *testing.T) { reporter := newMockReporter(t) - value := NewObject(reporter, map[string]interface{}{ + data := map[string]interface{}{ "foo": "bar", - }) + } - value.Schema(`{"type": "object"}`) - value.chain.assert(t, success) + NewObject(reporter, data).Schema(`{"type": "object"}`). + chain.assert(t, success) - value.Schema(`{"type": "array"}`) - value.chain.assert(t, failure) + NewObject(reporter, data).Schema(`{"type": "array"}`). + chain.assert(t, failure) } func TestObject_Getters(t *testing.T) { @@ -1587,7 +1587,6 @@ func TestObject_Transform(t *testing.T) { if v, err := strconv.ParseFloat(val.(string), 64); err == nil { return myInt(v) } - return val }) diff --git a/string_test.go b/string_test.go index 6315daa9b..a184cdd5c 100644 --- a/string_test.go +++ b/string_test.go @@ -157,13 +157,11 @@ func TestString_Path(t *testing.T) { func TestString_Schema(t *testing.T) { reporter := newMockReporter(t) - value := NewString(reporter, "foo") - - value.Schema(`{"type": "string"}`) - value.chain.assert(t, success) + NewString(reporter, "foo").Schema(`{"type": "string"}`). + chain.assert(t, success) - value.Schema(`{"type": "object"}`) - value.chain.assert(t, failure) + NewString(reporter, "foo").Schema(`{"type": "object"}`). + chain.assert(t, failure) } func TestString_Getters(t *testing.T) { diff --git a/value_test.go b/value_test.go index c64839c5d..d30c1a4b2 100644 --- a/value_test.go +++ b/value_test.go @@ -1141,7 +1141,7 @@ func TestValue_Schema(t *testing.T) { } }, "require": ["foo", "bar"] - }` + }` t.Run("schema with valid data", func(t *testing.T) { reporter := newMockReporter(t) From 95868de88dee1f89878689ea437278302b2f411e Mon Sep 17 00:00:00 2001 From: Jeremy Phua Date: Sun, 23 Apr 2023 05:08:32 +0800 Subject: [PATCH 10/57] Convert Object tests to table-driven style (#397) Co-authored-by: Victor Gaydov --- object_test.go | 460 ++++++++++++++++++++++--------------------------- 1 file changed, 207 insertions(+), 253 deletions(-) diff --git a/object_test.go b/object_test.go index 992687e7c..c48266537 100644 --- a/object_test.go +++ b/object_test.go @@ -356,115 +356,92 @@ func TestObject_IsEmpty(t *testing.T) { t.Run("empty map", func(t *testing.T) { reporter := newMockReporter(t) - value := NewObject(reporter, map[string]interface{}{}) + NewObject(reporter, map[string]interface{}{}).IsEmpty(). + chain.assert(t, success) - value.IsEmpty() - value.chain.assert(t, success) - value.chain.clear() - - value.NotEmpty() - value.chain.assert(t, failure) - value.chain.clear() + NewObject(reporter, map[string]interface{}{}).NotEmpty(). + chain.assert(t, failure) }) t.Run("one empty element", func(t *testing.T) { reporter := newMockReporter(t) - value := NewObject(reporter, map[string]interface{}{"": nil}) + NewObject(reporter, map[string]interface{}{"": nil}).IsEmpty(). + chain.assert(t, failure) - value.IsEmpty() - value.chain.assert(t, failure) - value.chain.clear() - - value.NotEmpty() - value.chain.assert(t, success) - value.chain.clear() + NewObject(reporter, map[string]interface{}{"": nil}).NotEmpty(). + chain.assert(t, success) }) } func TestObject_IsEqual(t *testing.T) { - t.Run("empty", func(t *testing.T) { - reporter := newMockReporter(t) - - value := NewObject(reporter, map[string]interface{}{}) - - assert.Equal(t, map[string]interface{}{}, value.Raw()) - - value.IsEqual(map[string]interface{}{}) - value.chain.assert(t, success) - value.chain.clear() - - value.NotEqual(map[string]interface{}{}) - value.chain.assert(t, failure) - value.chain.clear() - - value.IsEqual(map[string]interface{}{"": nil}) - value.chain.assert(t, failure) - value.chain.clear() - - value.NotEqual(map[string]interface{}{"": nil}) - value.chain.assert(t, success) - value.chain.clear() - }) - - t.Run("not empty", func(t *testing.T) { - reporter := newMockReporter(t) - - value := NewObject(reporter, map[string]interface{}{"foo": 123.0}) - - assert.Equal(t, map[string]interface{}{"foo": 123.0}, value.Raw()) - - value.IsEqual(map[string]interface{}{}) - value.chain.assert(t, failure) - value.chain.clear() - - value.NotEqual(map[string]interface{}{}) - value.chain.assert(t, success) - value.chain.clear() - - value.IsEqual(map[string]interface{}{"FOO": 123.0}) - value.chain.assert(t, failure) - value.chain.clear() - - value.NotEqual(map[string]interface{}{"FOO": 123.0}) - value.chain.assert(t, success) - value.chain.clear() - - value.IsEqual(map[string]interface{}{"foo": 456.0}) - value.chain.assert(t, failure) - value.chain.clear() - - value.NotEqual(map[string]interface{}{"foo": 456.0}) - value.chain.assert(t, success) - value.chain.clear() - - value.IsEqual(map[string]interface{}{"foo": 123.0}) - value.chain.assert(t, success) - value.chain.clear() + t.Run("basic", func(t *testing.T) { + cases := []struct { + name string + value map[string]interface{} + testValue map[string]interface{} + wantEqual chainResult + }{ + { + name: "empty vs one empty", + value: map[string]interface{}{}, + testValue: map[string]interface{}{}, + wantEqual: success, + }, + { + name: "empty vs one empty element", + value: map[string]interface{}{}, + testValue: map[string]interface{}{"": nil}, + wantEqual: failure, + }, + { + name: "one empty element vs empty", + value: map[string]interface{}{"": nil}, + testValue: map[string]interface{}{}, + wantEqual: failure, + }, + { + name: "non-empty vs empty", + value: map[string]interface{}{"foo": 123.0}, + testValue: map[string]interface{}{}, + wantEqual: failure, + }, + { + name: "different key", + value: map[string]interface{}{"foo": 123.0}, + testValue: map[string]interface{}{"FOO": 123.0}, + wantEqual: failure, + }, + { + name: "different value", + value: map[string]interface{}{"foo": 123.0}, + testValue: map[string]interface{}{"foo": 456.0}, + wantEqual: failure, + }, + { + name: "equal", + value: map[string]interface{}{"foo": 123.0}, + testValue: map[string]interface{}{"foo": 123.0}, + wantEqual: success, + }, + } - value.NotEqual(map[string]interface{}{"foo": 123.0}) - value.chain.assert(t, failure) - value.chain.clear() + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + reporter := newMockReporter(t) - value.IsEqual(nil) - value.chain.assert(t, failure) - value.chain.clear() + NewObject(reporter, tc.value).IsEqual(tc.testValue). + chain.assert(t, tc.wantEqual) - value.NotEqual(nil) - value.chain.assert(t, failure) - value.chain.clear() + NewObject(reporter, tc.value).NotEqual(tc.testValue). + chain.assert(t, !tc.wantEqual) + }) + } }) t.Run("struct", func(t *testing.T) { reporter := newMockReporter(t) - value := NewObject(reporter, map[string]interface{}{ - "foo": 123, - "bar": map[string]interface{}{ - "baz": []interface{}{true, false}, - }, - }) - type ( Bar struct { Baz []bool `json:"baz"` @@ -476,6 +453,13 @@ func TestObject_IsEqual(t *testing.T) { } ) + value := map[string]interface{}{ + "foo": 123, + "bar": map[string]interface{}{ + "baz": []interface{}{true, false}, + }, + } + s := S{ Foo: 123, Bar: Bar{ @@ -483,176 +467,105 @@ func TestObject_IsEqual(t *testing.T) { }, } - value.IsEqual(s) - value.chain.assert(t, success) - value.chain.clear() + NewObject(reporter, value).IsEqual(s). + chain.assert(t, success) - value.NotEqual(s) - value.chain.assert(t, failure) - value.chain.clear() + NewObject(reporter, value).NotEqual(s). + chain.assert(t, failure) - value.IsEqual(S{}) - value.chain.assert(t, failure) - value.chain.clear() + NewObject(reporter, value).IsEqual(S{}). + chain.assert(t, failure) - value.NotEqual(S{}) - value.chain.assert(t, success) - value.chain.clear() + NewObject(reporter, value).NotEqual(S{}). + chain.assert(t, success) }) t.Run("canonization", func(t *testing.T) { + reporter := newMockReporter(t) + type ( myMap map[string]interface{} myInt int ) - reporter := newMockReporter(t) - - value := NewObject(reporter, map[string]interface{}{"foo": 123}) - - value.IsEqual(map[string]interface{}{"foo": 123.0}) - value.chain.assert(t, success) - value.chain.clear() - - value.NotEqual(map[string]interface{}{"foo": 123.0}) - value.chain.assert(t, failure) - value.chain.clear() + data := map[string]interface{}{"foo": 123} - value.IsEqual(myMap{"foo": myInt(123)}) - value.chain.assert(t, success) - value.chain.clear() + NewObject(reporter, data).IsEqual(myMap{"foo": myInt(123)}). + chain.assert(t, success) - value.NotEqual(myMap{"foo": myInt(123)}) - value.chain.assert(t, failure) - value.chain.clear() + NewObject(reporter, data).NotEqual(myMap{"foo": myInt(123)}). + chain.assert(t, failure) }) } func TestObject_InList(t *testing.T) { t.Run("basic", func(t *testing.T) { - reporter := newMockReporter(t) - - value := NewObject(reporter, map[string]interface{}{"foo": 123.0}) - - value.InList( - map[string]interface{}{"FOO": 123.0}, - map[string]interface{}{"BAR": 456.0}, - ) - value.chain.assert(t, failure) - value.chain.clear() - - value.NotInList( - map[string]interface{}{"FOO": 123.0}, - map[string]interface{}{"BAR": 456.0}, - ) - value.chain.assert(t, success) - value.chain.clear() - - value.InList( - map[string]interface{}{"foo": 456.0}, - map[string]interface{}{"bar": 123.0}, - ) - value.chain.assert(t, failure) - value.chain.clear() - - value.NotInList( - map[string]interface{}{"foo": 456.0}, - map[string]interface{}{"bar": 123.0}, - ) - value.chain.assert(t, success) - value.chain.clear() - - value.InList( - map[string]interface{}{"foo": 123.0}, - map[string]interface{}{"bar": 456.0}, - ) - value.chain.assert(t, success) - value.chain.clear() - - value.NotInList( - map[string]interface{}{"foo": 123.0}, - map[string]interface{}{"bar": 456.0}, - ) - value.chain.assert(t, failure) - value.chain.clear() - - value.InList(struct { - Foo float64 `json:"foo"` - }{Foo: 123.00}) - value.chain.assert(t, success) - value.chain.clear() - - value.NotInList(struct { - Foo float64 `json:"foo"` - }{Foo: 123.00}) - value.chain.assert(t, failure) - value.chain.clear() - }) - - t.Run("empty", func(t *testing.T) { - reporter := newMockReporter(t) - - value := NewObject(reporter, map[string]interface{}{}) - - value.InList(map[string]interface{}{}) - value.chain.assert(t, success) - value.chain.clear() - - value.NotInList(map[string]interface{}{}) - value.chain.assert(t, failure) - value.chain.clear() - }) - - t.Run("not object", func(t *testing.T) { - reporter := newMockReporter(t) - - value := NewObject(reporter, map[string]interface{}{"foo": 123.0}) - - value.InList(map[string]interface{}{"bar": 123.0}, "NOT OBJECT") - value.chain.assert(t, failure) - value.chain.clear() - - value.NotInList(map[string]interface{}{"bar": 123.0}, "NOT OBJECT") - value.chain.assert(t, failure) - value.chain.clear() - - value.InList(map[string]interface{}{"foo": 123.0}, "NOT OBJECT") - value.chain.assert(t, failure) - value.chain.clear() - - value.NotInList(map[string]interface{}{"foo": 123.0}, "NOT OBJECT") - value.chain.assert(t, failure) - value.chain.clear() - }) - - t.Run("invalid argument", func(t *testing.T) { - reporter := newMockReporter(t) - - value := NewObject(reporter, map[string]interface{}{}) - - value.InList() - value.chain.assert(t, failure) - value.chain.clear() - - value.NotInList() - value.chain.assert(t, failure) - value.chain.clear() - - value.InList(nil) - value.chain.assert(t, failure) - value.chain.clear() + cases := []struct { + name string + value map[string]interface{} + testList []interface{} + wantEqual chainResult + }{ + { + name: "empty vs empty", + value: map[string]interface{}{}, + testList: []interface{}{ + map[string]interface{}{}, + }, + wantEqual: success, + }, + { + name: "different key", + value: map[string]interface{}{"foo": 123.0}, + testList: []interface{}{ + map[string]interface{}{"FOO": 123.0}, + map[string]interface{}{"BAR": 456.0}, + }, + wantEqual: failure, + }, + { + name: "different key or value", + value: map[string]interface{}{"foo": 123.0}, + testList: []interface{}{ + map[string]interface{}{"foo": 456.0}, + map[string]interface{}{"bar": 123.0}, + }, + wantEqual: failure, + }, + { + name: "success", + value: map[string]interface{}{"foo": 123.0}, + testList: []interface{}{ + map[string]interface{}{"foo": 123.0}, + map[string]interface{}{"bar": 456.0}, + }, + wantEqual: success, + }, + { + name: "struct", + value: map[string]interface{}{"foo": 123.0}, + testList: []interface{}{ + struct { + Foo float64 `json:"foo"` + }{ + Foo: 123.00, + }, + }, + wantEqual: success, + }, + } - value.NotInList(nil) - value.chain.assert(t, failure) - value.chain.clear() + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + reporter := newMockReporter(t) - value.InList(func() {}) - value.chain.assert(t, failure) - value.chain.clear() + NewObject(reporter, tc.value).InList(tc.testList...). + chain.assert(t, tc.wantEqual) - value.NotInList(func() {}) - value.chain.assert(t, failure) - value.chain.clear() + NewObject(reporter, tc.value).NotInList(tc.testList...). + chain.assert(t, !tc.wantEqual) + }) + } }) t.Run("canonization", func(t *testing.T) { @@ -660,26 +573,67 @@ func TestObject_InList(t *testing.T) { myMap map[string]interface{} myInt int ) - reporter := newMockReporter(t) - value := NewObject(reporter, map[string]interface{}{"foo": 123, "bar": 456}) + data := map[string]interface{}{"foo": 123, "bar": 456} - value.InList(myMap{"foo": 123.0, "bar": 456.0}) - value.chain.assert(t, success) - value.chain.clear() + NewObject(reporter, data).InList(myMap{"foo": 123.0, "bar": 456.0}). + chain.assert(t, success) - value.NotInList(myMap{"foo": 123.0, "bar": 456.0}) - value.chain.assert(t, failure) - value.chain.clear() + NewObject(reporter, data).NotInList(myMap{"foo": 123.0, "bar": 456.0}). + chain.assert(t, failure) + }) - value.InList(myMap{"foo": "123", "bar": myInt(456.0)}) - value.chain.assert(t, failure) - value.chain.clear() + t.Run("invalid argument", func(t *testing.T) { + cases := []struct { + name string + value map[string]interface{} + testList []interface{} + }{ + { + name: "empty list", + value: map[string]interface{}{}, + testList: []interface{}{}, + }, + { + name: "nil list", + value: map[string]interface{}{}, + testList: nil, + }, + { + name: "invalid type", + value: map[string]interface{}{}, + testList: []interface{}{func() {}}, + }, + { + name: "one inequal object, another not object", + value: map[string]interface{}{"foo": 123.0}, + testList: []interface{}{ + map[string]interface{}{"bar": 123.0}, + "NOT OBJECT", + }, + }, + { + name: "one equal object, another not object", + value: map[string]interface{}{"foo": 123.0}, + testList: []interface{}{ + map[string]interface{}{"foo": 123.0}, + "NOT OBJECT", + }, + }, + } - value.NotInList(myMap{"foo": "123", "bar": myInt(456.0)}) - value.chain.assert(t, success) - value.chain.clear() + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + reporter := newMockReporter(t) + + NewObject(reporter, tc.value).InList(tc.testList...). + chain.assert(t, failure) + + NewObject(reporter, tc.value).NotInList(tc.testList...). + chain.assert(t, failure) + }) + } }) } From dd5377fea303a3b7417977f520908d1269715053 Mon Sep 17 00:00:00 2001 From: Kirill Date: Sun, 23 Apr 2023 00:44:41 +0300 Subject: [PATCH 11/57] refactor TestRequest_Conflicts (#403) --- request_test.go | 155 ++++++++++++++++++++++-------------------------- 1 file changed, 71 insertions(+), 84 deletions(-) diff --git a/request_test.go b/request_test.go index a9efbeec1..724a8a3e6 100644 --- a/request_test.go +++ b/request_test.go @@ -3252,99 +3252,86 @@ func TestRequest_Conflicts(t *testing.T) { } t.Run("body conflict", func(t *testing.T) { - var req *Request - - req = NewRequestC(config, "GET", "url") - req.WithChunked(nil) - req.chain.assert(t, success) - req.WithChunked(nil) - req.chain.assert(t, failure) - - req = NewRequestC(config, "GET", "url") - req.WithChunked(nil) - req.chain.assert(t, success) - req.WithBytes(nil) - req.chain.assert(t, failure) - - req = NewRequestC(config, "GET", "url") - req.WithChunked(nil) - req.chain.assert(t, success) - req.WithText("") - req.chain.assert(t, failure) - - req = NewRequestC(config, "GET", "url") - req.WithChunked(nil) - req.chain.assert(t, success) - req.WithJSON(map[string]interface{}{"a": "b"}) - req.chain.assert(t, failure) - - req = NewRequestC(config, "GET", "url") - req.WithChunked(nil) - req.chain.assert(t, success) - req.WithForm(map[string]interface{}{"a": "b"}) - req.Expect() - req.chain.assert(t, failure) - - req = NewRequestC(config, "GET", "url") - req.WithChunked(nil) - req.chain.assert(t, success) - req.WithFormField("a", "b") - req.Expect() - req.chain.assert(t, failure) + cases := []func(req *Request){ + func(req *Request) { + req.WithChunked(nil) + }, + func(req *Request) { + req.WithBytes(nil) + }, + func(req *Request) { + req.WithText("") + }, + func(req *Request) { + req.WithJSON(map[string]interface{}{"a": "b"}) + }, + func(req *Request) { + req.WithForm(map[string]interface{}{"a": "b"}) + req.Expect() + }, + func(req *Request) { + req.WithFormField("a", "b") + req.Expect() + }, + func(req *Request) { + req.WithMultipart() + }, + } - req = NewRequestC(config, "GET", "url") - req.WithChunked(nil) - req.chain.assert(t, success) - req.WithMultipart() - req.chain.assert(t, failure) + for _, conflictFunc := range cases { + req := NewRequestC(config, "GET", "url") + req.WithChunked(nil) + req.chain.assert(t, success) + conflictFunc(req) + req.chain.assert(t, failure) + } }) t.Run("type conflict", func(t *testing.T) { - var req *Request - - req = NewRequestC(config, "GET", "url") - req.WithText("") - req.chain.assert(t, success) - req.WithJSON(map[string]interface{}{"a": "b"}) - req.chain.assert(t, failure) - - req = NewRequestC(config, "GET", "url") - req.WithText("") - req.chain.assert(t, success) - req.WithForm(map[string]interface{}{"a": "b"}) - req.chain.assert(t, failure) - - req = NewRequestC(config, "GET", "url") - req.WithText("") - req.chain.assert(t, success) - req.WithFormField("a", "b") - req.chain.assert(t, failure) + cases := []func(req *Request){ + func(req *Request) { + req.WithJSON(map[string]interface{}{"a": "b"}) + }, + func(req *Request) { + req.WithJSON(map[string]interface{}{"a": "b"}) + }, + func(req *Request) { + req.WithForm(map[string]interface{}{"a": "b"}) + }, + func(req *Request) { + req.WithFormField("a", "b") + }, + func(req *Request) { + req.WithMultipart() + }, + } - req = NewRequestC(config, "GET", "url") - req.WithText("") - req.chain.assert(t, success) - req.WithMultipart() - req.chain.assert(t, failure) + for _, conflictFunc := range cases { + req := NewRequestC(config, "GET", "url") + req.WithText("") + req.chain.assert(t, success) + conflictFunc(req) + req.chain.assert(t, failure) + } }) t.Run("multipart conflict", func(t *testing.T) { - var req *Request - - req = NewRequestC(config, "GET", "url") - req.WithForm(map[string]interface{}{"a": "b"}) - req.chain.assert(t, success) - req.WithMultipart() - req.chain.assert(t, failure) - - req = NewRequestC(config, "GET", "url") - req.WithFormField("a", "b") - req.chain.assert(t, success) - req.WithMultipart() - req.chain.assert(t, failure) + cases := []func(req *Request){ + func(req *Request) { + req.WithForm(map[string]interface{}{"a": "b"}) + }, + func(req *Request) { + req.WithFormField("a", "b") + }, + } - req = NewRequestC(config, "GET", "url") - req.WithFileBytes("a", "a", []byte("a")) - req.chain.assert(t, failure) + for _, conflictFunc := range cases { + req := NewRequestC(config, "GET", "url") + conflictFunc(req) + req.chain.assert(t, success) + req.WithMultipart() + req.chain.assert(t, failure) + } }) } From faca06c55394899e82e6ca9037821581f36377e8 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sun, 23 Apr 2023 01:44:25 +0400 Subject: [PATCH 12/57] Minor fixes in request tests --- request_test.go | 213 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 148 insertions(+), 65 deletions(-) diff --git a/request_test.go b/request_test.go index 724a8a3e6..e01fde151 100644 --- a/request_test.go +++ b/request_test.go @@ -1775,6 +1775,36 @@ func TestRequest_BodyMultipart(t *testing.T) { }) } }) + + t.Run("missing WithMultipart", func(t *testing.T) { + cases := []struct { + name string + reqFn func(*Request) + }{ + { + name: "WithFile", + reqFn: func(req *Request) { + req.WithFile("test_key", "test_file", strings.NewReader("test_data")) + }, + }, + { + name: "WithFileBytes", + reqFn: func(req *Request) { + req.WithFileBytes("test_key", "test_file", []byte("test_data")) + }, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + req := NewRequestC(config, "POST", "url") + + tc.reqFn(req) + req.chain.assert(t, failure) + }) + } + + }) } func TestRequest_BodyJSON(t *testing.T) { @@ -3252,85 +3282,138 @@ func TestRequest_Conflicts(t *testing.T) { } t.Run("body conflict", func(t *testing.T) { - cases := []func(req *Request){ - func(req *Request) { - req.WithChunked(nil) - }, - func(req *Request) { - req.WithBytes(nil) - }, - func(req *Request) { - req.WithText("") - }, - func(req *Request) { - req.WithJSON(map[string]interface{}{"a": "b"}) - }, - func(req *Request) { - req.WithForm(map[string]interface{}{"a": "b"}) - req.Expect() - }, - func(req *Request) { - req.WithFormField("a", "b") - req.Expect() - }, - func(req *Request) { - req.WithMultipart() - }, + cases := []struct { + name string + fn func(req *Request) + }{ + {"WithChunked", + func(req *Request) { + req.WithChunked(strings.NewReader("test")) + }}, + {"WithBytes", + func(req *Request) { + req.WithBytes([]byte("test")) + }}, + {"WithText", + func(req *Request) { + req.WithText("test") + }}, + {"WithJSON", + func(req *Request) { + req.WithJSON(map[string]interface{}{"a": "b"}) + }}, + {"WithForm", + func(req *Request) { + req.WithForm(map[string]interface{}{"a": "b"}) + }}, + {"WithFormField", + func(req *Request) { + req.WithFormField("a", "b") + }}, + {"WithMultipart", + func(req *Request) { + req.WithMultipart() + }}, } - for _, conflictFunc := range cases { - req := NewRequestC(config, "GET", "url") - req.WithChunked(nil) - req.chain.assert(t, success) - conflictFunc(req) - req.chain.assert(t, failure) + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + req := NewRequestC(config, "GET", "url") + + req.WithChunked(strings.NewReader("test")) + req.chain.assert(t, success) + + tc.fn(req) + resp := req.Expect() + req.chain.assert(t, failure) + resp.chain.assert(t, failure) + }) + + t.Run(tc.name+" - reversed", func(t *testing.T) { + req := NewRequestC(config, "GET", "url") + + tc.fn(req) + req.chain.assert(t, success) + + req.WithChunked(strings.NewReader("test")) + resp := req.Expect() + req.chain.assert(t, failure) + resp.chain.assert(t, failure) + }) } }) t.Run("type conflict", func(t *testing.T) { - cases := []func(req *Request){ - func(req *Request) { - req.WithJSON(map[string]interface{}{"a": "b"}) - }, - func(req *Request) { - req.WithJSON(map[string]interface{}{"a": "b"}) - }, - func(req *Request) { - req.WithForm(map[string]interface{}{"a": "b"}) - }, - func(req *Request) { - req.WithFormField("a", "b") - }, - func(req *Request) { - req.WithMultipart() - }, + cases := []struct { + name string + fn func(req *Request) + }{ + {"WithJSON", + func(req *Request) { + req.WithJSON(map[string]interface{}{"a": "b"}) + }}, + {"WithForm", + func(req *Request) { + req.WithForm(map[string]interface{}{"a": "b"}) + }}, + {"WithFormField", + func(req *Request) { + req.WithFormField("a", "b") + }}, + {"WithMultipart", + func(req *Request) { + req.WithMultipart() + }}, } - for _, conflictFunc := range cases { - req := NewRequestC(config, "GET", "url") - req.WithText("") - req.chain.assert(t, success) - conflictFunc(req) - req.chain.assert(t, failure) + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + req := NewRequestC(config, "GET", "url") + + req.WithText("test") + req.chain.assert(t, success) + + tc.fn(req) + req.chain.assert(t, failure) + }) + + t.Run(tc.name+" - reversed", func(t *testing.T) { + req := NewRequestC(config, "GET", "url") + + tc.fn(req) + req.chain.assert(t, success) + + req.WithText("test") + req.chain.assert(t, failure) + }) } }) t.Run("multipart conflict", func(t *testing.T) { - cases := []func(req *Request){ - func(req *Request) { - req.WithForm(map[string]interface{}{"a": "b"}) - }, - func(req *Request) { - req.WithFormField("a", "b") - }, + cases := []struct { + name string + fn func(req *Request) + }{ + {"WithForm", + func(req *Request) { + req.WithForm(map[string]interface{}{"a": "b"}) + }}, + {"WithFormField", + func(req *Request) { + req.WithFormField("a", "b") + }}, } - for _, conflictFunc := range cases { - req := NewRequestC(config, "GET", "url") - conflictFunc(req) - req.chain.assert(t, success) - req.WithMultipart() - req.chain.assert(t, failure) + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + req := NewRequestC(config, "GET", "url") + + tc.fn(req) + req.chain.assert(t, success) + + req.WithMultipart() + req.chain.assert(t, failure) + }) } }) } From ebb8d4d3adcc8f7fc825da409a21fbf3a34c5431 Mon Sep 17 00:00:00 2001 From: Kirill Date: Tue, 25 Apr 2023 17:42:12 +0300 Subject: [PATCH 13/57] add WithReporter and WithAssertionHandler (#376) Co-authored-by: Victor Gaydov --- chain.go | 14 +++++++ request.go | 88 ++++++++++++++++++++++++++++++++++++++++ request_test.go | 105 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 207 insertions(+) diff --git a/chain.go b/chain.go index 68e6f3282..cee3fcf2d 100644 --- a/chain.go +++ b/chain.go @@ -272,6 +272,20 @@ func (c *chain) setResponse(resp *Response) { c.context.Response = resp } +// Set assertion handler +// Chain always overrides assertion handler with given one. +func (c *chain) setHandler(handler AssertionHandler) { + c.mu.Lock() + defer c.mu.Unlock() + + if chainValidation && c.state == stateLeaved { + panic("can't use chain after leave") + } + + c.handler = handler + c.context.TestingTB = isTestingTB(handler) +} + // Create chain clone. // Typically is called between enter() and leave(). func (c *chain) clone() *chain { diff --git a/request.go b/request.go index cbe73a224..280bfb031 100644 --- a/request.go +++ b/request.go @@ -242,6 +242,94 @@ func (r *Request) WithName(name string) *Request { return r } +// WithReporter sets reporter to be used for this request. +// +// The new reporter overwrites AssertionHandler. +// The new AssertionHandler is DefaultAssertionHandler with specified reporter, +// existing Config.Formatter and nil Logger. +// It will be used to report formatted fatal failure messages. +// +// Example: +// +// req := NewRequestC(config, "GET", "http://example.com/path") +// req.WithReporter(t) +func (r *Request) WithReporter(reporter Reporter) *Request { + opChain := r.chain.enter("WithReporter()") + defer opChain.leave() + + r.mu.Lock() + defer r.mu.Unlock() + + if opChain.failed() { + return r + } + + if !r.checkOrder(opChain, "WithReporter()") { + return r + } + + if reporter == nil { + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{ + errors.New("unexpected nil argument"), + }, + }) + return r + } + + handler := &DefaultAssertionHandler{ + Reporter: reporter, + Formatter: r.config.Formatter, + } + r.chain.setHandler(handler) + + return r +} + +// WithAssertionHandler sets assertion handler to be used for this request. +// +// The new handler overwrites assertion handler that will be used +// by Request and its children (Response, Body, etc.). +// It will be used to format and report test Failure or Success. +// +// Example: +// +// req := NewRequestC(config, "GET", "http://example.com/path") +// req.WithAssertionHandler(&DefaultAssertionHandler{ +// Reporter: reporter, +// Formatter: formatter, +// }) +func (r *Request) WithAssertionHandler(handler AssertionHandler) *Request { + opChain := r.chain.enter("WithAssertionHandler()") + defer opChain.leave() + + r.mu.Lock() + defer r.mu.Unlock() + + if opChain.failed() { + return r + } + + if !r.checkOrder(opChain, "WithAssertionHandler()") { + return r + } + + if handler == nil { + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{ + errors.New("unexpected nil argument"), + }, + }) + return r + } + + r.chain.setHandler(handler) + + return r +} + // WithMatcher attaches a matcher to the request. // All attached matchers are invoked in the Expect method for a newly // created Response. diff --git a/request_test.go b/request_test.go index e01fde151..8419ce020 100644 --- a/request_test.go +++ b/request_test.go @@ -24,6 +24,7 @@ import ( func TestRequest_FailedChain(t *testing.T) { reporter := newMockReporter(t) + assertionHandler := &mockAssertionHandler{} config := newMockConfig(reporter) chain := newChainWithDefaults("test", reporter, flagFailed) @@ -32,6 +33,8 @@ func TestRequest_FailedChain(t *testing.T) { req.Alias("foo") req.WithName("foo") + req.WithReporter(reporter) + req.WithAssertionHandler(assertionHandler) req.WithMatcher(func(resp *Response) { }) req.WithTransformer(func(r *http.Request) { @@ -267,6 +270,80 @@ func TestRequest_Basic(t *testing.T) { }) } +func TestRequest_Reporter(t *testing.T) { + t.Run("default reporter", func(t *testing.T) { + configReporter := newMockReporter(t) + config := Config{ + Client: &mockClient{}, + Reporter: configReporter, + } + + req := NewRequestC(config, "GET", "/") + + req.WithClient(nil) + req.chain.assert(t, failure) + + assert.True(t, configReporter.reported) + }) + + t.Run("custom reporter", func(t *testing.T) { + configReporter := newMockReporter(t) + config := Config{ + Client: &mockClient{}, + Reporter: configReporter, + } + + req := NewRequestC(config, "GET", "/") + + // set custom reporter + reqReporter := newMockReporter(t) + req.WithReporter(reqReporter) + + req.WithClient(nil) + req.chain.assert(t, failure) + + assert.False(t, configReporter.reported) + assert.True(t, reqReporter.reported) + }) +} + +func TestRequest_AssertionHandler(t *testing.T) { + t.Run("default handler", func(t *testing.T) { + configHandler := &mockAssertionHandler{} + config := Config{ + Client: &mockClient{}, + AssertionHandler: configHandler, + } + + req := NewRequestC(config, "GET", "/") + + req.WithClient(nil) + req.chain.assert(t, failure) + + assert.Equal(t, 1, configHandler.failureCalled) + }) + + t.Run("custom handler", func(t *testing.T) { + configHandler := &mockAssertionHandler{} + config := Config{ + Client: &mockClient{}, + AssertionHandler: configHandler, + } + + req := NewRequestC(config, "GET", "/") + + // set custom assertion handler + reqHandler := &mockAssertionHandler{} + req.WithAssertionHandler(reqHandler) + + req.WithClient(nil) + req.chain.assert(t, failure) + + assert.Equal(t, 0, configHandler.failureCalled) + assert.Equal(t, 1, reqHandler.failureCalled) + }) +} + func TestRequest_Matchers(t *testing.T) { client := &mockClient{} @@ -3426,6 +3503,22 @@ func TestRequest_Usage(t *testing.T) { prepFails bool expectFails bool }{ + { + name: "WithReporter - nil argument", + prepFunc: func(req *Request) { + req.WithReporter(nil) + }, + prepFails: true, + expectFails: true, + }, + { + name: "WithAssertionHandler - nil argument", + prepFunc: func(req *Request) { + req.WithAssertionHandler(nil) + }, + prepFails: true, + expectFails: true, + }, { name: "WithMatcher - nil argument", prepFunc: func(req *Request) { @@ -3600,6 +3693,18 @@ func TestRequest_Order(t *testing.T) { req.WithName("Test") }, }, + { + name: "WithReporter after Expect", + afterFunc: func(req *Request) { + req.WithReporter(newMockReporter(t)) + }, + }, + { + name: "WithAssertionHandler after Expect", + afterFunc: func(req *Request) { + req.WithAssertionHandler(&mockAssertionHandler{}) + }, + }, { name: "WithMatcher after Expect", afterFunc: func(req *Request) { From 2d6c5d70d7302a45556e1bdf8a7a44c7391b8aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20St=C3=B8len?= Date: Wed, 26 Apr 2023 19:01:09 +0200 Subject: [PATCH 14/57] Prevent panic if flag.Parse hasn't been called (#411) --- formatter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/formatter.go b/formatter.go index 9361a6dd6..f0f372966 100644 --- a/formatter.go +++ b/formatter.go @@ -3,6 +3,7 @@ package httpexpect import ( "bytes" "encoding/json" + "flag" "fmt" "math" "net/http/httputil" @@ -319,7 +320,7 @@ func (f *DefaultFormatter) fillGeneral( case colorsForced: data.EnableColors = true case colorsSupported: - data.EnableColors = ctx.TestingTB && testing.Verbose() + data.EnableColors = ctx.TestingTB && flag.Parsed() && testing.Verbose() } case ColorModeAlways: data.EnableColors = true From 537a1273dc03f8269d9f55cbddc878432e2c80a7 Mon Sep 17 00:00:00 2001 From: g41797 Date: Wed, 3 May 2023 11:10:25 +0300 Subject: [PATCH 15/57] Documentation - fixed broken link (#417) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a6243624..6a9971e0d 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ Workflow: * Failures are reported using [`testify`](https://github.com/stretchr/testify/) (`assert` or `require` package) or standard `testing` package. * JSON values are pretty-printed using `encoding/json`, Go values are pretty-printed using [`litter`](https://github.com/sanity-io/litter). * Dumping requests and responses in various formats, using [`httputil`](https://golang.org/pkg/net/http/httputil/), [`http2curl`](https://github.com/moul/http2curl), or simple compact logger. -* Color support using [`fatih/color`](github.com/fatih/color). +* Color support using [`fatih/color`](https://github.com/fatih/color). ##### Tuning From 7c797ad0f785480d6179c7406f083f144b1e3eb6 Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 2 Jun 2023 20:42:31 +0300 Subject: [PATCH 16/57] add stacktrace to chain and formatted data (#396) --- assertion.go | 3 +++ chain.go | 42 ++++++++++++++++++++++++++++++++++++++++++ chain_test.go | 18 ++++++++++++++++++ formatter.go | 41 +++++++++++++++++++++++++++++++++++++++++ formatter_test.go | 45 +++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 149 insertions(+) diff --git a/assertion.go b/assertion.go index a66a007bf..4ce0b3fcd 100644 --- a/assertion.go +++ b/assertion.go @@ -192,6 +192,9 @@ type AssertionFailure struct { // Allowed delta between actual and expected Delta *AssertionValue + + // Stacktrace of a fail + Stacktrace []CallerInfo } // AssertionValue holds expected or actual value diff --git a/chain.go b/chain.go index cee3fcf2d..d80071346 100644 --- a/chain.go +++ b/chain.go @@ -2,6 +2,7 @@ package httpexpect import ( "fmt" + "runtime" "sync" "testing" @@ -449,6 +450,9 @@ func (c *chain) fail(failure AssertionFailure) { if c.severity == SeverityError { failure.IsFatal = true } + + failure.Stacktrace = GetCallerInfo() + c.failure = &failure } @@ -516,3 +520,41 @@ func isTestingTB(in AssertionHandler) bool { } return false } + +type CallerInfo struct { + FuncName string + File string + Line int +} + +func GetCallerInfo() []CallerInfo { + callers := []CallerInfo{} + for i := 0; ; i++ { + pc, file, line, ok := runtime.Caller(i) + if !ok { + break + } + + if file == "" { + break + } + + f := runtime.FuncForPC(pc) + if f == nil { + break + } + funcName := f.Name() + + if funcName == "testing.tRunner" { + break + } + + callers = append(callers, CallerInfo{ + FuncName: funcName, + File: file, + Line: line, + }) + } + + return callers +} diff --git a/chain_test.go b/chain_test.go index a9919357d..e60a1eb53 100644 --- a/chain_test.go +++ b/chain_test.go @@ -717,6 +717,22 @@ func TestChain_Severity(t *testing.T) { }) } +func TestChain_Stacktrace(t *testing.T) { + handler := &mockAssertionHandler{} + + chain := newChainWithConfig("test", Config{ + AssertionHandler: handler, + }.withDefaults()) + + opChain := chain.enter("test") + opChain.fail(testFailure()) + opChain.leave() + + assert.True(t, opChain.failed()) + assert.NotNil(t, handler.failure) + assert.NotEmpty(t, handler.failure.Stacktrace) +} + func TestChain_Reporting(t *testing.T) { handler := &mockAssertionHandler{} @@ -751,6 +767,8 @@ func TestChain_Reporting(t *testing.T) { assert.True(t, chain.failed()) // reported to parent assert.NotNil(t, handler.ctx) // reported to handler assert.NotNil(t, handler.failure) + + failure.Stacktrace = handler.failure.Stacktrace assert.Equal(t, failure, *handler.failure) } diff --git a/formatter.go b/formatter.go index f0f372966..3bd99209b 100644 --- a/formatter.go +++ b/formatter.go @@ -59,6 +59,9 @@ type DefaultFormatter struct { // Exclude HTTP response from failure report. DisableResponses bool + // Enables printing of stacktrace on failure + StacktraceMode StacktraceMode + // Thousand separator. // Default is DigitSeparatorUnderscore. DigitSeparator DigitSeparator @@ -113,6 +116,16 @@ func (f *DefaultFormatter) FormatFailure( } } +type StacktraceMode int + +const ( + // Unconditionally disable stacktrace. + StacktraceModeDisabled StacktraceMode = iota + + // Format caller info as `at [function name]([file]:[line])` + StacktraceModeDefault +) + // DigitSeparator defines the separator used to format integers and floats. type DigitSeparator int @@ -210,6 +223,9 @@ type FormatData struct { HaveResponse bool Response string + HaveStacktrace bool + Stacktrace []string + EnableColors bool LineWidth int } @@ -285,6 +301,7 @@ func (f *DefaultFormatter) buildFormatData( f.fillRequest(&data, ctx, failure) f.fillResponse(&data, ctx, failure) + f.fillStacktrace(&data, ctx, failure) } return &data @@ -547,6 +564,23 @@ func (f *DefaultFormatter) fillResponse( } } +func (f *DefaultFormatter) fillStacktrace( + data *FormatData, ctx *AssertionContext, failure *AssertionFailure, +) { + data.Stacktrace = []string{} + + if f.StacktraceMode == StacktraceModeDisabled { + return + } + if f.StacktraceMode == StacktraceModeDefault { + for _, call := range failure.Stacktrace { + formatted := fmt.Sprintf("at %s(%s:%d)", call.FuncName, call.File, call.Line) + data.Stacktrace = append(data.Stacktrace, formatted) + } + data.HaveStacktrace = len(failure.Stacktrace) != 0 + } +} + func (f *DefaultFormatter) formatValue(value interface{}) string { if flt := extractFloat32(value); flt != nil { return f.reformatNumber(f.formatFloatValue(*flt, 32)) @@ -1017,6 +1051,13 @@ request: {{ .Request | indent | trim | color $.EnableColors "HiMagenta" }} response: {{ .Response | indent | trim | color $.EnableColors "HiMagenta" }} {{- end -}} +{{- if .HaveStacktrace }} + +trace: +{{- range $n, $call := .Stacktrace }} +{{ $call | indent }} +{{- end -}} +{{- end -}} {{- if .AssertPath }} assertion: diff --git a/formatter_test.go b/formatter_test.go index 02f36d148..04a14a769 100644 --- a/formatter_test.go +++ b/formatter_test.go @@ -1056,3 +1056,48 @@ func TestFormatter_ColorMode(t *testing.T) { }) } } + +func TestFormatter_Stacktrace(t *testing.T) { + df := &DefaultFormatter{ + StacktraceMode: StacktraceModeDefault, + } + ctx := &AssertionContext{} + + cases := []struct { + callerInfo CallerInfo + want string + }{ + { + CallerInfo{ + FuncName: "Foo()", + File: "formatter_test.go", + Line: 228, + }, + "at Foo()(formatter_test.go:228)", + }, + { + CallerInfo{ + FuncName: "Bar()", + File: "formatter.go", + Line: 123, + }, + "at Bar()(formatter.go:123)", + }, + { + CallerInfo{ + FuncName: "Buzz()", + File: "file.go", + Line: 5, + }, + "at Buzz()(file.go:5)", + }, + } + + for _, tc := range cases { + fl := &AssertionFailure{ + Stacktrace: []CallerInfo{tc.callerInfo}, + } + fd := df.buildFormatData(ctx, fl) + assert.Equal(t, []string{tc.want}, fd.Stacktrace) + } +} From ca5a5dd89926c807957b7238fdc444bf1d32ea61 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Fri, 2 Jun 2023 21:43:17 +0400 Subject: [PATCH 17/57] Stacktrace refinements --- assertion.go | 4 +-- chain.go | 41 +--------------------- chain_test.go | 5 ++- formatter.go | 75 +++++++++++++++++++++++++--------------- formatter_test.go | 88 +++++++++++++++++++++++------------------------ stacktrace.go | 66 +++++++++++++++++++++++++++++++++++ 6 files changed, 165 insertions(+), 114 deletions(-) create mode 100644 stacktrace.go diff --git a/assertion.go b/assertion.go index 4ce0b3fcd..d8dcb7707 100644 --- a/assertion.go +++ b/assertion.go @@ -193,8 +193,8 @@ type AssertionFailure struct { // Allowed delta between actual and expected Delta *AssertionValue - // Stacktrace of a fail - Stacktrace []CallerInfo + // Stacktrace of the failure + Stacktrace []StacktraceEntry } // AssertionValue holds expected or actual value diff --git a/chain.go b/chain.go index d80071346..94fc11ee2 100644 --- a/chain.go +++ b/chain.go @@ -2,7 +2,6 @@ package httpexpect import ( "fmt" - "runtime" "sync" "testing" @@ -451,7 +450,7 @@ func (c *chain) fail(failure AssertionFailure) { failure.IsFatal = true } - failure.Stacktrace = GetCallerInfo() + failure.Stacktrace = stacktrace() c.failure = &failure } @@ -520,41 +519,3 @@ func isTestingTB(in AssertionHandler) bool { } return false } - -type CallerInfo struct { - FuncName string - File string - Line int -} - -func GetCallerInfo() []CallerInfo { - callers := []CallerInfo{} - for i := 0; ; i++ { - pc, file, line, ok := runtime.Caller(i) - if !ok { - break - } - - if file == "" { - break - } - - f := runtime.FuncForPC(pc) - if f == nil { - break - } - funcName := f.Name() - - if funcName == "testing.tRunner" { - break - } - - callers = append(callers, CallerInfo{ - FuncName: funcName, - File: file, - Line: line, - }) - } - - return callers -} diff --git a/chain_test.go b/chain_test.go index e60a1eb53..b76765b33 100644 --- a/chain_test.go +++ b/chain_test.go @@ -730,7 +730,10 @@ func TestChain_Stacktrace(t *testing.T) { assert.True(t, opChain.failed()) assert.NotNil(t, handler.failure) - assert.NotEmpty(t, handler.failure.Stacktrace) + + assert.GreaterOrEqual(t, len(handler.failure.Stacktrace), 2) + assert.Contains(t, handler.failure.Stacktrace[0].FuncName, "(*chain).fail") + assert.Contains(t, handler.failure.Stacktrace[1].FuncName, "TestChain_Stacktrace") } func TestChain_Reporting(t *testing.T) { diff --git a/formatter.go b/formatter.go index 3bd99209b..6fe0dd281 100644 --- a/formatter.go +++ b/formatter.go @@ -8,6 +8,7 @@ import ( "math" "net/http/httputil" "os" + "path/filepath" "regexp" "strconv" "strings" @@ -59,9 +60,6 @@ type DefaultFormatter struct { // Exclude HTTP response from failure report. DisableResponses bool - // Enables printing of stacktrace on failure - StacktraceMode StacktraceMode - // Thousand separator. // Default is DigitSeparatorUnderscore. DigitSeparator DigitSeparator @@ -70,6 +68,10 @@ type DefaultFormatter struct { // Default is FloatFormatAuto. FloatFormat FloatFormat + // Defines whether to print stacktrace on failure and in what format. + // Default is StacktraceModeDisabled. + StacktraceMode StacktraceMode + // Colorization mode. // Default is ColorModeAuto. ColorMode ColorMode @@ -116,16 +118,6 @@ func (f *DefaultFormatter) FormatFailure( } } -type StacktraceMode int - -const ( - // Unconditionally disable stacktrace. - StacktraceModeDisabled StacktraceMode = iota - - // Format caller info as `at [function name]([file]:[line])` - StacktraceModeDefault -) - // DigitSeparator defines the separator used to format integers and floats. type DigitSeparator int @@ -164,6 +156,20 @@ const ( FloatFormatScientific ) +// StacktraceMode defines the format of stacktrace. +type StacktraceMode int + +const ( + // Don't print stacktrace. + StacktraceModeDisabled StacktraceMode = iota + + // Standard, verbose format. + StacktraceModeStandard + + // Compact format. + StacktraceModeCompact +) + // ColorMode defines how the text color is enabled. type ColorMode int @@ -323,12 +329,6 @@ func (f *DefaultFormatter) fillGeneral( } } - if f.LineWidth != 0 { - data.LineWidth = f.LineWidth - } else { - data.LineWidth = defaultLineWidth - } - switch f.ColorMode { case ColorModeAuto: switch colorMode() { @@ -344,6 +344,12 @@ func (f *DefaultFormatter) fillGeneral( case ColorModeNever: data.EnableColors = false } + + if f.LineWidth != 0 { + data.LineWidth = f.LineWidth + } else { + data.LineWidth = defaultLineWidth + } } func (f *DefaultFormatter) fillErrors( @@ -569,15 +575,30 @@ func (f *DefaultFormatter) fillStacktrace( ) { data.Stacktrace = []string{} - if f.StacktraceMode == StacktraceModeDisabled { - return - } - if f.StacktraceMode == StacktraceModeDefault { - for _, call := range failure.Stacktrace { - formatted := fmt.Sprintf("at %s(%s:%d)", call.FuncName, call.File, call.Line) - data.Stacktrace = append(data.Stacktrace, formatted) + switch f.StacktraceMode { + case StacktraceModeDisabled: + break + + case StacktraceModeStandard: + for _, entry := range failure.Stacktrace { + data.HaveStacktrace = true + data.Stacktrace = append(data.Stacktrace, + fmt.Sprintf("%s()\n\t%s:%d +0x%x", + entry.Func.Name(), entry.File, entry.Line, entry.FuncOffset)) + + } + + case StacktraceModeCompact: + for _, entry := range failure.Stacktrace { + if entry.IsEntrypoint { + break + } + data.HaveStacktrace = true + data.Stacktrace = append(data.Stacktrace, + fmt.Sprintf("%s() at %s:%d (%s)", + entry.FuncName, filepath.Base(entry.File), entry.Line, entry.FuncPackage)) + } - data.HaveStacktrace = len(failure.Stacktrace) != 0 } } diff --git a/formatter_test.go b/formatter_test.go index 04a14a769..9ce0eb8ee 100644 --- a/formatter_test.go +++ b/formatter_test.go @@ -1028,76 +1028,76 @@ func TestFormatter_FormatDiff(t *testing.T) { }) } -func TestFormatter_ColorMode(t *testing.T) { +func TestFormatter_StacktraceMode(t *testing.T) { cases := []struct { name string - mode ColorMode + mode StacktraceMode want bool }{ { - name: "always", - mode: ColorModeAlways, + name: "disabled", + mode: StacktraceModeDisabled, + want: false, + }, + { + name: "standard", + mode: StacktraceModeStandard, want: true, }, { - name: "never", - mode: ColorModeNever, - want: false, + name: "compact", + mode: StacktraceModeCompact, + want: true, }, } for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { - f := DefaultFormatter{ - ColorMode: tc.mode, + f := &DefaultFormatter{ + StacktraceMode: tc.mode, + } + fd := f.buildFormatData(&AssertionContext{}, &AssertionFailure{ + Stacktrace: stacktrace(), + }) + + if tc.want { + require.GreaterOrEqual(t, len(fd.Stacktrace), 1) + assert.Contains(t, fd.Stacktrace[0], "TestFormatter_StacktraceMode.func") + assert.Contains(t, fd.Stacktrace[0], "formatter_test.go") + assert.Contains(t, fd.Stacktrace[0], "github.com/gavv/httpexpect") + } else { + assert.NotNil(t, fd.Stacktrace) + assert.Equal(t, 0, len(fd.Stacktrace)) } - fd := f.buildFormatData(&AssertionContext{}, &AssertionFailure{}) - assert.Equal(t, tc.want, fd.EnableColors) }) } } -func TestFormatter_Stacktrace(t *testing.T) { - df := &DefaultFormatter{ - StacktraceMode: StacktraceModeDefault, - } - ctx := &AssertionContext{} - +func TestFormatter_ColorMode(t *testing.T) { cases := []struct { - callerInfo CallerInfo - want string + name string + mode ColorMode + want bool }{ { - CallerInfo{ - FuncName: "Foo()", - File: "formatter_test.go", - Line: 228, - }, - "at Foo()(formatter_test.go:228)", - }, - { - CallerInfo{ - FuncName: "Bar()", - File: "formatter.go", - Line: 123, - }, - "at Bar()(formatter.go:123)", + name: "always", + mode: ColorModeAlways, + want: true, }, { - CallerInfo{ - FuncName: "Buzz()", - File: "file.go", - Line: 5, - }, - "at Buzz()(file.go:5)", + name: "never", + mode: ColorModeNever, + want: false, }, } for _, tc := range cases { - fl := &AssertionFailure{ - Stacktrace: []CallerInfo{tc.callerInfo}, - } - fd := df.buildFormatData(ctx, fl) - assert.Equal(t, []string{tc.want}, fd.Stacktrace) + t.Run(tc.name, func(t *testing.T) { + f := DefaultFormatter{ + ColorMode: tc.mode, + } + fd := f.buildFormatData(&AssertionContext{}, &AssertionFailure{}) + assert.Equal(t, tc.want, fd.EnableColors) + }) } } diff --git a/stacktrace.go b/stacktrace.go new file mode 100644 index 000000000..3e6c1759f --- /dev/null +++ b/stacktrace.go @@ -0,0 +1,66 @@ +package httpexpect + +import ( + "regexp" + "runtime" +) + +// Stacktrace entry. +type StacktraceEntry struct { + Pc uintptr // Program counter + + File string // File path + Line int // Line number + + Func *runtime.Func // Function information + + FuncName string // Function name (without package and parenthesis) + FuncPackage string // Function package + FuncOffset uintptr // Program counter offset relative to function start + + // True if this is program entry point + // (like main.main or testing.tRunner) + IsEntrypoint bool +} + +var stacktraceFuncRe = regexp.MustCompile(`^(.+/[^.]+)\.(.+)$`) + +func stacktrace() []StacktraceEntry { + callers := []StacktraceEntry{} + for i := 1; ; i++ { + pc, file, line, ok := runtime.Caller(i) + if !ok { + break + } + + f := runtime.FuncForPC(pc) + if f == nil { + break + } + + entry := StacktraceEntry{ + Pc: pc, + File: file, + Line: line, + Func: f, + } + + if m := stacktraceFuncRe.FindStringSubmatch(f.Name()); m != nil { + entry.FuncName = m[2] + entry.FuncPackage = m[1] + } else { + entry.FuncName = f.Name() + } + + entry.FuncOffset = pc - f.Entry() + + switch f.Name() { + case "main.main", "testing.tRunner": + entry.IsEntrypoint = true + } + + callers = append(callers, entry) + } + + return callers +} From b23d97cfe960d511a78aae1c0e752783b85a8f61 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Fri, 2 Jun 2023 21:44:02 +0400 Subject: [PATCH 18/57] Bump example deps --- _examples/go.mod | 10 +++++----- _examples/go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/_examples/go.mod b/_examples/go.mod index b9e3bd3ba..1fa40000f 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -11,7 +11,7 @@ require ( github.com/gorilla/websocket v1.5.0 github.com/kataras/iris/v12 v12.2.0 github.com/labstack/echo/v4 v4.10.0 - github.com/valyala/fasthttp v1.46.0 + github.com/valyala/fasthttp v1.47.0 golang.org/x/oauth2 v0.4.0 google.golang.org/appengine v1.6.7 ) @@ -57,7 +57,7 @@ require ( github.com/mailgun/raymond/v2 v2.0.48 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.18 // indirect + github.com/mattn/go-isatty v0.0.19 // indirect github.com/microcosm-cc/bluemonday v1.0.23 // indirect github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect @@ -71,7 +71,7 @@ require ( github.com/sergi/go-diff v1.3.1 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/smartystreets/goconvey v1.7.2 // indirect - github.com/stretchr/testify v1.8.2 // indirect + github.com/stretchr/testify v1.8.4 // indirect github.com/tdewolff/minify/v2 v2.12.4 // indirect github.com/tdewolff/parse/v2 v2.6.4 // indirect github.com/tidwall/btree v0.0.0-20191029221954-400434d76274 // indirect @@ -95,8 +95,8 @@ require ( github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect golang.org/x/crypto v0.7.0 // indirect - golang.org/x/net v0.9.0 // indirect - golang.org/x/sys v0.7.0 // indirect + golang.org/x/net v0.10.0 // indirect + golang.org/x/sys v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/protobuf v1.29.1 // indirect diff --git a/_examples/go.sum b/_examples/go.sum index 1d37b9af4..26f8b9933 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -157,8 +157,8 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= -github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= +github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= @@ -225,8 +225,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502/go.mod h1:p9lPsd+cx33L3H9nNoecRRxPssFKUwwI50I3pZ0yT+8= github.com/tdewolff/minify/v2 v2.12.4 h1:kejsHQMM17n6/gwdw53qsi6lg0TGddZADVyQOz1KMdE= github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= @@ -260,8 +260,8 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.33.0/go.mod h1:KJRK/MXx0J+yd0c5hlR+s1tIHD72sniU8ZJjl97LIw4= github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0= -github.com/valyala/fasthttp v1.46.0 h1:6ZRhrFg8zBXTRYY6vdzbFhqsBd7FVv123pV2m9V87U4= -github.com/valyala/fasthttp v1.46.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= +github.com/valyala/fasthttp v1.47.0 h1:y7moDoxYzMooFpT5aHgNgVOQDrS3qlkfiP9mDtGGK9c= +github.com/valyala/fasthttp v1.47.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= @@ -314,8 +314,8 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= +golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= @@ -350,8 +350,8 @@ golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From 52f5847960477f82dd8196c39512e5c41e273a3a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Jun 2023 22:24:23 +0400 Subject: [PATCH 19/57] Bump github.com/gin-gonic/gin from 1.8.1 to 1.9.1 in /_examples (#423) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- _examples/go.mod | 27 +++-- _examples/go.sum | 270 +++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 252 insertions(+), 45 deletions(-) diff --git a/_examples/go.mod b/_examples/go.mod index 1fa40000f..a4f9a1066 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -6,7 +6,7 @@ require ( github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/fasthttp/websocket v1.5.0 github.com/gavv/httpexpect/v2 v2.15.0 - github.com/gin-gonic/gin v1.8.1 + github.com/gin-gonic/gin v1.9.1 github.com/go-oauth2/oauth2/v4 v4.5.1 github.com/gorilla/websocket v1.5.0 github.com/kataras/iris/v12 v12.2.0 @@ -25,17 +25,20 @@ require ( github.com/ajg/form v1.5.1 // indirect github.com/andybalholm/brotli v1.0.5 // indirect github.com/aymerick/douceur v0.2.0 // indirect + github.com/bytedance/sonic v1.9.1 // indirect + github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 // indirect github.com/fatih/color v1.15.0 // indirect github.com/fatih/structs v1.1.0 // indirect github.com/flosch/pongo2/v4 v4.0.2 // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gin-contrib/sse v0.1.0 // indirect - github.com/go-playground/locales v0.14.0 // indirect - github.com/go-playground/universal-translator v0.18.0 // indirect - github.com/go-playground/validator/v10 v10.11.1 // indirect + github.com/go-playground/locales v0.14.1 // indirect + github.com/go-playground/universal-translator v0.18.1 // indirect + github.com/go-playground/validator/v10 v10.14.0 // indirect github.com/gobwas/glob v0.2.3 // indirect - github.com/goccy/go-json v0.9.11 // indirect + github.com/goccy/go-json v0.10.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect @@ -52,8 +55,9 @@ require ( github.com/kataras/sitemap v0.0.6 // indirect github.com/kataras/tunnel v0.0.4 // indirect github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/labstack/gommon v0.4.0 // indirect - github.com/leodido/go-urn v1.2.1 // indirect + github.com/leodido/go-urn v1.2.4 // indirect github.com/mailgun/raymond/v2 v2.0.48 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect @@ -62,7 +66,7 @@ require ( github.com/mitchellh/go-wordwrap v1.0.1 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/pelletier/go-toml/v2 v2.0.6 // indirect + github.com/pelletier/go-toml/v2 v2.0.8 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sanity-io/litter v1.5.5 // indirect @@ -82,7 +86,8 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e // indirect github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 // indirect - github.com/ugorji/go/codec v1.2.7 // indirect + github.com/twitchyliquid64/golang-asm v0.15.1 // indirect + github.com/ugorji/go/codec v1.2.11 // indirect github.com/valyala/bytebufferpool v1.0.0 // indirect github.com/valyala/fasttemplate v1.2.2 // indirect github.com/vmihailenco/msgpack/v5 v5.3.5 // indirect @@ -94,14 +99,14 @@ require ( github.com/yosssi/ace v0.0.5 // indirect github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect - golang.org/x/crypto v0.7.0 // indirect + golang.org/x/arch v0.3.0 // indirect + golang.org/x/crypto v0.9.0 // indirect golang.org/x/net v0.10.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.3.0 // indirect - google.golang.org/protobuf v1.29.1 // indirect + google.golang.org/protobuf v1.30.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect moul.io/http2curl/v2 v2.3.0 // indirect ) diff --git a/_examples/go.sum b/_examples/go.sum index 26f8b9933..af1244136 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -1,4 +1,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= @@ -9,30 +11,54 @@ github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 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/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= +github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= +github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= +github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= +github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/fasthttp/websocket v1.4.3-rc.6/go.mod h1:43W9OM2T8FeXpCWMsBd9Cb7nE2CACNqNvCqQCoty/Lc= github.com/fasthttp/websocket v1.5.0 h1:B4zbe3xXyvIdnqjOZrafVFklCUq5ZLo/TqCt5JA1wLE= github.com/fasthttp/websocket v1.5.0/go.mod h1:n0BlOQvJdPbTuBkZT0O5+jk/sp/1/VCzquR1BehI2F4= +github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= @@ -43,29 +69,38 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU5kORdjhlA1yX8= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= github.com/gavv/httpexpect/v2 v2.15.0 h1:CCnFk9of4l4ijUhnMxyoEpJsIIBKcuWIFLMwwGTZxNs= github.com/gavv/httpexpect/v2 v2.15.0/go.mod h1:7myOP3A3VyS4+qnA4cm8DAad8zMN+7zxDB80W9f8yIc= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= -github.com/gin-gonic/gin v1.8.1 h1:4+fr/el88TOO3ewCmQr8cx/CtZ/umlIRIs5M4NTNjf8= -github.com/gin-gonic/gin v1.8.1/go.mod h1:ji8BvRH1azfM+SYow9zQ6SZMvR8qOMZHmsCuWR9tTTk= +github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= +github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-oauth2/oauth2/v4 v4.5.1 h1:3vxp+cjLqDe1TbogbwtMyeHRHr1tD+ksrK7xNppYRDs= github.com/go-oauth2/oauth2/v4 v4.5.1/go.mod h1:wk/2uLImWIa9VVQDgxz99H2GDbhmfi/9/Xr+GvkSUSQ= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU= -github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs= -github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho= -github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA= -github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJWXmqUsHwfTRRkQ= -github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= +github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= +github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= +github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= +github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= +github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= +github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= +github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-session/session v3.1.2+incompatible/go.mod h1:8B3iivBQjrz/JtC68Np2T1yBBLxTan3mn/3OM0CyRt0= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/goccy/go-json v0.9.11 h1:/pAaQDLHEoCq/5FFmSKBswWmK6H0e8g4159Kc/X/nqk= -github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= @@ -80,6 +115,7 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +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/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -87,25 +123,37 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= github.com/iris-contrib/httpexpect/v2 v2.12.1 h1:3cTZSyBBen/kfjCtgNFoUKi1u0FVXNaAjyRJOo6AVS4= +github.com/iris-contrib/httpexpect/v2 v2.12.1/go.mod h1:7+RB6W5oNClX7PTwJgJnsQP3ZuUUYB3u61KCqeSgZ88= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -121,48 +169,63 @@ github.com/kataras/golog v0.1.8 h1:isP8th4PJH2SrbkciKnylaND9xoTtfxv++NB+DF0l9g= github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= github.com/kataras/iris/v12 v12.2.0 h1:WzDY5nGuW/LgVaFS5BtTkW3crdSKJ/FEgWnxPnIVVLI= github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= +github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= +github.com/kataras/neffos v0.0.21/go.mod h1:FeGka8lu8cjD2H+0OpBvW8c6xXawy3fj5VX6xcIJ1Fg= github.com/kataras/pio v0.0.11 h1:kqreJ5KOEXGMwHAWHDwIl+mjfNCPhAwZPa8gK7MKlyw= github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= +github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= +github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= -github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= 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/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/labstack/echo/v4 v4.10.0 h1:5CiyngihEO4HXsz3vVsJn7f8xAlWwRr3aY6Ih280ZKA= github.com/labstack/echo/v4 v4.10.0/go.mod h1:S/T/5fy/GigaXnHTkh0ZGe4LpkkQysvRjFMSUTkDRNQ= github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= -github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w= -github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= +github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= +github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mediocregopher/radix/v3 v3.8.1/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 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= @@ -170,30 +233,68 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/nats-io/jwt/v2 v2.3.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= +github.com/nats-io/nats-server/v2 v2.9.11/go.mod h1:b0oVuxSlkvS3ZjMkncFeACGyZohbO4XhSqW1Lt7iRRY= +github.com/nats-io/nats.go v1.19.0/go.mod h1:tLqubohF7t4z3du1QDPYJIQQyhb4wl6DhjxEajSI7UA= +github.com/nats-io/nats.go v1.23.0/go.mod h1:ki/Scsa23edbh8IRZbCuNXR9TDcbvfaSijKtaqQgw+Q= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= +github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= +github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= +github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= +github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= +github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= +github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/pelletier/go-toml/v2 v2.0.6 h1:nrzqCb7j9cDFj2coyLNLaZuJTLjWjlaz6nvTvIwycIU= -github.com/pelletier/go-toml/v2 v2.0.6/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= +github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= +github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= +github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/onsi/gomega v1.27.1 h1:rfztXRbg6nv/5f+Raen9RcGoSecHIFgBBLQK3Wdj754= +github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= +github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/diff v0.0.0-20200914180035-5b29258ca4f7/go.mod h1:zO8QMzTeZd5cpnIkz/Gn6iK0jDfGicM1nynOkkPIl28= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= -github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= +github.com/savsgio/gotils v0.0.0-20210617111740-97865ed5a873/go.mod h1:dmPawKuiAeG/aFYVs2i+Dyosoo7FNcm+Pi8iK6ZUrX8= github.com/savsgio/gotils v0.0.0-20211223103454-d0aaa54c5899/go.mod h1:oejLrk1Y/5zOF+c/aHtXqn3TFlzzbAgPWg8zBiAHDas= github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d h1:Q+gqLBOPkFGHyCJxXMRqtUgUbTjI8/Ze8vu8GGyNFwo= github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d/go.mod h1:Gy+0tqhJvgGlqnTF8CVGP0AaGRjwBtXs/a5PA0Y3+A4= @@ -204,6 +305,7 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= 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= @@ -212,19 +314,32 @@ github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYl github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg= github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.0/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tailscale/depaware v0.0.0-20210622194025-720c4b409502/go.mod h1:p9lPsd+cx33L3H9nNoecRRxPssFKUwwI50I3pZ0yT+8= @@ -253,11 +368,16 @@ github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e h1:+NL1GDIUOKxVfbp2K github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao= github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 h1:Otn9S136ELckZ3KKDyCkxapfufrqDqwmGjcHfAyXRrE= github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ= -github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= +github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= +github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.27.0/go.mod h1:cmWIqlu99AO/RKcp1HWaViTqc57FswJOfYYdPJBl8BA= github.com/valyala/fasthttp v1.33.0/go.mod h1:KJRK/MXx0J+yd0c5hlR+s1tIHD72sniU8ZJjl97LIw4= github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0= github.com/valyala/fasthttp v1.47.0 h1:y7moDoxYzMooFpT5aHgNgVOQDrS3qlkfiP9mDtGGK9c= @@ -277,6 +397,7 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= @@ -289,17 +410,38 @@ github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcm github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= +go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= +golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= +golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +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/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -310,10 +452,23 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -324,50 +479,92 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/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-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -385,20 +582,24 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.29.1 h1:7QBf+IK2gx70Ap/hDsOmam3GE0v9HicjfEdAxE62UoM= -google.golang.org/protobuf v1.29.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= +google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -411,3 +612,4 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= moul.io/http2curl/v2 v2.3.0 h1:9r3JfDzWPcbIklMOs2TnIFzDYvfAZvjeavG6EzP7jYs= moul.io/http2curl/v2 v2.3.0/go.mod h1:RW4hyBjTWSYDOxapodpNEtX0g5Eb16sxklBqmd2RHcE= +rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= From 4d774241666366c6dc199536ee8e61b771aa4430 Mon Sep 17 00:00:00 2001 From: Florian Schlund Date: Sun, 1 Oct 2023 09:17:07 +0200 Subject: [PATCH 20/57] Adding macos and windows to github actions #413 (#426) --- .github/workflows/build.yaml | 34 ++++++++++------- binder.go | 10 ++--- binder_test.go | 14 +++---- body_wrapper.go | 5 +-- body_wrapper_test.go | 7 ++-- e2e/fs_test.go | 5 +-- e2e/printer_test.go | 8 ++-- e2e/redirect_test.go | 4 +- e2e/retry_test.go | 4 +- printer_test.go | 6 +-- request.go | 8 ++-- request_test.go | 73 ++++++++++++++++++------------------ response.go | 4 +- response_test.go | 40 ++++++++++---------- value_test.go | 18 ++++++--- 15 files changed, 125 insertions(+), 115 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index cd16f9693..eb09f37ba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,11 +1,11 @@ name: build on: + workflow_dispatch: pull_request: branches: - master - v* - push: branches: - master @@ -15,21 +15,21 @@ on: jobs: build: - runs-on: ubuntu-latest - strategy: matrix: - go: [1.17, 1.x] - - name: Go ${{ matrix.go }} + go: [1.x] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + name: Go ${{ matrix.go }} ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4.0.1 with: go-version: ${{ matrix.go }} + cache: true - name: Build run: go get -v ./... @@ -38,17 +38,21 @@ jobs: run: go test ./... examples: - runs-on: ubuntu-latest - - name: Examples + strategy: + matrix: + go: [1.x] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} + name: Examples ${{ matrix.go }} ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4.0.1 with: - go-version: 1.x + go-version: ${{ matrix.go }} + cache: true - name: Build run: cd _examples && go get -v . @@ -104,12 +108,13 @@ jobs: uses: actions/checkout@v3 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4.0.1 with: go-version: 1.x - name: Run linters uses: golangci/golangci-lint-action@v3 + timeout-minutes: 5 with: version: v1.51.2 working-directory: ${{ matrix.dir }} @@ -124,9 +129,10 @@ jobs: uses: actions/checkout@v3 - name: Install Go - uses: actions/setup-go@v3 + uses: actions/setup-go@v4.0.1 with: go-version: 1.x + cache: true - name: Run tests run: go test -covermode=count -coverprofile=coverage.out -coverpkg=. ./... diff --git a/binder.go b/binder.go index 64de97467..f1b3d1719 100644 --- a/binder.go +++ b/binder.go @@ -4,7 +4,7 @@ import ( "bytes" "crypto/tls" "fmt" - "io/ioutil" + "io" "net" "net/http" "net/http/httptest" @@ -78,7 +78,7 @@ func (binder Binder) RoundTrip(origReq *http.Request) (*http.Response, error) { } if recorder.Body != nil { - resp.Body = ioutil.NopCloser(recorder.Body) + resp.Body = io.NopCloser(recorder.Body) } return &resp, nil @@ -148,7 +148,7 @@ func (binder FastBinder) RoundTrip(stdreq *http.Request) (*http.Response, error) } if stdreq.Body != nil { - b, err := ioutil.ReadAll(stdreq.Body) + b, err := io.ReadAll(stdreq.Body) if err == nil { ctx.Request.SetBody(b) } @@ -219,9 +219,9 @@ func fast2std(stdreq *http.Request, fastresp *fasthttp.Response) *http.Response } if body != nil { - stdresp.Body = ioutil.NopCloser(bytes.NewReader(body)) + stdresp.Body = io.NopCloser(bytes.NewReader(body)) } else { - stdresp.Body = ioutil.NopCloser(bytes.NewReader(nil)) + stdresp.Body = io.NopCloser(bytes.NewReader(nil)) } return stdresp diff --git a/binder_test.go b/binder_test.go index f312492b1..e5729b5ac 100644 --- a/binder_test.go +++ b/binder_test.go @@ -3,7 +3,7 @@ package httpexpect import ( "bufio" "crypto/tls" - "io/ioutil" + "io" "net/http" "strings" "testing" @@ -20,7 +20,7 @@ type mockHandler struct { } func (c *mockHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { - body, err := ioutil.ReadAll(req.Body) + body, err := io.ReadAll(req.Body) assert.True(c.t, err == nil) if c.http10 { @@ -81,7 +81,7 @@ func TestBinder_Basic(t *testing.T) { "Content-Type": {"application/json"}, } - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { t.Fatal(err) } @@ -240,7 +240,7 @@ func TestFastBinder_Basic(t *testing.T) { "Content-Type": {"application/json"}, } - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { t.Fatal(err) } @@ -278,7 +278,7 @@ func TestFastBinder_RemoteAddr(t *testing.T) { t.Fatal(err) } - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { t.Fatal(err) } @@ -312,7 +312,7 @@ func TestFastBinder_Protocol(t *testing.T) { t.Fatal(err) } - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { t.Fatal(err) } @@ -476,7 +476,7 @@ func TestFastBinder_EmptyResponse(t *testing.T) { assert.False(t, resp.Body == nil) - b, err := ioutil.ReadAll(resp.Body) + b, err := io.ReadAll(resp.Body) if err != nil { t.Fatal(err) } diff --git a/body_wrapper.go b/body_wrapper.go index 28b050225..d6ed03004 100644 --- a/body_wrapper.go +++ b/body_wrapper.go @@ -5,7 +5,6 @@ import ( "context" "errors" "io" - "io/ioutil" "runtime" "sync" ) @@ -178,7 +177,7 @@ func (bw *bodyWrapper) GetBody() (io.ReadCloser, error) { } // Return fresh reader for memory chunk. - return ioutil.NopCloser(bytes.NewReader(bw.memBytes)), nil + return io.NopCloser(bytes.NewReader(bw.memBytes)), nil } // Disables storing body contents in memory and clears the cache. @@ -223,7 +222,7 @@ func (bw *bodyWrapper) httpReadNext(p []byte) (int, error) { } func (bw *bodyWrapper) httpReadFull() error { - b, err := ioutil.ReadAll(bw.httpReader) + b, err := io.ReadAll(bw.httpReader) // Switch to reading from memory. bw.isFullyRead = true diff --git a/body_wrapper_test.go b/body_wrapper_test.go index 8f3ab4f60..0a037555d 100644 --- a/body_wrapper_test.go +++ b/body_wrapper_test.go @@ -4,7 +4,6 @@ import ( "bytes" "errors" "io" - "io/ioutil" "testing" "github.com/stretchr/testify/assert" @@ -152,11 +151,11 @@ func TestBodyWrapper_GetBody(t *testing.T) { rd2, err := wrp.GetBody() assert.NoError(t, err) - b, err := ioutil.ReadAll(rd1) + b, err := io.ReadAll(rd1) assert.NoError(t, err) assert.Equal(t, "test_body", string(b)) - b, err = ioutil.ReadAll(rd2) + b, err = io.ReadAll(rd2) assert.NoError(t, err) assert.Equal(t, "test_body", string(b)) @@ -601,7 +600,7 @@ func TestBodyWrapper_Memory(t *testing.T) { assert.Equal(t, 1, body.eofCount) // check body - c, err := ioutil.ReadAll(reader) + c, err := io.ReadAll(reader) assert.NoError(t, err) assert.Equal(t, "123456789", string(c)) diff --git a/e2e/fs_test.go b/e2e/fs_test.go index 4e8fc71ab..b4d25498e 100644 --- a/e2e/fs_test.go +++ b/e2e/fs_test.go @@ -1,7 +1,6 @@ package e2e import ( - "io/ioutil" "net/http" "os" "path" @@ -12,13 +11,13 @@ import ( ) func TestE2EFs_FastBinder(t *testing.T) { - tempdir, err := ioutil.TempDir("", "httpexpect") + tempdir, err := os.MkdirTemp("", "httpexpect") if err != nil { t.Fatal(err) } defer os.RemoveAll(tempdir) - if err := ioutil.WriteFile( + if err := os.WriteFile( path.Join(tempdir, "hello"), []byte("hello, world!"), 0666); err != nil { t.Fatal(err) } diff --git a/e2e/printer_test.go b/e2e/printer_test.go index d94fb21db..4b280e555 100644 --- a/e2e/printer_test.go +++ b/e2e/printer_test.go @@ -1,7 +1,7 @@ package e2e import ( - "io/ioutil" + "io" "net/http" "net/http/httptest" "testing" @@ -19,14 +19,14 @@ type mockPrinter struct { func (p *mockPrinter) Request(req *http.Request) { if req.Body != nil { - p.reqBody, _ = ioutil.ReadAll(req.Body) + p.reqBody, _ = io.ReadAll(req.Body) req.Body.Close() } } func (p *mockPrinter) Response(resp *http.Response, rtt time.Duration) { if resp.Body != nil { - p.respBody, _ = ioutil.ReadAll(resp.Body) + p.respBody, _ = io.ReadAll(resp.Body) resp.Body.Close() } p.rtt = rtt @@ -36,7 +36,7 @@ func createPrinterHandler() http.Handler { mux := http.NewServeMux() mux.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) { - body, _ := ioutil.ReadAll(r.Body) + body, _ := io.ReadAll(r.Body) if string(body) != "test_request" { panic("unexpected request body " + string(body)) } diff --git a/e2e/redirect_test.go b/e2e/redirect_test.go index 3690c418d..94bf47d61 100644 --- a/e2e/redirect_test.go +++ b/e2e/redirect_test.go @@ -1,7 +1,7 @@ package e2e import ( - "io/ioutil" + "io" "net/http" "net/http/httptest" "testing" @@ -18,7 +18,7 @@ func createRedirectHandler() http.Handler { if r.Method == "GET" { _, _ = w.Write([]byte(`default_response`)) } else { - b, _ := ioutil.ReadAll(r.Body) + b, _ := io.ReadAll(r.Body) _, _ = w.Write(b) } }) diff --git a/e2e/retry_test.go b/e2e/retry_test.go index de7332ae5..6098e22ba 100644 --- a/e2e/retry_test.go +++ b/e2e/retry_test.go @@ -1,7 +1,7 @@ package e2e import ( - "io/ioutil" + "io" "net/http" "net/http/httptest" "sync" @@ -75,7 +75,7 @@ func createRetryHandler(rc *retryController) http.Handler { mux := http.NewServeMux() mux.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) { - b, _ := ioutil.ReadAll(r.Body) + b, _ := io.ReadAll(r.Body) w.WriteHeader(rc.getStatus()) _, _ = w.Write(b) diff --git a/printer_test.go b/printer_test.go index d7cebea94..96ce7ef14 100644 --- a/printer_test.go +++ b/printer_test.go @@ -3,7 +3,7 @@ package httpexpect import ( "bytes" "errors" - "io/ioutil" + "io" "net/http" "testing" @@ -33,7 +33,7 @@ func TestPrinter_Compact(t *testing.T) { printer.Request(req2) printer.Request(nil) - printer.Response(&http.Response{Body: ioutil.NopCloser(body2)}, 0) + printer.Response(&http.Response{Body: io.NopCloser(body2)}, 0) printer.Response(&http.Response{}, 0) printer.Response(nil, 0) } @@ -51,7 +51,7 @@ func TestPrinter_Debug(t *testing.T) { printer.Request(req2) printer.Request(nil) - printer.Response(&http.Response{Body: ioutil.NopCloser(body2)}, 0) + printer.Response(&http.Response{Body: io.NopCloser(body2)}, 0) printer.Response(&http.Response{}, 0) printer.Response(nil, 0) } diff --git a/request.go b/request.go index 280bfb031..7e2312e34 100644 --- a/request.go +++ b/request.go @@ -7,7 +7,6 @@ import ( "errors" "fmt" "io" - "io/ioutil" "mime/multipart" "net" "net/http" @@ -1889,7 +1888,7 @@ func (r *Request) WithFile(key, path string, reader ...io.Reader) *Request { // // req := NewRequestC(config, "PUT", "http://example.com/path") // fh, _ := os.Open("./john.png") -// b, _ := ioutil.ReadAll(fh) +// b, _ := io.ReadAll(fh) // req.WithMultipart(). // WithFileBytes("avatar", "john.png", b) // fh.Close() @@ -2427,7 +2426,8 @@ func (r *Request) setupRedirects(opChain *chain) { if _, ok := r.httpReq.Body.(*bodyWrapper); !ok { r.httpReq.Body = newBodyWrapper(r.httpReq.Body, nil) } - r.httpReq.GetBody = r.httpReq.Body.(*bodyWrapper).GetBody + wrapper := r.httpReq.Body.(*bodyWrapper) + r.httpReq.GetBody = wrapper.GetBody } else { r.httpReq.GetBody = func() (io.ReadCloser, error) { return http.NoBody, nil @@ -2495,7 +2495,7 @@ func (r *Request) setBody( r.httpReq.Body = http.NoBody r.httpReq.ContentLength = 0 } else { - r.httpReq.Body = ioutil.NopCloser(reader) + r.httpReq.Body = io.NopCloser(reader) r.httpReq.ContentLength = int64(len) } diff --git a/request_test.go b/request_test.go index 8419ce020..e83a31f40 100644 --- a/request_test.go +++ b/request_test.go @@ -6,7 +6,6 @@ import ( "encoding/json" "errors" "io" - "io/ioutil" "mime" "mime/multipart" "net/http" @@ -1730,19 +1729,19 @@ func TestRequest_BodyMultipart(t *testing.T) { part1, _ := reader.NextPart() assert.Equal(t, "b", part1.FormName()) assert.Equal(t, "", part1.FileName()) - b1, _ := ioutil.ReadAll(part1) + b1, _ := io.ReadAll(part1) assert.Equal(t, "1", string(b1)) part2, _ := reader.NextPart() assert.Equal(t, "c", part2.FormName()) assert.Equal(t, "", part2.FileName()) - b2, _ := ioutil.ReadAll(part2) + b2, _ := io.ReadAll(part2) assert.Equal(t, "2", string(b2)) part3, _ := reader.NextPart() assert.Equal(t, "a", part3.FormName()) assert.Equal(t, "", part3.FileName()) - b3, _ := ioutil.ReadAll(part3) + b3, _ := io.ReadAll(part3) assert.Equal(t, "3", string(b3)) eof, _ := reader.NextPart() @@ -1752,7 +1751,7 @@ func TestRequest_BodyMultipart(t *testing.T) { t.Run("multipart file", func(t *testing.T) { req := NewRequestC(config, "POST", "url") - fh, _ := ioutil.TempFile("", "httpexpect") + fh, _ := os.CreateTemp("", "httpexpect") filename2 := fh.Name() _, _ = fh.WriteString("2") fh.Close() @@ -1782,25 +1781,25 @@ func TestRequest_BodyMultipart(t *testing.T) { part1, _ := reader.NextPart() assert.Equal(t, "a", part1.FormName()) assert.Equal(t, "", part1.FileName()) - b1, _ := ioutil.ReadAll(part1) + b1, _ := io.ReadAll(part1) assert.Equal(t, "1", string(b1)) part2, _ := reader.NextPart() assert.Equal(t, "b", part2.FormName()) assert.Equal(t, filepath.Base(filename2), filepath.Base(part2.FileName())) - b2, _ := ioutil.ReadAll(part2) + b2, _ := io.ReadAll(part2) assert.Equal(t, "2", string(b2)) part3, _ := reader.NextPart() assert.Equal(t, "c", part3.FormName()) assert.Equal(t, "filename3", filepath.Base(part3.FileName())) - b3, _ := ioutil.ReadAll(part3) + b3, _ := io.ReadAll(part3) assert.Equal(t, "3", string(b3)) part4, _ := reader.NextPart() assert.Equal(t, "d", part4.FormName()) assert.Equal(t, "filename4", filepath.Base(part4.FileName())) - b4, _ := ioutil.ReadAll(part4) + b4, _ := io.ReadAll(part4) assert.Equal(t, "4", string(b4)) eof, _ := reader.NextPart() @@ -2169,7 +2168,7 @@ func TestRequest_RedirectsDontFollow(t *testing.T) { tp := newMockRedirectTransport() tp.assertFn = func(r *http.Request) { - b, err := ioutil.ReadAll(r.Body) + b, err := io.ReadAll(r.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) } @@ -2293,7 +2292,7 @@ func TestRequest_RedirectsFollowAll(t *testing.T) { tp := newMockRedirectTransport() tp.maxRedirects = 1 tp.assertFn = func(r *http.Request) { - b, err := ioutil.ReadAll(r.Body) + b, err := io.ReadAll(r.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) } @@ -2317,7 +2316,7 @@ func TestRequest_RedirectsFollowAll(t *testing.T) { // Should set GetBody gb, err := req.httpReq.GetBody() assert.NoError(t, err) - b, err := ioutil.ReadAll(gb) + b, err := io.ReadAll(gb) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) @@ -2339,7 +2338,7 @@ func TestRequest_RedirectsFollowAll(t *testing.T) { tp := newMockRedirectTransport() tp.assertFn = func(r *http.Request) { - b, err := ioutil.ReadAll(r.Body) + b, err := io.ReadAll(r.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) } @@ -2362,7 +2361,7 @@ func TestRequest_RedirectsFollowAll(t *testing.T) { // Should set GetBody gb, err := req.httpReq.GetBody() assert.NoError(t, err) - b, err := ioutil.ReadAll(gb) + b, err := io.ReadAll(gb) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) @@ -2465,7 +2464,7 @@ func TestRequest_RedirectsFollowWithoutBody(t *testing.T) { tp := newMockRedirectTransport() tp.maxRedirects = 1 tp.assertFn = func(r *http.Request) { - b, err := ioutil.ReadAll(r.Body) + b, err := io.ReadAll(r.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) } @@ -2512,7 +2511,7 @@ func TestRequest_RedirectsFollowWithoutBody(t *testing.T) { if r.URL.String() == "/url" { assert.Equal(t, r.Method, http.MethodPut) - b, err := ioutil.ReadAll(r.Body) + b, err := io.ReadAll(r.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) } else if r.URL.String() == "/redirect" { @@ -2564,7 +2563,7 @@ func TestRequest_RedirectsFollowWithoutBody(t *testing.T) { if r.URL.String() == "/url" { assert.Equal(t, r.Method, http.MethodPut) - b, err := ioutil.ReadAll(r.Body) + b, err := io.ReadAll(r.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) } else if r.URL.String() == "/redirect" { @@ -2618,7 +2617,7 @@ func TestRequest_RetriesDisabled(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -2652,7 +2651,7 @@ func TestRequest_RetriesDisabled(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -2687,7 +2686,7 @@ func TestRequest_RetriesDisabled(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -2723,7 +2722,7 @@ func TestRequest_RetriesDisabled(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -2761,7 +2760,7 @@ func TestRequest_RetriesTimeout(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -2795,7 +2794,7 @@ func TestRequest_RetriesTimeout(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -2831,7 +2830,7 @@ func TestRequest_RetriesTimeout(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -2867,7 +2866,7 @@ func TestRequest_RetriesTimeout(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -2905,7 +2904,7 @@ func TestRequest_RetriesTimeoutAndServer(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -2939,7 +2938,7 @@ func TestRequest_RetriesTimeoutAndServer(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -2975,7 +2974,7 @@ func TestRequest_RetriesTimeoutAndServer(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -3012,7 +3011,7 @@ func TestRequest_RetriesTimeoutAndServer(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -3050,7 +3049,7 @@ func TestRequest_RetriesAll(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -3084,7 +3083,7 @@ func TestRequest_RetriesAll(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -3120,7 +3119,7 @@ func TestRequest_RetriesAll(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -3157,7 +3156,7 @@ func TestRequest_RetriesAll(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -3195,7 +3194,7 @@ func TestRequest_RetriesLimit(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -3233,7 +3232,7 @@ func TestRequest_RetriesDelay(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -3275,7 +3274,7 @@ func TestRequest_RetriesDelay(t *testing.T) { cb: func(req *http.Request) { callCount++ - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, @@ -3321,7 +3320,7 @@ func TestRequest_RetriesCancellation(t *testing.T) { assert.Error(t, req.Context().Err(), context.Canceled.Error()) - b, err := ioutil.ReadAll(req.Body) + b, err := io.ReadAll(req.Body) assert.NoError(t, err) assert.Equal(t, "test body", string(b)) }, diff --git a/response.go b/response.go index bfa92b559..7d32ef00b 100644 --- a/response.go +++ b/response.go @@ -5,7 +5,7 @@ import ( "encoding/json" "errors" "fmt" - "io/ioutil" + "io" "mime" "net/http" "reflect" @@ -169,7 +169,7 @@ func (r *Response) getContent(opChain *chain) ([]byte, bool) { bw.Rewind() } - content, err := ioutil.ReadAll(resp.Body) + content, err := io.ReadAll(resp.Body) closeErr := resp.Body.Close() if err == nil { diff --git a/response_test.go b/response_test.go index 9c4e67cfe..6ed5d9eb8 100644 --- a/response_test.go +++ b/response_test.go @@ -4,7 +4,7 @@ import ( "bytes" "errors" "fmt" - "io/ioutil" + "io" "net/http" "strings" "testing" @@ -370,7 +370,7 @@ func TestResponse_BodyOperations(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, - Body: ioutil.NopCloser(bytes.NewBufferString("body")), + Body: io.NopCloser(bytes.NewBufferString("body")), } resp := NewResponse(reporter, httpResp) @@ -615,7 +615,7 @@ func TestResponse_NoContent(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString("")), + Body: io.NopCloser(bytes.NewBufferString("")), } resp := NewResponse(reporter, httpResp) @@ -705,7 +705,7 @@ func TestResponse_NoContent(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -931,7 +931,7 @@ func TestResponse_Text(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -998,7 +998,7 @@ func TestResponse_Form(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1043,7 +1043,7 @@ func TestResponse_Form(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1067,7 +1067,7 @@ func TestResponse_Form(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1119,7 +1119,7 @@ func TestResponse_JSON(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1160,7 +1160,7 @@ func TestResponse_JSON(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1184,7 +1184,7 @@ func TestResponse_JSON(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1209,7 +1209,7 @@ func TestResponse_JSON(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1265,7 +1265,7 @@ func TestResponse_JSONP(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1323,7 +1323,7 @@ func TestResponse_JSONP(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1349,7 +1349,7 @@ func TestResponse_JSONP(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1374,7 +1374,7 @@ func TestResponse_JSONP(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1430,7 +1430,7 @@ func TestResponse_ContentOpts(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(tc.respBody)), + Body: io.NopCloser(bytes.NewBufferString(tc.respBody)), } reporter := newMockReporter(t) @@ -1608,7 +1608,7 @@ func TestResponse_Usage(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1634,7 +1634,7 @@ func TestResponse_Usage(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body)), + Body: io.NopCloser(bytes.NewBufferString(body)), } resp := NewResponse(reporter, httpResp) @@ -1660,7 +1660,7 @@ func TestResponse_Usage(t *testing.T) { httpResp := &http.Response{ StatusCode: http.StatusOK, Header: http.Header(headers), - Body: ioutil.NopCloser(bytes.NewBufferString(body1)), + Body: io.NopCloser(bytes.NewBufferString(body1)), } resp := NewResponse(reporter, httpResp) diff --git a/value_test.go b/value_test.go index d30c1a4b2..8997e48e7 100644 --- a/value_test.go +++ b/value_test.go @@ -2,8 +2,8 @@ package httpexpect import ( "encoding/json" - "io/ioutil" "os" + "runtime" "testing" "github.com/stretchr/testify/assert" @@ -1215,7 +1215,7 @@ func TestValue_Schema(t *testing.T) { "foo": "a", "bar": 1, } - tmp, _ := ioutil.TempFile("", "httpexpect") + tmp, _ := os.CreateTemp("", "httpexpect") defer os.Remove(tmp.Name()) _, err := tmp.Write([]byte(schema)) @@ -1224,7 +1224,11 @@ func TestValue_Schema(t *testing.T) { err = tmp.Close() require.Nil(t, err) - url := "file://" + tmp.Name() + url := "file://" + if runtime.GOOS == "windows" { + url = url + "/" + } + url = url + tmp.Name() NewValue(reporter, data).Schema(url). chain.assert(t, success) }) @@ -1236,7 +1240,7 @@ func TestValue_Schema(t *testing.T) { "bar": "b", } - tmp, _ := ioutil.TempFile("", "httpexpect") + tmp, _ := os.CreateTemp("", "httpexpect") defer os.Remove(tmp.Name()) _, err := tmp.Write([]byte(schema)) @@ -1245,7 +1249,11 @@ func TestValue_Schema(t *testing.T) { err = tmp.Close() require.Nil(t, err) - url := "file://" + tmp.Name() + url := "file://" + if runtime.GOOS == "windows" { + url = url + "/" + } + url = url + tmp.Name() NewValue(reporter, data).Schema(url). chain.assert(t, failure) }) From 412069d5897461fd9410c786f5f3dda38fae8f47 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sun, 1 Oct 2023 10:50:19 +0400 Subject: [PATCH 21/57] CI fixes - bump go minimal version to 1.19 - add go 1.19 to CI - disable golangci cache to suppress GHA warnings --- .github/workflows/build.yaml | 17 ++++++++++------- go.mod | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index eb09f37ba..a6e35a8f7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,6 +2,7 @@ name: build on: workflow_dispatch: + pull_request: branches: - master @@ -17,10 +18,11 @@ jobs: build: strategy: matrix: - go: [1.x] + go: [1.19, 1.x] os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} - name: Go ${{ matrix.go }} ${{ matrix.os }} + + runs-on: ${{ matrix.os }} + name: Go ${{ matrix.go }} ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3 @@ -40,10 +42,10 @@ jobs: examples: strategy: matrix: - go: [1.x] os: [ubuntu-latest, windows-latest, macos-latest] - runs-on: ${{ matrix.os }} - name: Examples ${{ matrix.go }} ${{ matrix.os }} + + runs-on: ${{ matrix.os }} + name: Examples ${{ matrix.os }} steps: - name: Checkout uses: actions/checkout@v3 @@ -51,7 +53,7 @@ jobs: - name: Install Go uses: actions/setup-go@v4.0.1 with: - go-version: ${{ matrix.go }} + go-version: 1.x cache: true - name: Build @@ -118,6 +120,7 @@ jobs: with: version: v1.51.2 working-directory: ${{ matrix.dir }} + skip-pkg-cache: true coverage: runs-on: ubuntu-latest diff --git a/go.mod b/go.mod index 9758db045..df12dabc9 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/gavv/httpexpect/v2 -go 1.17 +go 1.19 require ( github.com/ajg/form v1.5.1 From 403102fb6ab301b438da8ff1c7810bc6a035d97f Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sun, 1 Oct 2023 11:27:16 +0400 Subject: [PATCH 22/57] Fix CI linter action --- .github/workflows/build.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a6e35a8f7..dd2452e4e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -113,14 +113,15 @@ jobs: uses: actions/setup-go@v4.0.1 with: go-version: 1.x + cache: false - name: Run linters uses: golangci/golangci-lint-action@v3 - timeout-minutes: 5 + timeout-minutes: 20 with: version: v1.51.2 working-directory: ${{ matrix.dir }} - skip-pkg-cache: true + args: --timeout=20m coverage: runs-on: ubuntu-latest From 2183271d6d654f8a74021eafe130c9add56e53d1 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sun, 1 Oct 2023 11:31:13 +0400 Subject: [PATCH 23/57] Bump dependencies --- _examples/go.mod | 12 +-- _examples/go.sum | 221 +++-------------------------------------------- go.sum | 10 --- 3 files changed, 18 insertions(+), 225 deletions(-) diff --git a/_examples/go.mod b/_examples/go.mod index a4f9a1066..3803baf04 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -11,7 +11,7 @@ require ( github.com/gorilla/websocket v1.5.0 github.com/kataras/iris/v12 v12.2.0 github.com/labstack/echo/v4 v4.10.0 - github.com/valyala/fasthttp v1.47.0 + github.com/valyala/fasthttp v1.50.0 golang.org/x/oauth2 v0.4.0 google.golang.org/appengine v1.6.7 ) @@ -54,7 +54,7 @@ require ( github.com/kataras/pio v0.0.11 // indirect github.com/kataras/sitemap v0.0.6 // indirect github.com/kataras/tunnel v0.0.4 // indirect - github.com/klauspost/compress v1.16.5 // indirect + github.com/klauspost/compress v1.17.0 // indirect github.com/klauspost/cpuid/v2 v2.2.4 // indirect github.com/labstack/gommon v0.4.0 // indirect github.com/leodido/go-urn v1.2.4 // indirect @@ -100,10 +100,10 @@ require ( github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.9.0 // indirect - golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.8.0 // indirect - golang.org/x/text v0.9.0 // indirect + golang.org/x/crypto v0.13.0 // indirect + golang.org/x/net v0.15.0 // indirect + golang.org/x/sys v0.12.0 // indirect + golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/_examples/go.sum b/_examples/go.sum index af1244136..31c900875 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -1,6 +1,4 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= @@ -11,54 +9,35 @@ github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= -github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 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/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= -github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= -github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= -github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= -github.com/fasthttp/websocket v1.4.3-rc.6/go.mod h1:43W9OM2T8FeXpCWMsBd9Cb7nE2CACNqNvCqQCoty/Lc= github.com/fasthttp/websocket v1.5.0 h1:B4zbe3xXyvIdnqjOZrafVFklCUq5ZLo/TqCt5JA1wLE= github.com/fasthttp/websocket v1.5.0/go.mod h1:n0BlOQvJdPbTuBkZT0O5+jk/sp/1/VCzquR1BehI2F4= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= @@ -79,26 +58,18 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= -github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-oauth2/oauth2/v4 v4.5.1 h1:3vxp+cjLqDe1TbogbwtMyeHRHr1tD+ksrK7xNppYRDs= github.com/go-oauth2/oauth2/v4 v4.5.1/go.mod h1:wk/2uLImWIa9VVQDgxz99H2GDbhmfi/9/Xr+GvkSUSQ= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= -github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= -github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-session/session v3.1.2+incompatible/go.mod h1:8B3iivBQjrz/JtC68Np2T1yBBLxTan3mn/3OM0CyRt0= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= -github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= -github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= @@ -115,7 +86,6 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -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/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -123,37 +93,25 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= github.com/iris-contrib/httpexpect/v2 v2.12.1 h1:3cTZSyBBen/kfjCtgNFoUKi1u0FVXNaAjyRJOo6AVS4= -github.com/iris-contrib/httpexpect/v2 v2.12.1/go.mod h1:7+RB6W5oNClX7PTwJgJnsQP3ZuUUYB3u61KCqeSgZ88= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -169,28 +127,20 @@ github.com/kataras/golog v0.1.8 h1:isP8th4PJH2SrbkciKnylaND9xoTtfxv++NB+DF0l9g= github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= github.com/kataras/iris/v12 v12.2.0 h1:WzDY5nGuW/LgVaFS5BtTkW3crdSKJ/FEgWnxPnIVVLI= github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= -github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= -github.com/kataras/neffos v0.0.21/go.mod h1:FeGka8lu8cjD2H+0OpBvW8c6xXawy3fj5VX6xcIJ1Fg= github.com/kataras/pio v0.0.11 h1:kqreJ5KOEXGMwHAWHDwIl+mjfNCPhAwZPa8gK7MKlyw= github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= -github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= -github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= -github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= +github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 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= @@ -200,32 +150,24 @@ github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8 github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/matryer/try v0.0.0-20161228173917-9ac251b645a2/go.mod h1:0KeJpeMD6o+O4hW7qJOT7vyQPKrWmj26uf5wMc/IiIs= github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mediocregopher/radix/v3 v3.8.1/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= -github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= -github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= -github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 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= @@ -233,68 +175,27 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= -github.com/nats-io/jwt/v2 v2.3.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= -github.com/nats-io/nats-server/v2 v2.9.11/go.mod h1:b0oVuxSlkvS3ZjMkncFeACGyZohbO4XhSqW1Lt7iRRY= -github.com/nats-io/nats.go v1.19.0/go.mod h1:tLqubohF7t4z3du1QDPYJIQQyhb4wl6DhjxEajSI7UA= -github.com/nats-io/nats.go v1.23.0/go.mod h1:ki/Scsa23edbh8IRZbCuNXR9TDcbvfaSijKtaqQgw+Q= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= -github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= -github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= -github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= -github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= -github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= -github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= -github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= -github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= -github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= -github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= -github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= -github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= -github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= -github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= -github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= -github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= -github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= -github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= -github.com/onsi/gomega v1.27.1 h1:rfztXRbg6nv/5f+Raen9RcGoSecHIFgBBLQK3Wdj754= -github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/diff v0.0.0-20200914180035-5b29258ca4f7/go.mod h1:zO8QMzTeZd5cpnIkz/Gn6iK0jDfGicM1nynOkkPIl28= -github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= -github.com/savsgio/gotils v0.0.0-20210617111740-97865ed5a873/go.mod h1:dmPawKuiAeG/aFYVs2i+Dyosoo7FNcm+Pi8iK6ZUrX8= github.com/savsgio/gotils v0.0.0-20211223103454-d0aaa54c5899/go.mod h1:oejLrk1Y/5zOF+c/aHtXqn3TFlzzbAgPWg8zBiAHDas= github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d h1:Q+gqLBOPkFGHyCJxXMRqtUgUbTjI8/Ze8vu8GGyNFwo= github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d/go.mod h1:Gy+0tqhJvgGlqnTF8CVGP0AaGRjwBtXs/a5PA0Y3+A4= @@ -305,7 +206,6 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= -github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= 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= @@ -314,25 +214,14 @@ github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYl github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg= github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= -github.com/stretchr/testify v1.5.0/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -368,20 +257,16 @@ github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e h1:+NL1GDIUOKxVfbp2K github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao= github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 h1:Otn9S136ELckZ3KKDyCkxapfufrqDqwmGjcHfAyXRrE= github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ= -github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= -github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= -github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.27.0/go.mod h1:cmWIqlu99AO/RKcp1HWaViTqc57FswJOfYYdPJBl8BA= github.com/valyala/fasthttp v1.33.0/go.mod h1:KJRK/MXx0J+yd0c5hlR+s1tIHD72sniU8ZJjl97LIw4= github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0= -github.com/valyala/fasthttp v1.47.0 h1:y7moDoxYzMooFpT5aHgNgVOQDrS3qlkfiP9mDtGGK9c= -github.com/valyala/fasthttp v1.47.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= +github.com/valyala/fasthttp v1.50.0 h1:H7fweIlBm0rXLs2q0XbalvJ6r0CUPFWK3/bB4N13e9M= +github.com/valyala/fasthttp v1.50.0/go.mod h1:k2zXd82h/7UZc3VOdJ2WaUqt1uZ/XpXAfE9i+HBC3lA= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= @@ -397,7 +282,6 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= @@ -410,38 +294,19 @@ github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcm github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= -go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= -go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= -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/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= -golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= -golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g= -golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= +golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= -golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -452,25 +317,12 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= -golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= -golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= @@ -479,31 +331,20 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/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-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -512,59 +353,28 @@ golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= -golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= -golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= -golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= -golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -582,24 +392,17 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/go.sum b/go.sum index 9abd0a15f..48ee22b86 100644 --- a/go.sum +++ b/go.sum @@ -86,16 +86,13 @@ github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDf github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcmawg5bI= github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 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/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 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= @@ -104,13 +101,11 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -124,24 +119,19 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 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/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 4e3e1fa581a0ef7acf185ed21df2a59722543376 Mon Sep 17 00:00:00 2001 From: Piotr Lewandowski Date: Sun, 23 Apr 2023 14:49:48 +0200 Subject: [PATCH 24/57] Add BodyWrapper test for DisableRewindsErrors Signed-off-by: Piotr Lewandowski --- body_wrapper_test.go | 63 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/body_wrapper_test.go b/body_wrapper_test.go index 0a037555d..bdab3e9e3 100644 --- a/body_wrapper_test.go +++ b/body_wrapper_test.go @@ -988,3 +988,66 @@ func TestBodyWrapper_DisableRewinds(t *testing.T) { assert.Equal(t, 1, body.eofCount) }) } + +func TestBodyWrapper_DisableRewindsErrors(t *testing.T) { + bodyText := "test_body" + + t.Run("rewinds are disabled before first read", func(t *testing.T) { + body := newMockBody(bodyText) + wrp := newBodyWrapper(body, nil) + bodyErr := errors.New("read_error") + body.readErr = bodyErr + b := make([]byte, len(bodyText)+1) + + wrp.DisableRewinds() + + _, err := wrp.Read(b) + assert.EqualError(t, err, bodyErr.Error()) + assert.Equal(t, 1, body.readCount) + + _, err = wrp.Read(b) + assert.EqualError(t, err, bodyErr.Error()) + assert.Equal(t, 2, body.readCount) + }) + + t.Run("rewinds are disabled after read error", func(t *testing.T) { + body := newMockBody(bodyText) + wrp := newBodyWrapper(body, nil) + bodyErr := errors.New("read_error") + body.readErr = bodyErr + b := make([]byte, len(bodyText)+1) + + _, err := wrp.Read(b) + assert.EqualError(t, err, bodyErr.Error()) + assert.Equal(t, 1, body.readCount) + + wrp.DisableRewinds() + + _, err = wrp.Read(b) + assert.EqualError(t, err, bodyErr.Error()) + assert.Equal(t, 1, body.readCount) + }) + + t.Run("rewinds are disabled after close error", func(t *testing.T) { + body := newMockBody(bodyText) + wrp := newBodyWrapper(body, nil) + bodyErr := errors.New("close_error") + body.closeErr = bodyErr + b := make([]byte, len(bodyText)+1) + + err := wrp.Close() + assert.True(t, wrp.isFullyRead) + assert.EqualError(t, err, bodyErr.Error()) + assert.Equal(t, 2, body.readCount) + + wrp.DisableRewinds() + + _, err = wrp.Read(b) + assert.EqualError(t, err, bodyErr.Error()) + assert.Equal(t, 2, body.readCount) + + _, err = wrp.Read(b) + assert.EqualError(t, err, bodyErr.Error()) + assert.Equal(t, 2, body.readCount) + }) +} From a7decf5912f4d2eb1cf16e4a507a553dc59d3866 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sun, 1 Oct 2023 11:48:20 +0400 Subject: [PATCH 25/57] Add comments --- body_wrapper_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/body_wrapper_test.go b/body_wrapper_test.go index bdab3e9e3..22fca96a5 100644 --- a/body_wrapper_test.go +++ b/body_wrapper_test.go @@ -999,12 +999,15 @@ func TestBodyWrapper_DisableRewindsErrors(t *testing.T) { body.readErr = bodyErr b := make([]byte, len(bodyText)+1) + // disable rewinds before first read wrp.DisableRewinds() + // Read calls body.Read, which fails _, err := wrp.Read(b) assert.EqualError(t, err, bodyErr.Error()) assert.Equal(t, 1, body.readCount) + // Read calls body.Read again, which fails again _, err = wrp.Read(b) assert.EqualError(t, err, bodyErr.Error()) assert.Equal(t, 2, body.readCount) @@ -1017,12 +1020,15 @@ func TestBodyWrapper_DisableRewindsErrors(t *testing.T) { body.readErr = bodyErr b := make([]byte, len(bodyText)+1) + // Read calls body.Read, which fails _, err := wrp.Read(b) assert.EqualError(t, err, bodyErr.Error()) assert.Equal(t, 1, body.readCount) + // disable rewinds after failed read wrp.DisableRewinds() + // Read returns cached error from previous call _, err = wrp.Read(b) assert.EqualError(t, err, bodyErr.Error()) assert.Equal(t, 1, body.readCount) @@ -1035,17 +1041,21 @@ func TestBodyWrapper_DisableRewindsErrors(t *testing.T) { body.closeErr = bodyErr b := make([]byte, len(bodyText)+1) + // Close calls body.Read, then body.Close, which fails err := wrp.Close() assert.True(t, wrp.isFullyRead) assert.EqualError(t, err, bodyErr.Error()) assert.Equal(t, 2, body.readCount) + // disable rewinds after failed close wrp.DisableRewinds() + // Read returns cached error from Close call _, err = wrp.Read(b) assert.EqualError(t, err, bodyErr.Error()) assert.Equal(t, 2, body.readCount) + // Read returns cached error from Close call, again _, err = wrp.Read(b) assert.EqualError(t, err, bodyErr.Error()) assert.Equal(t, 2, body.readCount) From 6ff151ac30802786a1263874225a450f6f41df24 Mon Sep 17 00:00:00 2001 From: Gabriel Servais <23179886+gpjservais@users.noreply.github.com> Date: Thu, 13 Apr 2023 00:25:20 -0500 Subject: [PATCH 26/57] Free Memory after calling BodyWrapper DisableRewinds --- body_wrapper.go | 24 ++++++++++-- body_wrapper_test.go | 91 +++++++++++++++++++++++++++++++++++++++----- 2 files changed, 103 insertions(+), 12 deletions(-) diff --git a/body_wrapper.go b/body_wrapper.go index d6ed03004..50c0e2e15 100644 --- a/body_wrapper.go +++ b/body_wrapper.go @@ -44,7 +44,7 @@ type bodyWrapper struct { // Reader for HTTP response body stored in memory. // Rewind() resets this reader to start from the beginning. - memReader io.Reader + memReader *bytes.Reader // HTTP response body stored in memory. memBytes []byte @@ -122,6 +122,11 @@ func (bw *bodyWrapper) Close() error { // Reset memory reader. bw.memReader = bytes.NewReader(nil) + // Free memory when rewind is disabled. + if bw.isRewindDisabled { + bw.memBytes = nil + } + return err } @@ -185,14 +190,27 @@ func (bw *bodyWrapper) DisableRewinds() { bw.mu.Lock() defer bw.mu.Unlock() + // Free memory if reading from original HTTP response + // or reader has nothing left to read in memory. + if !bw.isFullyRead || bw.memReader.Len() == 0 { + bw.memReader = bytes.NewReader(nil) + bw.memBytes = nil + } + bw.isRewindDisabled = true } func (bw *bodyWrapper) memReadNext(p []byte) (int, error) { n, err := bw.memReader.Read(p) - if err == io.EOF && bw.readErr != nil { - err = bw.readErr + if err == io.EOF { + if bw.isRewindDisabled { + bw.memReader = bytes.NewReader(nil) + bw.memBytes = nil + } + if bw.readErr != nil { + err = bw.readErr + } } return n, err diff --git a/body_wrapper_test.go b/body_wrapper_test.go index 22fca96a5..a04ed9645 100644 --- a/body_wrapper_test.go +++ b/body_wrapper_test.go @@ -741,7 +741,7 @@ func TestBodyWrapper_DisableRewinds(t *testing.T) { wrp.DisableRewinds() assert.False(t, wrp.isFullyRead) - assert.Equal(t, "1234", string(wrp.memBytes)) + assert.Nil(t, wrp.memBytes) assert.Equal(t, 1, body.readCount) assert.Equal(t, 0, body.closeCount) @@ -756,7 +756,7 @@ func TestBodyWrapper_DisableRewinds(t *testing.T) { wrp.Rewind() assert.False(t, wrp.isFullyRead) - assert.Equal(t, "1234", string(wrp.memBytes)) + assert.Nil(t, wrp.memBytes) assert.Equal(t, 1, body.readCount) assert.Equal(t, 0, body.closeCount) @@ -769,7 +769,7 @@ func TestBodyWrapper_DisableRewinds(t *testing.T) { assert.Equal(t, "5678", string(b)) assert.False(t, wrp.isFullyRead) - assert.Equal(t, "1234", string(wrp.memBytes)) + assert.Nil(t, wrp.memBytes) assert.Equal(t, 2, body.readCount) assert.Equal(t, 0, body.closeCount) @@ -781,7 +781,7 @@ func TestBodyWrapper_DisableRewinds(t *testing.T) { assert.Equal(t, 0, n) assert.False(t, wrp.isFullyRead) - assert.Equal(t, "1234", string(wrp.memBytes)) + assert.Nil(t, wrp.memBytes) assert.Equal(t, 3, body.readCount) assert.Equal(t, 0, body.closeCount) @@ -792,7 +792,7 @@ func TestBodyWrapper_DisableRewinds(t *testing.T) { assert.NoError(t, err) assert.False(t, wrp.isFullyRead) - assert.Equal(t, "1234", string(wrp.memBytes)) + assert.Nil(t, wrp.memBytes) assert.Equal(t, 3, body.readCount) assert.Equal(t, 1, body.closeCount) @@ -839,7 +839,7 @@ func TestBodyWrapper_DisableRewinds(t *testing.T) { wrp.DisableRewinds() assert.True(t, wrp.isFullyRead) - assert.Equal(t, "12345678", string(wrp.memBytes)) + assert.Nil(t, wrp.memBytes) assert.Equal(t, 2, body.readCount) assert.Equal(t, 1, body.closeCount) @@ -859,7 +859,7 @@ func TestBodyWrapper_DisableRewinds(t *testing.T) { assert.Equal(t, 0, n) assert.True(t, wrp.isFullyRead) - assert.Equal(t, "12345678", string(wrp.memBytes)) + assert.Nil(t, wrp.memBytes) assert.Equal(t, 2, body.readCount) assert.Equal(t, 1, body.closeCount) @@ -870,7 +870,7 @@ func TestBodyWrapper_DisableRewinds(t *testing.T) { assert.NoError(t, err) assert.True(t, wrp.isFullyRead) - assert.Equal(t, "12345678", string(wrp.memBytes)) + assert.Nil(t, wrp.memBytes) assert.Equal(t, 2, body.readCount) assert.Equal(t, 1, body.closeCount) @@ -966,7 +966,7 @@ func TestBodyWrapper_DisableRewinds(t *testing.T) { assert.Equal(t, 0, n) assert.True(t, wrp.isFullyRead) - assert.Equal(t, "12345678", string(wrp.memBytes)) + assert.Nil(t, wrp.memBytes) assert.Equal(t, 2, body.readCount) assert.Equal(t, 1, body.closeCount) @@ -980,12 +980,85 @@ func TestBodyWrapper_DisableRewinds(t *testing.T) { assert.Error(t, io.EOF, err) assert.Equal(t, 0, n) + assert.True(t, wrp.isFullyRead) + assert.Nil(t, wrp.memBytes) + + assert.Equal(t, 2, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, body.eofCount) + }) + + t.Run("disable rewinds during read from memory before closing", func(t *testing.T) { + body := newMockBody("12345678") + wrp := newBodyWrapper(body, nil) + + b := make([]byte, 8) + var ( + err error + n int + ) + + // first read + n, err = wrp.Read(b) + assert.NoError(t, err) + assert.Equal(t, 8, n) + assert.Equal(t, "12345678", string(b)) + + assert.False(t, wrp.isFullyRead) + assert.Equal(t, "12345678", string(wrp.memBytes)) + + assert.Equal(t, 1, body.readCount) + assert.Equal(t, 0, body.closeCount) + assert.Equal(t, 0, body.eofCount) + + // read eof + n, err = wrp.Read(b) + assert.Error(t, io.EOF, err) + assert.Equal(t, 0, n) + assert.True(t, wrp.isFullyRead) assert.Equal(t, "12345678", string(wrp.memBytes)) assert.Equal(t, 2, body.readCount) assert.Equal(t, 1, body.closeCount) assert.Equal(t, 1, body.eofCount) + + // rewind + wrp.Rewind() + + // new first read + n, err = wrp.Read(b[:4]) + assert.NoError(t, err) + assert.Equal(t, 4, n) + assert.Equal(t, "1234", string(b[:4])) + + assert.True(t, wrp.isFullyRead) + assert.Equal(t, "12345678", string(wrp.memBytes)) + + assert.Equal(t, 2, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, body.eofCount) + + // disable rewinds + wrp.DisableRewinds() + + assert.True(t, wrp.isFullyRead) + assert.Equal(t, "12345678", string(wrp.memBytes)) + + assert.Equal(t, 2, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, body.eofCount) + + // close + err = wrp.Close() + assert.NoError(t, err) + + assert.True(t, wrp.isFullyRead) + assert.Nil(t, wrp.memBytes) + + assert.Equal(t, 2, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, body.eofCount) }) } From 65e65e50fc180e9a8e583231a561a17bbd562ae1 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sun, 1 Oct 2023 12:21:10 +0400 Subject: [PATCH 27/57] Add comments --- body_wrapper.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/body_wrapper.go b/body_wrapper.go index 50c0e2e15..cf733e179 100644 --- a/body_wrapper.go +++ b/body_wrapper.go @@ -190,8 +190,10 @@ func (bw *bodyWrapper) DisableRewinds() { bw.mu.Lock() defer bw.mu.Unlock() - // Free memory if reading from original HTTP response - // or reader has nothing left to read in memory. + // Free memory if reading from original HTTP response, or reading from memory + // and memory reader has nothing left to read. + // Otherwise, i.e. when we're reading from memory, and there is more to read, + // memReadNext() will free memory later when it hits EOF. if !bw.isFullyRead || bw.memReader.Len() == 0 { bw.memReader = bytes.NewReader(nil) bw.memBytes = nil @@ -204,6 +206,8 @@ func (bw *bodyWrapper) memReadNext(p []byte) (int, error) { n, err := bw.memReader.Read(p) if err == io.EOF { + // Free memory after we hit EOF when reading from memory, + // if rewinds were disabled while we were reading from it. if bw.isRewindDisabled { bw.memReader = bytes.NewReader(nil) bw.memBytes = nil From 8d90e3be284650e24c0b9814a587e000172396c6 Mon Sep 17 00:00:00 2001 From: AnandaIlyasa Date: Fri, 28 Apr 2023 01:11:48 +0700 Subject: [PATCH 28/57] Add additional TestBodyWrapper_Rewind subtests --- body_wrapper_test.go | 139 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) diff --git a/body_wrapper_test.go b/body_wrapper_test.go index a04ed9645..5baf3d775 100644 --- a/body_wrapper_test.go +++ b/body_wrapper_test.go @@ -137,6 +137,145 @@ func TestBodyWrapper_Rewind(t *testing.T) { assert.Equal(t, 1, body.closeCount) assert.Equal(t, 1, cancelCount) }) + + t.Run("readall - rewind - readall", func(t *testing.T) { + body := newMockBody("test_body") + + cancelCount := 0 + cancelFn := func() { + cancelCount++ + } + + wrp := newBodyWrapper(body, cancelFn) + + b, err := io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + readCount := body.readCount + assert.NotEqual(t, 0, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, cancelCount) + + wrp.Rewind() + + b, err = io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + assert.Equal(t, readCount, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, cancelCount) + }) + + t.Run("close - rewind - readall", func(t *testing.T) { + body := newMockBody("test_body") + + cancelCount := 0 + cancelFn := func() { + cancelCount++ + } + + wrp := newBodyWrapper(body, cancelFn) + + err := wrp.Close() + assert.NoError(t, err) + + wrp.Rewind() + + b, err := io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + assert.NotEqual(t, 0, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, cancelCount) + }) + + t.Run("rewind - readall - rewind - readall", func(t *testing.T) { + body := newMockBody("test_body") + + cancelCount := 0 + cancelFn := func() { + cancelCount++ + } + + wrp := newBodyWrapper(body, cancelFn) + + wrp.Rewind() + + b, err := io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + readCount := body.readCount + assert.NotEqual(t, 0, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, cancelCount) + + wrp.Rewind() + + b, err = io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + assert.Equal(t, readCount, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, cancelCount) + }) + + t.Run("rewind - close - rewind - readall", func(t *testing.T) { + body := newMockBody("test_body") + + cancelCount := 0 + cancelFn := func() { + cancelCount++ + } + + wrp := newBodyWrapper(body, cancelFn) + + wrp.Rewind() + + err := wrp.Close() + assert.NoError(t, err) + + wrp.Rewind() + + b, err := io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + assert.NotEqual(t, 0, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, cancelCount) + }) + + t.Run("readall - close - rewind (loop)", func(t *testing.T) { + body := newMockBody("test_body") + + cancelCount := 0 + cancelFn := func() { + cancelCount++ + } + + wrp := newBodyWrapper(body, cancelFn) + + n := 3 + for i := 0; i < n; i++ { + b, err := io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + assert.NotEqual(t, 0, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, cancelCount) + + err = wrp.Close() + assert.NoError(t, err) + + wrp.Rewind() + } + }) } func TestBodyWrapper_GetBody(t *testing.T) { From c126d8b36abc2cb1e95d3afaab91c1d2c9347bfa Mon Sep 17 00:00:00 2001 From: vasundhara785 <59416677+vasundhara785@users.noreply.github.com> Date: Sun, 1 Oct 2023 15:02:09 +0530 Subject: [PATCH 29/57] Added TestFormatter_FailureContext (#418) Co-authored-by: Abhishek --- formatter_test.go | 73 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/formatter_test.go b/formatter_test.go index 9ce0eb8ee..5ee956e82 100644 --- a/formatter_test.go +++ b/formatter_test.go @@ -406,6 +406,79 @@ func TestFormatter_FailureReference(t *testing.T) { }) } } +func TestFormatter_FailureContext(t *testing.T) { + cases := []struct { + name string + assertionType AssertionType + testName string + requestName string + path []string + aliasedPath []string + }{ + { + name: "Assert Equal", + assertionType: AssertEqual, + testName: t.Name(), + requestName: "RequestName", + path: []string{"GET"}, + aliasedPath: []string{"ALIASGET"}, + }, + { + name: "Assert DisableNames", + assertionType: AssertEqual, + path: []string{"GET"}, + aliasedPath: []string{"ALIASGET"}, + }, + { + name: "Assert DisablePaths", + assertionType: AssertEqual, + testName: t.Name(), + requestName: "RequestName", + }, + { + name: "Assert DisableAliases", + assertionType: AssertEqual, + testName: t.Name(), + requestName: "RequestName", + path: []string{"GET"}, + aliasedPath: []string{"ALIASGET"}, + }, + } + + ctx := &AssertionContext{ + TestName: t.Name(), + RequestName: "RequestName", + Path: []string{"GET"}, + AliasedPath: []string{"ALIASGET"}, + } + var fd *FormatData + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + fl := &AssertionFailure{ + Type: tc.assertionType, + } + if tc.name == "Assert Equal" { + df := &DefaultFormatter{} + fd = df.buildFormatData(ctx, fl) + assert.Equal(t, tc.aliasedPath, fd.AssertPath) + } else if tc.name == "Assert DisableNames" { + df := &DefaultFormatter{DisableNames: true} + fd = df.buildFormatData(ctx, fl) + assert.Equal(t, tc.aliasedPath, fd.AssertPath) + } else if tc.name == "Assert DisablePaths" { + df := &DefaultFormatter{DisablePaths: true} + fd = df.buildFormatData(ctx, fl) + assert.Equal(t, tc.path, fd.AssertPath) + } else if tc.name == "Assert DisableAliases" { + df := &DefaultFormatter{DisableAliases: true} + fd = df.buildFormatData(ctx, fl) + assert.Equal(t, tc.path, fd.AssertPath) + } + assert.Equal(t, tc.requestName, fd.RequestName) + assert.Equal(t, tc.testName, fd.TestName) + }) + } +} func TestFormatter_FailureDelta(t *testing.T) { cases := []struct { From 57516e3f9c0f7b0ab10b877eb335789e3af23785 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sun, 1 Oct 2023 13:31:27 +0400 Subject: [PATCH 30/57] Rework TestFormatter_FailureContext --- formatter_test.go | 141 ++++++++++++++++++++++------------------------ 1 file changed, 68 insertions(+), 73 deletions(-) diff --git a/formatter_test.go b/formatter_test.go index 5ee956e82..a78d1d255 100644 --- a/formatter_test.go +++ b/formatter_test.go @@ -406,79 +406,6 @@ func TestFormatter_FailureReference(t *testing.T) { }) } } -func TestFormatter_FailureContext(t *testing.T) { - cases := []struct { - name string - assertionType AssertionType - testName string - requestName string - path []string - aliasedPath []string - }{ - { - name: "Assert Equal", - assertionType: AssertEqual, - testName: t.Name(), - requestName: "RequestName", - path: []string{"GET"}, - aliasedPath: []string{"ALIASGET"}, - }, - { - name: "Assert DisableNames", - assertionType: AssertEqual, - path: []string{"GET"}, - aliasedPath: []string{"ALIASGET"}, - }, - { - name: "Assert DisablePaths", - assertionType: AssertEqual, - testName: t.Name(), - requestName: "RequestName", - }, - { - name: "Assert DisableAliases", - assertionType: AssertEqual, - testName: t.Name(), - requestName: "RequestName", - path: []string{"GET"}, - aliasedPath: []string{"ALIASGET"}, - }, - } - - ctx := &AssertionContext{ - TestName: t.Name(), - RequestName: "RequestName", - Path: []string{"GET"}, - AliasedPath: []string{"ALIASGET"}, - } - var fd *FormatData - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - fl := &AssertionFailure{ - Type: tc.assertionType, - } - if tc.name == "Assert Equal" { - df := &DefaultFormatter{} - fd = df.buildFormatData(ctx, fl) - assert.Equal(t, tc.aliasedPath, fd.AssertPath) - } else if tc.name == "Assert DisableNames" { - df := &DefaultFormatter{DisableNames: true} - fd = df.buildFormatData(ctx, fl) - assert.Equal(t, tc.aliasedPath, fd.AssertPath) - } else if tc.name == "Assert DisablePaths" { - df := &DefaultFormatter{DisablePaths: true} - fd = df.buildFormatData(ctx, fl) - assert.Equal(t, tc.path, fd.AssertPath) - } else if tc.name == "Assert DisableAliases" { - df := &DefaultFormatter{DisableAliases: true} - fd = df.buildFormatData(ctx, fl) - assert.Equal(t, tc.path, fd.AssertPath) - } - assert.Equal(t, tc.requestName, fd.RequestName) - assert.Equal(t, tc.testName, fd.TestName) - }) - } -} func TestFormatter_FailureDelta(t *testing.T) { cases := []struct { @@ -606,6 +533,74 @@ func TestFormatter_FailureErrors(t *testing.T) { } } +func TestFormatter_FailureContext(t *testing.T) { + ctx := &AssertionContext{ + TestName: "MyTestName", + RequestName: "MyRequestName", + Path: []string{"MyPath"}, + AliasedPath: []string{"MyAliasedPath"}, + } + + cases := []struct { + name string + fmt DefaultFormatter + check func(t *testing.T, data *FormatData) + }{ + { + name: "default options", + fmt: DefaultFormatter{}, + check: func(t *testing.T, fd *FormatData) { + assert.Equal(t, "MyTestName", fd.TestName) + assert.Equal(t, "MyRequestName", fd.RequestName) + assert.Equal(t, []string{"MyAliasedPath"}, fd.AssertPath) + }, + }, + { + name: "DisableNames", + fmt: DefaultFormatter{ + DisableNames: true, + }, + check: func(t *testing.T, fd *FormatData) { + assert.Equal(t, "", fd.TestName) + assert.Equal(t, "", fd.RequestName) + assert.Equal(t, []string{"MyAliasedPath"}, fd.AssertPath) + }, + }, + { + name: "DisablePaths", + fmt: DefaultFormatter{ + DisablePaths: true, + }, + check: func(t *testing.T, fd *FormatData) { + assert.Equal(t, "MyTestName", fd.TestName) + assert.Equal(t, "MyRequestName", fd.RequestName) + assert.Equal(t, []string(nil), fd.AssertPath) + }, + }, + { + name: "DisableAliases", + fmt: DefaultFormatter{ + DisableAliases: true, + }, + check: func(t *testing.T, fd *FormatData) { + assert.Equal(t, "MyTestName", fd.TestName) + assert.Equal(t, "MyRequestName", fd.RequestName) + assert.Equal(t, []string{"MyPath"}, fd.AssertPath) + }, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + fl := &AssertionFailure{ + Type: AssertEqual, + } + fd := tc.fmt.buildFormatData(ctx, fl) + tc.check(t, fd) + }) + } +} + func TestFormatter_FloatFormat(t *testing.T) { cases := []struct { name string From 089b33df204b9b2961aaec07beed076c53884907 Mon Sep 17 00:00:00 2001 From: David Minkovski Date: Wed, 26 Apr 2023 17:15:06 +0200 Subject: [PATCH 31/57] Added func colorjson for actual value and delta in defaultFailureTemplate --- formatter.go | 32 ++++++++++++++++++++++++++++++-- go.mod | 7 ++++--- go.sum | 9 +++++++++ 3 files changed, 43 insertions(+), 5 deletions(-) diff --git a/formatter.go b/formatter.go index 6fe0dd281..61c375cb6 100644 --- a/formatter.go +++ b/formatter.go @@ -16,6 +16,7 @@ import ( "testing" "text/template" + "github.com/TylerBrock/colorjson" "github.com/fatih/color" "github.com/mattn/go-isatty" "github.com/mitchellh/go-wordwrap" @@ -1044,6 +1045,33 @@ var defaultTemplateFuncs = template.FuncMap{ return sb.String() }, + "colorjson": func(enable bool, stringColor, input string) string { + if !enable { + return input + } + var colorObj map[string]interface{} + err := json.Unmarshal([]byte(input), &colorObj) + if err != nil { + return input + } + colorInput := "HiMagenta" + if _, ok := defaultColors[stringColor]; ok { + colorInput = stringColor + } + cyanColor := color.New(defaultColors["Cyan"]) + + formatter := colorjson.NewFormatter() + formatter.StringColor = color.New(defaultColors[colorInput]) + formatter.NumberColor = cyanColor + formatter.BoolColor = cyanColor + formatter.NullColor = cyanColor + + s, err := formatter.Marshal(colorObj) + if err != nil { + return input + } + return string(s) + }, } var defaultSuccessTemplate = `[OK] {{ join .LineWidth .AssertPath }}` @@ -1097,7 +1125,7 @@ assertion: {{- if .HaveActual }} actual value: -{{ .Actual | indent | color .EnableColors "HiMagenta" }} +{{ .Actual | indent | colorjson .EnableColors "HiMagenta"}} {{- end -}} {{- if .HaveReference }} @@ -1107,7 +1135,7 @@ reference value: {{- if .HaveDelta }} allowed delta: -{{ .Delta | indent | color .EnableColors "HiMagenta" }} +{{ .Delta | indent | colorjson .EnableColors "Cyan" }} {{- end -}} {{- if .HaveDiff }} diff --git a/go.mod b/go.mod index df12dabc9..d54e0d28b 100644 --- a/go.mod +++ b/go.mod @@ -5,13 +5,13 @@ go 1.19 require ( github.com/ajg/form v1.5.1 github.com/fasthttp/websocket v1.4.3-rc.6 - github.com/fatih/color v1.13.0 + github.com/fatih/color v1.15.0 github.com/fatih/structs v1.1.0 github.com/gobwas/glob v0.2.3 github.com/google/go-querystring v1.1.0 github.com/gorilla/websocket v1.4.2 github.com/imkira/go-interpol v1.1.0 - github.com/mattn/go-isatty v0.0.17 + github.com/mattn/go-isatty v0.0.18 github.com/mitchellh/go-wordwrap v1.0.1 github.com/sanity-io/litter v1.5.5 github.com/stretchr/testify v1.5.0 @@ -24,6 +24,7 @@ require ( ) require ( + github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 // indirect github.com/andybalholm/brotli v1.0.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/klauspost/compress v1.15.0 // indirect @@ -38,6 +39,6 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect github.com/yudai/pp v2.0.1+incompatible // indirect - golang.org/x/sys v0.5.0 // indirect + golang.org/x/sys v0.7.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index 48ee22b86..034d36f6b 100644 --- a/go.sum +++ b/go.sum @@ -1,3 +1,5 @@ +github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 h1:ZBbLwSJqkHBuFDA6DUhhse0IGJ7T5bemHyNILUjvOq4= +github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2/go.mod h1:VSw57q4QFiWDbRnjdX8Cb3Ow0SFncRw+bA/ofY6Q83w= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= @@ -11,6 +13,8 @@ github.com/fasthttp/websocket v1.4.3-rc.6 h1:omHqsl8j+KXpmzRjF8bmzOSYJ8GnS0E3efi github.com/fasthttp/websocket v1.4.3-rc.6/go.mod h1:43W9OM2T8FeXpCWMsBd9Cb7nE2CACNqNvCqQCoty/Lc= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= +github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -40,6 +44,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= +github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -122,6 +128,9 @@ golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From 0895176e459b63405c8ea4dcf0cb2ede8e9dc4a3 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Mon, 2 Oct 2023 15:05:03 +0400 Subject: [PATCH 32/57] Refine colorjson implementation --- formatter.go | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/formatter.go b/formatter.go index 61c375cb6..dc387bb9b 100644 --- a/formatter.go +++ b/formatter.go @@ -1045,32 +1045,36 @@ var defaultTemplateFuncs = template.FuncMap{ return sb.String() }, - "colorjson": func(enable bool, stringColor, input string) string { + "colorjson": func(enable bool, colorName, input string) string { if !enable { return input } - var colorObj map[string]interface{} - err := json.Unmarshal([]byte(input), &colorObj) - if err != nil { - return input + + fallbackColor := color.Reset + if attr, ok := defaultColors[colorName]; ok { + fallbackColor = attr } - colorInput := "HiMagenta" - if _, ok := defaultColors[stringColor]; ok { - colorInput = stringColor + + var parsedInput interface{} + err := json.Unmarshal([]byte(input), &parsedInput) + if err != nil { + return color.New(fallbackColor).Sprint(input) } - cyanColor := color.New(defaultColors["Cyan"]) formatter := colorjson.NewFormatter() - formatter.StringColor = color.New(defaultColors[colorInput]) - formatter.NumberColor = cyanColor - formatter.BoolColor = cyanColor - formatter.NullColor = cyanColor - - s, err := formatter.Marshal(colorObj) + formatter.KeyColor = color.New(color.Reset) + formatter.StringColor = color.New(defaultColors["HiMagenta"]) + formatter.NumberColor = color.New(defaultColors["Cyan"]) + formatter.BoolColor = color.New(defaultColors["Cyan"]) + formatter.NullColor = color.New(defaultColors["Cyan"]) + formatter.Indent = 2 + + b, err := formatter.Marshal(parsedInput) if err != nil { - return input + return color.New(fallbackColor).Sprint(input) } - return string(s) + + return string(b) }, } @@ -1119,23 +1123,23 @@ assertion: {{- else }}expected {{- end }} {{ .ExpectedKind }}: {{- range $n, $exp := .Expected }} -{{ $exp | indent | color $.EnableColors "HiMagenta" }} +{{ $exp | colorjson $.EnableColors "HiMagenta" | indent }} {{- end -}} {{- end -}} {{- if .HaveActual }} actual value: -{{ .Actual | indent | colorjson .EnableColors "HiMagenta"}} +{{ .Actual | colorjson .EnableColors "HiMagenta" | indent }} {{- end -}} {{- if .HaveReference }} reference value: -{{ .Reference | indent | color .EnableColors "HiMagenta" }} +{{ .Reference | colorjson .EnableColors "HiMagenta" | indent }} {{- end -}} {{- if .HaveDelta }} allowed delta: -{{ .Delta | indent | colorjson .EnableColors "Cyan" }} +{{ .Delta | indent | color .EnableColors "Cyan" }} {{- end -}} {{- if .HaveDiff }} From da3c675ad36d756efc42bc5e2ee47a9e5c915bf2 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Mon, 2 Oct 2023 15:05:11 +0400 Subject: [PATCH 33/57] Update deps --- go.mod | 3 ++- go.sum | 14 ++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index d54e0d28b..e9db14134 100644 --- a/go.mod +++ b/go.mod @@ -3,6 +3,7 @@ module github.com/gavv/httpexpect/v2 go 1.19 require ( + github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 github.com/ajg/form v1.5.1 github.com/fasthttp/websocket v1.4.3-rc.6 github.com/fatih/color v1.15.0 @@ -24,9 +25,9 @@ require ( ) require ( - github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 // indirect github.com/andybalholm/brotli v1.0.4 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f // indirect github.com/klauspost/compress v1.15.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/onsi/ginkgo v1.10.1 // indirect diff --git a/go.sum b/go.sum index 034d36f6b..e46ba1130 100644 --- a/go.sum +++ b/go.sum @@ -11,8 +11,6 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/fasthttp/websocket v1.4.3-rc.6 h1:omHqsl8j+KXpmzRjF8bmzOSYJ8GnS0E3efi1wYT+niY= github.com/fasthttp/websocket v1.4.3-rc.6/go.mod h1:43W9OM2T8FeXpCWMsBd9Cb7nE2CACNqNvCqQCoty/Lc= -github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= @@ -29,6 +27,8 @@ github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17 github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f h1:7LYC+Yfkj3CTRcShK0KOL/w6iTiKyqqBA9a41Wnggw8= +github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f/go.mod h1:pFlLw2CfqZiIBOx6BuCeRLCrfxBJipTY0nIOF/VbGcI= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= @@ -36,14 +36,9 @@ github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/C github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.0 h1:xqfchp4whNFxn5A4XFyyYtitiWI8Hy5EW59jEwcyL6U= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.18 h1:DOKFKCQ7FNG2L1rbrmstDN4QVRdS89Nkh85u68Uwp98= github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= @@ -115,19 +110,14 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From 4ba32bda6f80833128655773050bce91db86e54c Mon Sep 17 00:00:00 2001 From: tymnec Date: Sat, 8 Apr 2023 09:56:06 +0530 Subject: [PATCH 34/57] :rocket: Improved bodyWrapper GetBody test --- body_wrapper_test.go | 109 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) diff --git a/body_wrapper_test.go b/body_wrapper_test.go index 5baf3d775..5ac362b8b 100644 --- a/body_wrapper_test.go +++ b/body_wrapper_test.go @@ -301,6 +301,115 @@ func TestBodyWrapper_GetBody(t *testing.T) { assert.NotEqual(t, 0, body.readCount) assert.Equal(t, 1, body.closeCount) }) + + t.Run("start reading body, then call GetBody", func(t *testing.T) { + body := newMockBody("test_body") + + wrp := newBodyWrapper(body, nil) + + // Start reading body + var buf bytes.Buffer + tee := io.TeeReader(wrp, &buf) + _, err := io.Copy(ioutil.Discard, tee) + assert.NoError(t, err) + + // Call GetBody and read from it + rd, err := wrp.GetBody() + assert.NoError(t, err) + + b, err := ioutil.ReadAll(rd) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + // Check body read count and close count + assert.Equal(t, 2, body.readCount) + assert.Equal(t, 1, body.closeCount) + }) + + t.Run("rewind - start reading body, then call GetBody", func(t *testing.T) { + body := newMockBody("test_body") + + cancelCount := 0 + cancelFn := func() { + cancelCount++ + } + + wrp := newBodyWrapper(body, cancelFn) + + wrp.Rewind() + rd, err := wrp.GetBody() + assert.NoError(t, err) + + // Rewind again to ensure that the body can be read multiple times + wrp.Rewind() + + // Read the entire body to ensure it is fully consumed + b, err := ioutil.ReadAll(rd) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + assert.Equal(t, 2, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, cancelCount) + }) + + t.Run("rewind - read body until EOF (using io.ReadAll), then call GetBody", func(t *testing.T) { + body := newMockBody("test_body") + + cancelCount := 0 + cancelFn := func() { + cancelCount++ + } + + wrp := newBodyWrapper(body, cancelFn) + + wrp.Rewind() + rd, err := wrp.GetBody() + assert.NoError(t, err) + // rewind the body again to make the entire body available to be read + wrp.Rewind() + + b, err := ioutil.ReadAll(rd) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + assert.Equal(t, 2, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, cancelCount) + }) + + t.Run("rewind - read body until EOF (using io.ReadAll), then call Close, then call GetBody", func(t *testing.T) { + body := newMockBody("test_body") + + cancelCount := 0 + cancelFn := func() { + cancelCount++ + } + + wrp := newBodyWrapper(body, cancelFn) + + wrp.Rewind() + rd, err := wrp.GetBody() + assert.NoError(t, err) + // rewind the body again to make the entire body available to be read + wrp.Rewind() + + // close the wrapper + err = wrp.Close() + assert.NoError(t, err) + + // call GetBody after Close should not return an error + _, err = wrp.GetBody() + assert.NoError(t, err) + + b, err := ioutil.ReadAll(rd) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + assert.Equal(t, 2, body.readCount) + assert.Equal(t, 1, body.closeCount) + assert.Equal(t, 1, cancelCount) + }) } func TestBodyWrapper_OneError(t *testing.T) { From aeaad01665cbefc03490de9cf250bd664bda36e5 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Mon, 2 Oct 2023 15:40:04 +0400 Subject: [PATCH 35/57] Refine TestBodyWrapper_GetBody --- body_wrapper_test.go | 166 +++++++++++++++++++++++++++++++------------ 1 file changed, 120 insertions(+), 46 deletions(-) diff --git a/body_wrapper_test.go b/body_wrapper_test.go index 5ac362b8b..c80dd71ff 100644 --- a/body_wrapper_test.go +++ b/body_wrapper_test.go @@ -279,7 +279,7 @@ func TestBodyWrapper_Rewind(t *testing.T) { } func TestBodyWrapper_GetBody(t *testing.T) { - t.Run("independent readers", func(t *testing.T) { + t.Run("parallel readers", func(t *testing.T) { body := newMockBody("test_body") wrp := newBodyWrapper(body, nil) @@ -302,113 +302,187 @@ func TestBodyWrapper_GetBody(t *testing.T) { assert.Equal(t, 1, body.closeCount) }) - t.Run("start reading body, then call GetBody", func(t *testing.T) { + t.Run("start read - get body - finish read", func(t *testing.T) { body := newMockBody("test_body") wrp := newBodyWrapper(body, nil) // Start reading body - var buf bytes.Buffer - tee := io.TeeReader(wrp, &buf) - _, err := io.Copy(ioutil.Discard, tee) + b := make([]byte, len("test")) + n, err := wrp.Read(b) + assert.Equal(t, len(b), n) assert.NoError(t, err) + assert.Equal(t, "test", string(b)) // Call GetBody and read from it rd, err := wrp.GetBody() assert.NoError(t, err) - - b, err := ioutil.ReadAll(rd) + b, err = io.ReadAll(rd) assert.NoError(t, err) assert.Equal(t, "test_body", string(b)) + // Finish reading body + b, err = io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "_body", string(b)) + // Check body read count and close count - assert.Equal(t, 2, body.readCount) + assert.NotEqual(t, 0, body.readCount) assert.Equal(t, 1, body.closeCount) }) - t.Run("rewind - start reading body, then call GetBody", func(t *testing.T) { + t.Run("start read - rewind - get body - read again", func(t *testing.T) { body := newMockBody("test_body") - cancelCount := 0 - cancelFn := func() { - cancelCount++ - } + wrp := newBodyWrapper(body, nil) - wrp := newBodyWrapper(body, cancelFn) + // Start reading body + b := make([]byte, len("test")) + n, err := wrp.Read(b) + assert.Equal(t, len(b), n) + assert.NoError(t, err) + assert.Equal(t, "test", string(b)) + // Rewind wrp.Rewind() + + // Call GetBody and read from it rd, err := wrp.GetBody() assert.NoError(t, err) + b, err = io.ReadAll(rd) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) - // Rewind again to ensure that the body can be read multiple times - wrp.Rewind() + // Re-read body until EOF + b, err = io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + // Check body read count and close count + assert.NotEqual(t, 0, body.readCount) + assert.Equal(t, 1, body.closeCount) + }) + + t.Run("read all - get body - read again", func(t *testing.T) { + body := newMockBody("test_body") - // Read the entire body to ensure it is fully consumed - b, err := ioutil.ReadAll(rd) + wrp := newBodyWrapper(body, nil) + + // Read body until EOF + b, err := io.ReadAll(wrp) assert.NoError(t, err) assert.Equal(t, "test_body", string(b)) - assert.Equal(t, 2, body.readCount) + // Call GetBody and read from it + rd, err := wrp.GetBody() + assert.NoError(t, err) + b, err = io.ReadAll(rd) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + // Try to read more + b, err = io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "", string(b)) + + // Check body read count and close count + assert.NotEqual(t, 0, body.readCount) assert.Equal(t, 1, body.closeCount) - assert.Equal(t, 1, cancelCount) }) - t.Run("rewind - read body until EOF (using io.ReadAll), then call GetBody", func(t *testing.T) { + t.Run("read all - rewind - get body - read again", func(t *testing.T) { body := newMockBody("test_body") - cancelCount := 0 - cancelFn := func() { - cancelCount++ - } + wrp := newBodyWrapper(body, nil) - wrp := newBodyWrapper(body, cancelFn) + // Read body until EOF + b, err := io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + // Rewind wrp.Rewind() + + // Call GetBody and read from it rd, err := wrp.GetBody() assert.NoError(t, err) - // rewind the body again to make the entire body available to be read - wrp.Rewind() + b, err = io.ReadAll(rd) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) - b, err := ioutil.ReadAll(rd) + // Re-read body until EOF + b, err = io.ReadAll(wrp) assert.NoError(t, err) assert.Equal(t, "test_body", string(b)) - assert.Equal(t, 2, body.readCount) + // Check body read count and close count + assert.NotEqual(t, 0, body.readCount) assert.Equal(t, 1, body.closeCount) - assert.Equal(t, 1, cancelCount) }) - t.Run("rewind - read body until EOF (using io.ReadAll), then call Close, then call GetBody", func(t *testing.T) { + t.Run("read all - close - get body - read again", func(t *testing.T) { body := newMockBody("test_body") - cancelCount := 0 - cancelFn := func() { - cancelCount++ - } + wrp := newBodyWrapper(body, nil) - wrp := newBodyWrapper(body, cancelFn) + // Read body until EOF + b, err := io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) - wrp.Rewind() + // Close + err = wrp.Close() + assert.NoError(t, err) + + // Call GetBody and read from it rd, err := wrp.GetBody() assert.NoError(t, err) - // rewind the body again to make the entire body available to be read - wrp.Rewind() + b, err = io.ReadAll(rd) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) - // close the wrapper + // Try to read more + b, err = io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "", string(b)) + + // Check body read count and close count + assert.NotEqual(t, 0, body.readCount) + assert.Equal(t, 1, body.closeCount) + }) + + t.Run("read all - close - rewind - get body - read again", func(t *testing.T) { + body := newMockBody("test_body") + + wrp := newBodyWrapper(body, nil) + + // Read body until EOF + b, err := io.ReadAll(wrp) + assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) + + // Close err = wrp.Close() assert.NoError(t, err) - // call GetBody after Close should not return an error - _, err = wrp.GetBody() + // Rewind + wrp.Rewind() + + // Call GetBody and read from it + rd, err := wrp.GetBody() + assert.NoError(t, err) + b, err = io.ReadAll(rd) assert.NoError(t, err) + assert.Equal(t, "test_body", string(b)) - b, err := ioutil.ReadAll(rd) + // Try to read more + b, err = io.ReadAll(wrp) assert.NoError(t, err) assert.Equal(t, "test_body", string(b)) - assert.Equal(t, 2, body.readCount) + // Check body read count and close count + assert.NotEqual(t, 0, body.readCount) assert.Equal(t, 1, body.closeCount) - assert.Equal(t, 1, cancelCount) }) } From 82d3394f8c539bd774d418fe136548b9c5ea4ad5 Mon Sep 17 00:00:00 2001 From: Darrel Idiagbor Date: Mon, 1 May 2023 16:06:51 +0200 Subject: [PATCH 36/57] feat: TestReporterAndAssertionHandler implemented --- expect_test.go | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/expect_test.go b/expect_test.go index b7f2fc9b0..98912b5f7 100644 --- a/expect_test.go +++ b/expect_test.go @@ -763,3 +763,67 @@ func TestExpect_Adapters(t *testing.T) { assert.Contains(t, message, "test logger called") }) } + + +func TestReporterAndAssertionHandler(t *testing.T) { + mainRep := newMockReporter(t) + mainAssertionHandler := &mockAssertionHandler{} + + config := Config{ + BaseURL: "http://example.com", + Reporter: mainRep, + } + + assertionConfig := Config{ + BaseURL: "http://example.com", + AssertionHandler: mainAssertionHandler, + } + + cases := []struct{ + name string + config Config + hasReporter bool + wantEqual chainResult + }{ + { + name: "Response reported failure with reporter", + config: config, + hasReporter: true, + wantEqual: failure, + }, + { + name: "Response reported failure with assertion handler", + config: assertionConfig, + hasReporter: true, + wantEqual: failure, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + subRep := newMockReporter(t); + subAssertionHandler := &mockAssertionHandler{} + var req2 *Request + + req1 := NewRequest(config, "GET", "/") + + if tc.hasReporter { + req2 = NewRequest(config, "GET", "/2").WithReporter(subRep) + } else { + req2 = NewRequest(config, "GET", "/2").WithAssertionHandler(subAssertionHandler) + } + + resp1 := req1.Expect().Status(200) + resp2 := req2.Expect().Status(200) + + // Make some assertion that fails on both responses + resp1.JSON().Object().Value("foo").chain.assert(t, failure) + resp2.JSON().Object().Value("foo").chain.assert(t, failure) + + resp1.chain.assert(t, tc.wantEqual) + resp2.chain.assert(t, tc.wantEqual) + }) + } + +} + From f99fd6335988302f94fac7732ca736c861c54d6e Mon Sep 17 00:00:00 2001 From: Darrel Idiagbor Date: Mon, 1 May 2023 16:10:12 +0200 Subject: [PATCH 37/57] fix: linting and formatting run --- expect_test.go | 98 +++++++++++++++++++++++++------------------------- 1 file changed, 48 insertions(+), 50 deletions(-) diff --git a/expect_test.go b/expect_test.go index 98912b5f7..21919fa5d 100644 --- a/expect_test.go +++ b/expect_test.go @@ -764,66 +764,64 @@ func TestExpect_Adapters(t *testing.T) { }) } - func TestReporterAndAssertionHandler(t *testing.T) { mainRep := newMockReporter(t) mainAssertionHandler := &mockAssertionHandler{} - config := Config{ - BaseURL: "http://example.com", - Reporter: mainRep, - } + config := Config{ + BaseURL: "http://example.com", + Reporter: mainRep, + } assertionConfig := Config{ - BaseURL: "http://example.com", + BaseURL: "http://example.com", AssertionHandler: mainAssertionHandler, } - cases := []struct{ - name string - config Config - hasReporter bool - wantEqual chainResult - }{ - { - name: "Response reported failure with reporter", - config: config, - hasReporter: true, - wantEqual: failure, - }, - { - name: "Response reported failure with assertion handler", - config: assertionConfig, - hasReporter: true, - wantEqual: failure, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - subRep := newMockReporter(t); - subAssertionHandler := &mockAssertionHandler{} - var req2 *Request - - req1 := NewRequest(config, "GET", "/") - - if tc.hasReporter { - req2 = NewRequest(config, "GET", "/2").WithReporter(subRep) - } else { - req2 = NewRequest(config, "GET", "/2").WithAssertionHandler(subAssertionHandler) - } + cases := []struct { + name string + config Config + hasReporter bool + wantEqual chainResult + }{ + { + name: "Response reported failure with reporter", + config: config, + hasReporter: true, + wantEqual: failure, + }, + { + name: "Response reported failure with assertion handler", + config: assertionConfig, + hasReporter: true, + wantEqual: failure, + }, + } - resp1 := req1.Expect().Status(200) - resp2 := req2.Expect().Status(200) + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + subRep := newMockReporter(t) + subAssertionHandler := &mockAssertionHandler{} + var req2 *Request - // Make some assertion that fails on both responses - resp1.JSON().Object().Value("foo").chain.assert(t, failure) - resp2.JSON().Object().Value("foo").chain.assert(t, failure) + req1 := NewRequest(config, "GET", "/") - resp1.chain.assert(t, tc.wantEqual) - resp2.chain.assert(t, tc.wantEqual) - }) - } - -} + if tc.hasReporter { + req2 = NewRequest(config, "GET", "/2").WithReporter(subRep) + } else { + req2 = NewRequest(config, "GET", "/2").WithAssertionHandler(subAssertionHandler) + } + + resp1 := req1.Expect().Status(200) + resp2 := req2.Expect().Status(200) + // Make some assertion that fails on both responses + resp1.JSON().Object().Value("foo").chain.assert(t, failure) + resp2.JSON().Object().Value("foo").chain.assert(t, failure) + + resp1.chain.assert(t, tc.wantEqual) + resp2.chain.assert(t, tc.wantEqual) + }) + } + +} From 50355b80b56e935f740cc971d01df6023aebaf2f Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Tue, 3 Oct 2023 12:20:44 +0400 Subject: [PATCH 38/57] Rework inheritance test --- expect_test.go | 142 ++++++++++++++++++++++++++++--------------------- mocks_test.go | 8 +-- 2 files changed, 85 insertions(+), 65 deletions(-) diff --git a/expect_test.go b/expect_test.go index 21919fa5d..585a0a1b3 100644 --- a/expect_test.go +++ b/expect_test.go @@ -465,6 +465,86 @@ func TestExpect_Propagation(t *testing.T) { }) } +func TestExpect_Inheritance(t *testing.T) { + t.Run("reporter", func(t *testing.T) { + rootReporter := newMockReporter(t) + req2Reporter := newMockReporter(t) + + e := WithConfig(Config{ + BaseURL: "http://example.com", + Client: &mockClient{}, + Reporter: rootReporter, + }) + + req1 := e.GET("/") + req2 := e.GET("/") + + req2.WithReporter(req2Reporter) + + // So far OK + req1.chain.assert(t, success) + req2.chain.assert(t, success) + + resp1 := req1.Expect() + resp2 := req2.Expect() + + // So far OK + resp1.chain.assert(t, success) + resp2.chain.assert(t, success) + + // Failure on resp1 should be reported to rootReporter, + // which was inherited from config + resp1.JSON().Object().Value("foo").chain.assert(t, failure) + assert.Equal(t, 1, rootReporter.reportCalled) + assert.Equal(t, 0, req2Reporter.reportCalled) + + // Failure on resp2 should be reported to req2Reporter, + // which was inherited from req2 + resp2.JSON().Object().Value("foo").chain.assert(t, failure) + assert.Equal(t, 1, rootReporter.reportCalled) + assert.Equal(t, 1, req2Reporter.reportCalled) + }) + + t.Run("assertion handler", func(t *testing.T) { + rootHandler := &mockAssertionHandler{} + req2Handler := &mockAssertionHandler{} + + e := WithConfig(Config{ + BaseURL: "http://example.com", + Client: &mockClient{}, + AssertionHandler: rootHandler, + }) + + req1 := e.GET("/") + req2 := e.GET("/") + + req2.WithAssertionHandler(req2Handler) + + // So far OK + req1.chain.assert(t, success) + req2.chain.assert(t, success) + + resp1 := req1.Expect() + resp2 := req2.Expect() + + // So far OK + resp1.chain.assert(t, success) + resp2.chain.assert(t, success) + + // Failure on resp1 should be reported to rootReporter, + // which was inherited from config + resp1.JSON().Object().Value("foo").chain.assert(t, failure) + assert.Equal(t, 1, rootHandler.failureCalled) + assert.Equal(t, 0, req2Handler.failureCalled) + + // Failure on resp2 should be reported to req2Reporter, + // which was inherited from req2 + resp2.JSON().Object().Value("foo").chain.assert(t, failure) + assert.Equal(t, 1, rootHandler.failureCalled) + assert.Equal(t, 1, req2Handler.failureCalled) + }) +} + func TestExpect_RequestFactory(t *testing.T) { t.Run("default factory", func(t *testing.T) { e := WithConfig(Config{ @@ -763,65 +843,3 @@ func TestExpect_Adapters(t *testing.T) { assert.Contains(t, message, "test logger called") }) } - -func TestReporterAndAssertionHandler(t *testing.T) { - mainRep := newMockReporter(t) - mainAssertionHandler := &mockAssertionHandler{} - - config := Config{ - BaseURL: "http://example.com", - Reporter: mainRep, - } - - assertionConfig := Config{ - BaseURL: "http://example.com", - AssertionHandler: mainAssertionHandler, - } - - cases := []struct { - name string - config Config - hasReporter bool - wantEqual chainResult - }{ - { - name: "Response reported failure with reporter", - config: config, - hasReporter: true, - wantEqual: failure, - }, - { - name: "Response reported failure with assertion handler", - config: assertionConfig, - hasReporter: true, - wantEqual: failure, - }, - } - - for _, tc := range cases { - t.Run(tc.name, func(t *testing.T) { - subRep := newMockReporter(t) - subAssertionHandler := &mockAssertionHandler{} - var req2 *Request - - req1 := NewRequest(config, "GET", "/") - - if tc.hasReporter { - req2 = NewRequest(config, "GET", "/2").WithReporter(subRep) - } else { - req2 = NewRequest(config, "GET", "/2").WithAssertionHandler(subAssertionHandler) - } - - resp1 := req1.Expect().Status(200) - resp2 := req2.Expect().Status(200) - - // Make some assertion that fails on both responses - resp1.JSON().Object().Value("foo").chain.assert(t, failure) - resp2.JSON().Object().Value("foo").chain.assert(t, failure) - - resp1.chain.assert(t, tc.wantEqual) - resp2.chain.assert(t, tc.wantEqual) - }) - } - -} diff --git a/mocks_test.go b/mocks_test.go index a83f72e89..c2a3e6c75 100644 --- a/mocks_test.go +++ b/mocks_test.go @@ -41,9 +41,10 @@ func (ml *mockLogger) Logf(message string, args ...interface{}) { // mock reporter type mockReporter struct { - testing *testing.T - reported bool - reportCb func() + testing *testing.T + reported bool + reportCalled int + reportCb func() } func newMockReporter(t *testing.T) *mockReporter { @@ -53,6 +54,7 @@ func newMockReporter(t *testing.T) *mockReporter { func (mr *mockReporter) Errorf(message string, args ...interface{}) { mr.testing.Logf("Fail: "+message, args...) mr.reported = true + mr.reportCalled++ if mr.reportCb != nil { mr.reportCb() From 420f3aeeaa0c45bfac885856ad24dd9c2569d14b Mon Sep 17 00:00:00 2001 From: balavignesh Date: Thu, 27 Apr 2023 08:48:01 +0530 Subject: [PATCH 39/57] CLose https://github.com/gavv/httpexpect/issues/343 --- formatter.go | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/formatter.go b/formatter.go index dc387bb9b..7b8439619 100644 --- a/formatter.go +++ b/formatter.go @@ -1009,6 +1009,57 @@ var defaultTemplateFuncs = template.FuncMap{ } return color.New(colorAttr).Sprint(input) }, + "colorhttp": func(enable bool, colorName string, isResponse bool, input string) string { + if !enable { + return input + } + + colorAttr := color.Reset + present := true + var sb strings.Builder + if ca, ok := defaultColors[colorName]; ok { + colorAttr = ca + } + + httpMethod := map[string]bool{ + "GET": present, + "POST": present, + "PATCH": present, + "DELETE": present, + "PUT": present, + } + + getColor := func(word string, forceApplyColor bool) color.Attribute { + if v := httpMethod[word]; v == present { + return colorAttr + } + if word[len(word)-1] == ':' { + return colorAttr + } + if forceApplyColor { + return colorAttr + } + + return color.Reset + } + isFirstLine := true + for _, line := range strings.Split(input, "\n") { + if sb.Len() != 0 { + sb.WriteString("\n") + } + + words := strings.Fields(line) + wordLen := len(words) + for index, word := range words { + forceApplyColor := index != wordLen-1 && isResponse && isFirstLine + sb.WriteString(color.New(getColor(word, forceApplyColor)).Sprint(word)) + sb.WriteString(" ") + } + isFirstLine = false + } + + return sb.String() + }, "colordiff": func(enable bool, input string) string { if !enable { return input @@ -1098,11 +1149,11 @@ request name: {{ .RequestName | color $.EnableColors "Cyan" }} {{- end -}} {{- if .HaveRequest }} -request: {{ .Request | indent | trim | color $.EnableColors "HiMagenta" }} +request: {{ .Request | indent | trim | colorhttp $.EnableColors "HiMagenta" false}} {{- end -}} {{- if .HaveResponse }} -response: {{ .Response | indent | trim | color $.EnableColors "HiMagenta" }} +response: {{ .Response | indent | trim | colorhttp $.EnableColors "HiMagenta" true}} {{- end -}} {{- if .HaveStacktrace }} From e6879c0c3e358e8400f3fc5e9677a48ceb661740 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Tue, 3 Oct 2023 13:09:40 +0400 Subject: [PATCH 40/57] Refine colorhttp func --- formatter.go | 138 +++++++++++++++++++++++++++------------------------ 1 file changed, 74 insertions(+), 64 deletions(-) diff --git a/formatter.go b/formatter.go index 7b8439619..02985f31c 100644 --- a/formatter.go +++ b/formatter.go @@ -1009,63 +1009,104 @@ var defaultTemplateFuncs = template.FuncMap{ } return color.New(colorAttr).Sprint(input) }, - "colorhttp": func(enable bool, colorName string, isResponse bool, input string) string { + "colorhttp": func(enable bool, isResponse bool, input string) string { if !enable { return input } - colorAttr := color.Reset - present := true - var sb strings.Builder - if ca, ok := defaultColors[colorName]; ok { - colorAttr = ca - } + methodColor := color.New(defaultColors["HiMagenta"]) + statusColor := color.New(defaultColors["HiMagenta"]) + headerColor := color.New(defaultColors["Cyan"]) - httpMethod := map[string]bool{ - "GET": present, - "POST": present, - "PATCH": present, - "DELETE": present, - "PUT": present, - } - - getColor := func(word string, forceApplyColor bool) color.Attribute { - if v := httpMethod[word]; v == present { - return colorAttr - } - if word[len(word)-1] == ':' { - return colorAttr - } - if forceApplyColor { - return colorAttr - } + var sb strings.Builder - return color.Reset - } isFirstLine := true for _, line := range strings.Split(input, "\n") { if sb.Len() != 0 { sb.WriteString("\n") } - words := strings.Fields(line) + line = strings.TrimSuffix(line, "\n") + line = strings.TrimSuffix(line, "\r") + + var words []string + if isFirstLine { + words = strings.SplitN(line, " ", -1) + } else { + words = strings.SplitN(line, " ", 2) + } + wordLen := len(words) for index, word := range words { - forceApplyColor := index != wordLen-1 && isResponse && isFirstLine - sb.WriteString(color.New(getColor(word, forceApplyColor)).Sprint(word)) + var applyColor *color.Color + + if isFirstLine { + if isResponse { + if index != 0 && index != wordLen-1 { + applyColor = statusColor + } + } else { + if index == 0 { + applyColor = methodColor + } + } + } else { + if index == 0 { + applyColor = headerColor + } + } + + if word != "" && applyColor != nil { + sb.WriteString(applyColor.Sprint(word)) + } else { + sb.WriteString(word) + } + sb.WriteString(" ") } + isFirstLine = false } return sb.String() }, + "colorjson": func(enable bool, colorName, input string) string { + if !enable { + return input + } + + fallbackColor := color.Reset + if attr, ok := defaultColors[colorName]; ok { + fallbackColor = attr + } + + var parsedInput interface{} + err := json.Unmarshal([]byte(input), &parsedInput) + if err != nil { + return color.New(fallbackColor).Sprint(input) + } + + formatter := colorjson.NewFormatter() + formatter.KeyColor = color.New(color.Reset) + formatter.StringColor = color.New(defaultColors["HiMagenta"]) + formatter.NumberColor = color.New(defaultColors["Cyan"]) + formatter.BoolColor = color.New(defaultColors["Cyan"]) + formatter.NullColor = color.New(defaultColors["Cyan"]) + formatter.Indent = 2 + + b, err := formatter.Marshal(parsedInput) + if err != nil { + return color.New(fallbackColor).Sprint(input) + } + + return string(b) + }, "colordiff": func(enable bool, input string) string { if !enable { return input } - prefixColor := []struct { + prefixColor := [...]struct { prefix string color color.Attribute }{ @@ -1096,37 +1137,6 @@ var defaultTemplateFuncs = template.FuncMap{ return sb.String() }, - "colorjson": func(enable bool, colorName, input string) string { - if !enable { - return input - } - - fallbackColor := color.Reset - if attr, ok := defaultColors[colorName]; ok { - fallbackColor = attr - } - - var parsedInput interface{} - err := json.Unmarshal([]byte(input), &parsedInput) - if err != nil { - return color.New(fallbackColor).Sprint(input) - } - - formatter := colorjson.NewFormatter() - formatter.KeyColor = color.New(color.Reset) - formatter.StringColor = color.New(defaultColors["HiMagenta"]) - formatter.NumberColor = color.New(defaultColors["Cyan"]) - formatter.BoolColor = color.New(defaultColors["Cyan"]) - formatter.NullColor = color.New(defaultColors["Cyan"]) - formatter.Indent = 2 - - b, err := formatter.Marshal(parsedInput) - if err != nil { - return color.New(fallbackColor).Sprint(input) - } - - return string(b) - }, } var defaultSuccessTemplate = `[OK] {{ join .LineWidth .AssertPath }}` @@ -1149,11 +1159,11 @@ request name: {{ .RequestName | color $.EnableColors "Cyan" }} {{- end -}} {{- if .HaveRequest }} -request: {{ .Request | indent | trim | colorhttp $.EnableColors "HiMagenta" false}} +request: {{ .Request | colorhttp $.EnableColors false | indent | trim }} {{- end -}} {{- if .HaveResponse }} -response: {{ .Response | indent | trim | colorhttp $.EnableColors "HiMagenta" true}} +response: {{ .Response | colorhttp $.EnableColors true | indent | trim }} {{- end -}} {{- if .HaveStacktrace }} From 11943eafb80924a38e7a36a8af9d129f4987950a Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Tue, 3 Oct 2023 13:42:14 +0400 Subject: [PATCH 41/57] Update examples --- _examples/go.mod | 3 ++- _examples/go.sum | 7 +++++-- _examples/iris_test.go | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/_examples/go.mod b/_examples/go.mod index 3803baf04..0783db75c 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/dgrijalva/jwt-go v3.2.0+incompatible github.com/fasthttp/websocket v1.5.0 - github.com/gavv/httpexpect/v2 v2.15.0 + github.com/gavv/httpexpect/v2 v2.16.0 github.com/gin-gonic/gin v1.9.1 github.com/go-oauth2/oauth2/v4 v4.5.1 github.com/gorilla/websocket v1.5.0 @@ -22,6 +22,7 @@ require ( github.com/CloudyKit/jet/v6 v6.2.0 // indirect github.com/Joker/jade v1.1.3 // indirect github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 // indirect + github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 // indirect github.com/ajg/form v1.5.1 // indirect github.com/andybalholm/brotli v1.0.5 // indirect github.com/aymerick/douceur v0.2.0 // indirect diff --git a/_examples/go.sum b/_examples/go.sum index 31c900875..790551997 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -11,6 +11,8 @@ github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= +github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 h1:ZBbLwSJqkHBuFDA6DUhhse0IGJ7T5bemHyNILUjvOq4= +github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2/go.mod h1:VSw57q4QFiWDbRnjdX8Cb3Ow0SFncRw+bA/ofY6Q83w= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= @@ -52,8 +54,8 @@ github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= github.com/gavv/httpexpect v2.0.0+incompatible h1:1X9kcRshkSKEjNJJxX9Y9mQ5BRfbxU5kORdjhlA1yX8= github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc= -github.com/gavv/httpexpect/v2 v2.15.0 h1:CCnFk9of4l4ijUhnMxyoEpJsIIBKcuWIFLMwwGTZxNs= -github.com/gavv/httpexpect/v2 v2.15.0/go.mod h1:7myOP3A3VyS4+qnA4cm8DAad8zMN+7zxDB80W9f8yIc= +github.com/gavv/httpexpect/v2 v2.16.0 h1:Ty2favARiTYTOkCRZGX7ojXXjGyNAIohM1lZ3vqaEwI= +github.com/gavv/httpexpect/v2 v2.16.0/go.mod h1:uJLaO+hQ25ukBJtQi750PsztObHybNllN+t+MbbW8PY= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= @@ -108,6 +110,7 @@ github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f h1:7LYC+Yfkj3CTRcShK0KOL/w6iTiKyqqBA9a41Wnggw8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= diff --git a/_examples/iris_test.go b/_examples/iris_test.go index 8bbd704ac..ff4fcb7a4 100644 --- a/_examples/iris_test.go +++ b/_examples/iris_test.go @@ -136,7 +136,7 @@ func TestIrisStream(t *testing.T) { e.GET("/stream"). Expect(). Status(http.StatusOK). - TransferEncoding("chunked"). // ensure server sent chunks + HasTransferEncoding("chunked"). // ensure server sent chunks Body().IsEqual("0123456789") // send chunks to server From f945d4ba88bb124748d24a14f46ade80fa547a42 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Tue, 3 Oct 2023 13:50:04 +0400 Subject: [PATCH 42/57] Remove space --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6f31bfaa9..ada28be25 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ all: tidy gen build lint test spell tidy: - go mod tidy -v + go mod tidy -v cd _examples && go get -v -u github.com/gavv/httpexpect/v2 cd _examples && go mod tidy -v -compat=1.17 From 7326c592236220b125caf9d7714fd80b3142fb88 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Thu, 5 Oct 2023 13:52:22 +0400 Subject: [PATCH 43/57] Fixes in Match and WebsocketMessage ctors - deep-copy slice - never allow nil --- match.go | 3 ++- websocket_message.go | 10 ++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/match.go b/match.go index faa7bee36..084747595 100644 --- a/match.go +++ b/match.go @@ -51,7 +51,8 @@ func newMatch(parent *chain, matchList []string, nameList []string) *Match { m := &Match{parent.clone(), nil, nil} if matchList != nil { - m.submatches = matchList + m.submatches = make([]string, len(matchList)) + copy(m.submatches, matchList) } else { m.submatches = []string{} } diff --git a/websocket_message.go b/websocket_message.go index 23b27c375..88e0d15a2 100644 --- a/websocket_message.go +++ b/websocket_message.go @@ -67,7 +67,13 @@ func newWebsocketMessage( defer opChain.leave() wm.typ = typ - wm.content = content + + if content != nil { + wm.content = make([]byte, len(content)) + copy(wm.content, content) + } else { + wm.content = []byte{} + } if len(closeCode) > 1 { opChain.fail(AssertionFailure{ @@ -480,7 +486,7 @@ func (wm *WebsocketMessage) NoContent() *WebsocketMessage { return wm } - if !(len(wm.content) == 0) { + if len(wm.content) != 0 { var actual interface{} switch wm.typ { case websocket.BinaryMessage: From e0c90bce2c55bae57d1b8373665847b8778c6bbc Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Thu, 5 Oct 2023 13:52:40 +0400 Subject: [PATCH 44/57] Cleanup tests for Raw() and getters --- array_test.go | 65 +++++++++++++++++++++++++++------------ cookie_test.go | 11 +++++++ datetime_test.go | 11 +++++++ duration_test.go | 9 ++++++ match_test.go | 24 +++++++++++++++ object_test.go | 46 +++++++++++++++++++++------ response_test.go | 13 ++++++-- string_test.go | 26 ++++++++++------ websocket_message_test.go | 56 +++++++++++++++++++++++++++++++++ 9 files changed, 222 insertions(+), 39 deletions(-) diff --git a/array_test.go b/array_test.go index bde4500ab..7fc11a899 100644 --- a/array_test.go +++ b/array_test.go @@ -134,6 +134,18 @@ func TestArray_Constructors(t *testing.T) { }) } +func TestArray_Raw(t *testing.T) { + reporter := newMockReporter(t) + + data := []interface{}{"foo", 123.0} + + value := NewArray(reporter, data) + + assert.Equal(t, data, value.Raw()) + assert.NotSame(t, &data[0], &value.Raw()[0]) + value.chain.assert(t, success) +} + func TestArray_Decode(t *testing.T) { t.Run("target is empty interface", func(t *testing.T) { reporter := newMockReporter(t) @@ -290,10 +302,6 @@ func TestArray_Getters(t *testing.T) { value := NewArray(reporter, data) - assert.Equal(t, data, value.Raw()) - value.chain.assert(t, success) - value.chain.clear() - assert.Equal(t, 0.0, value.Length().Raw()) value.chain.assert(t, success) value.chain.clear() @@ -309,10 +317,6 @@ func TestArray_Getters(t *testing.T) { assert.NotNil(t, value.Last()) value.chain.assert(t, failure) value.chain.clear() - - assert.NotNil(t, value.Iter()) - value.chain.assert(t, success) - value.chain.clear() }) t.Run("not empty", func(t *testing.T) { @@ -322,10 +326,6 @@ func TestArray_Getters(t *testing.T) { value := NewArray(reporter, data) - assert.Equal(t, data, value.Raw()) - value.chain.assert(t, success) - value.chain.clear() - assert.Equal(t, 2.0, value.Length().Raw()) value.chain.assert(t, success) value.chain.clear() @@ -343,13 +343,6 @@ func TestArray_Getters(t *testing.T) { assert.Equal(t, 123.0, value.Last().Raw()) value.chain.assert(t, success) value.chain.clear() - - it := value.Iter() - assert.Equal(t, 2, len(it)) - assert.Equal(t, "foo", it[0].Raw()) - assert.Equal(t, 123.0, it[1].Raw()) - value.chain.assert(t, success) - value.chain.clear() }) } @@ -1594,6 +1587,40 @@ func TestArray_HasValue(t *testing.T) { }) } +func TestArray_Iter(t *testing.T) { + t.Run("empty", func(t *testing.T) { + reporter := newMockReporter(t) + + data := []interface{}{} + + value := NewArray(reporter, data) + + it := value.Iter() + + assert.NotNil(t, it) + assert.Equal(t, 0, len(data), it) + + value.chain.assert(t, success) + }) + + t.Run("not empty", func(t *testing.T) { + reporter := newMockReporter(t) + + data := []interface{}{"foo", 123.0} + + value := NewArray(reporter, data) + + it := value.Iter() + + assert.NotNil(t, it) + assert.Equal(t, 2, len(it)) + assert.Equal(t, "foo", it[0].Raw()) + assert.Equal(t, 123.0, it[1].Raw()) + + value.chain.assert(t, success) + }) +} + func TestArray_Every(t *testing.T) { t.Run("check value", func(t *testing.T) { reporter := newMockReporter(t) diff --git a/cookie_test.go b/cookie_test.go index 41ce7577f..c6141f8b4 100644 --- a/cookie_test.go +++ b/cookie_test.go @@ -96,6 +96,17 @@ func TestCookie_Constructors(t *testing.T) { }) } +func TestCookie_Raw(t *testing.T) { + reporter := newMockReporter(t) + + data := http.Cookie{} + + value := NewCookie(reporter, &data) + + assert.Same(t, &data, value.Raw()) + value.chain.assert(t, success) +} + func TestCookie_Alias(t *testing.T) { reporter := newMockReporter(t) diff --git a/datetime_test.go b/datetime_test.go index 5e295f5a4..fb614b481 100644 --- a/datetime_test.go +++ b/datetime_test.go @@ -69,6 +69,17 @@ func TestDateTime_Constructors(t *testing.T) { }) } +func TestDateTime_Raw(t *testing.T) { + reporter := newMockReporter(t) + + data := time.Unix(0, 1234) + + value := NewDateTime(reporter, data) + + assert.Equal(t, data, value.Raw()) + value.chain.assert(t, success) +} + func TestDateTime_Alias(t *testing.T) { reporter := newMockReporter(t) diff --git a/duration_test.go b/duration_test.go index 2b29cf0d0..704de142b 100644 --- a/duration_test.go +++ b/duration_test.go @@ -54,6 +54,15 @@ func TestDuration_Constructors(t *testing.T) { }) } +func TestDuration_Raw(t *testing.T) { + reporter := newMockReporter(t) + + value := NewDuration(reporter, time.Second) + + assert.Equal(t, time.Second, value.Raw()) + value.chain.assert(t, success) +} + func TestDuration_Alias(t *testing.T) { reporter := newMockReporter(t) diff --git a/match_test.go b/match_test.go index db92a1ebd..a92aedeb4 100644 --- a/match_test.go +++ b/match_test.go @@ -52,6 +52,30 @@ func TestMatch_Constructors(t *testing.T) { }) } +func TestMatch_Raw(t *testing.T) { + t.Run("nil", func(t *testing.T) { + reporter := newMockReporter(t) + + value := NewMatch(reporter, nil, nil) + + assert.NotNil(t, []string{}, value.Raw()) + assert.Equal(t, []string{}, value.Raw()) + value.chain.assert(t, success) + }) + + t.Run("non-nil", func(t *testing.T) { + reporter := newMockReporter(t) + + data := []string{"foo", "bar"} + + value := NewMatch(reporter, data, nil) + + assert.Equal(t, data, value.Raw()) + assert.NotSame(t, &data[0], &value.Raw()[0]) + value.chain.assert(t, success) + }) +} + func TestMatch_Alias(t *testing.T) { reporter := newMockReporter(t) diff --git a/object_test.go b/object_test.go index c48266537..2b81ae5ea 100644 --- a/object_test.go +++ b/object_test.go @@ -129,6 +129,20 @@ func TestObject_Constructors(t *testing.T) { }) } +func TestObject_Raw(t *testing.T) { + reporter := newMockReporter(t) + + data := map[string]interface{}{"foo": "bar"} + + value := NewObject(reporter, data) + assert.Equal(t, data, value.Raw()) + + data["foo"] = "baz" + assert.NotEqual(t, data, value.Raw()) + + value.chain.assert(t, success) +} + func TestObject_Decode(t *testing.T) { t.Run("target is empty interface", func(t *testing.T) { reporter := newMockReporter(t) @@ -341,15 +355,6 @@ func TestObject_Getters(t *testing.T) { assert.Equal(t, nil, value.Value("BAZ").Raw()) value.chain.assert(t, failure) value.chain.clear() - - it := value.Iter() - assert.Equal(t, 3, len(it)) - assert.Equal(t, it["foo"].value, value.Value("foo").Raw()) - assert.Equal(t, it["bar"].value, value.Value("bar").Raw()) - it["foo"].chain.assert(t, success) - it["bar"].chain.assert(t, success) - value.chain.assert(t, success) - value.chain.clear() } func TestObject_IsEmpty(t *testing.T) { @@ -1308,6 +1313,29 @@ func TestObject_HasValue(t *testing.T) { }) } +func TestObject_Iter(t *testing.T) { + reporter := newMockReporter(t) + + m := map[string]interface{}{ + "foo": 123.0, + "bar": []interface{}{"456", 789.0}, + } + + value := NewObject(reporter, m) + + it := value.Iter() + + assert.NotNil(t, it) + assert.Equal(t, 2, len(it)) + assert.Equal(t, it["foo"].value, value.Value("foo").Raw()) + assert.Equal(t, it["bar"].value, value.Value("bar").Raw()) + + it["foo"].chain.assert(t, success) + it["bar"].chain.assert(t, success) + + value.chain.assert(t, success) +} + func TestObject_Every(t *testing.T) { t.Run("check value", func(t *testing.T) { reporter := newMockReporter(t) diff --git a/response_test.go b/response_test.go index 6ed5d9eb8..56e2fe218 100644 --- a/response_test.go +++ b/response_test.go @@ -113,6 +113,17 @@ func TestResponse_Constructors(t *testing.T) { }) } +func TestResponse_Raw(t *testing.T) { + reporter := newMockReporter(t) + + httpResp := http.Response{} + + resp := NewResponse(reporter, &httpResp) + + assert.Same(t, &httpResp, resp.Raw()) + resp.chain.assert(t, success) +} + func TestResponse_Alias(t *testing.T) { reporter := newMockReporter(t) @@ -282,8 +293,6 @@ func TestResponse_Headers(t *testing.T) { resp := NewResponse(reporter, httpResp) - assert.Same(t, httpResp, resp.Raw()) - resp.Headers().IsEqual(headers). chain.assert(t, success) diff --git a/string_test.go b/string_test.go index a184cdd5c..2a19f1bde 100644 --- a/string_test.go +++ b/string_test.go @@ -83,6 +83,15 @@ func TestString_Constructors(t *testing.T) { }) } +func TestString_Raw(t *testing.T) { + reporter := newMockReporter(t) + + value := NewString(reporter, "foo") + + assert.Equal(t, "foo", value.Raw()) + value.chain.assert(t, success) +} + func TestString_Decode(t *testing.T) { t.Run("target is empty interface", func(t *testing.T) { reporter := newMockReporter(t) @@ -165,18 +174,17 @@ func TestString_Schema(t *testing.T) { } func TestString_Getters(t *testing.T) { - reporter := newMockReporter(t) + t.Run("length", func(t *testing.T) { + reporter := newMockReporter(t) - value := NewString(reporter, "foo") + value := NewString(reporter, "foo") - assert.Equal(t, "foo", value.Raw()) - value.chain.assert(t, success) - value.chain.clear() + innerValue := value.Length() + assert.Equal(t, 3.0, innerValue.Raw()) - num := value.Length() - value.chain.assert(t, success) - num.chain.assert(t, success) - assert.Equal(t, 3.0, num.Raw()) + value.chain.assert(t, success) + innerValue.chain.assert(t, success) + }) } func TestString_IsEmpty(t *testing.T) { diff --git a/websocket_message_test.go b/websocket_message_test.go index 6fc912968..d1b94b618 100644 --- a/websocket_message_test.go +++ b/websocket_message_test.go @@ -56,6 +56,62 @@ func TestWebsocketMessage_Constructors(t *testing.T) { }) } +func TestWebsocketMessage_Raw(t *testing.T) { + t.Run("nil content", func(t *testing.T) { + reporter := newMockReporter(t) + + msg := NewWebsocketMessage(reporter, websocket.CloseMessage, nil) + + typ, content, closeCode := msg.Raw() + + assert.Equal(t, websocket.CloseMessage, typ) + assert.NotNil(t, content) + assert.Equal(t, 0, len(content)) + assert.Equal(t, 0, closeCode) + }) + + t.Run("empty content", func(t *testing.T) { + reporter := newMockReporter(t) + + msg := NewWebsocketMessage(reporter, websocket.CloseMessage, []byte{}) + + typ, content, closeCode := msg.Raw() + + assert.Equal(t, websocket.CloseMessage, typ) + assert.NotNil(t, content) + assert.Equal(t, 0, len(content)) + assert.Equal(t, 0, closeCode) + }) + + t.Run("non-empty content", func(t *testing.T) { + reporter := newMockReporter(t) + + origContent := []byte{1, 2, 3} + + msg := NewWebsocketMessage(reporter, websocket.CloseMessage, origContent) + + typ, content, closeCode := msg.Raw() + + assert.Equal(t, websocket.CloseMessage, typ) + assert.NotNil(t, content) + assert.Equal(t, origContent, content) + assert.NotSame(t, &origContent[0], &content[0]) + assert.Equal(t, 0, closeCode) + }) + + t.Run("close code", func(t *testing.T) { + reporter := newMockReporter(t) + + msg := NewWebsocketMessage(reporter, websocket.CloseMessage, []byte{}, 123) + + typ, content, closeCode := msg.Raw() + + assert.Equal(t, websocket.CloseMessage, typ) + assert.NotNil(t, content) + assert.Equal(t, 123, closeCode) + }) +} + func TestWebsocketMessage_Alias(t *testing.T) { reporter := newMockReporter(t) From a4682f52ab09fd34b06ac28e8817161994636715 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Thu, 5 Oct 2023 14:04:54 +0400 Subject: [PATCH 45/57] Rename Match fields --- match.go | 66 ++++++++++++++++++++++++++------------------------ string_test.go | 8 +++--- 2 files changed, 38 insertions(+), 36 deletions(-) diff --git a/match.go b/match.go index 084747595..4840f9e64 100644 --- a/match.go +++ b/match.go @@ -7,9 +7,9 @@ import ( // Match provides methods to inspect attached regexp match results. type Match struct { - chain *chain - submatches []string - names map[string]int + chain *chain + submatchValues []string + submatchNames map[string]int } // NewMatch returns a new Match instance. @@ -33,8 +33,9 @@ type Match struct { // // m.Name("host").IsEqual("example.com") // m.Name("user").IsEqual("john") -func NewMatch(reporter Reporter, submatches []string, names []string) *Match { - return newMatch(newChainWithDefaults("Match()", reporter), submatches, names) +func NewMatch(reporter Reporter, submatchValues []string, submatchNames []string) *Match { + return newMatch( + newChainWithDefaults("Match()", reporter), submatchValues, submatchNames) } // NewMatchC returns a new Match instance with config. @@ -43,24 +44,25 @@ func NewMatch(reporter Reporter, submatches []string, names []string) *Match { // Both submatches and names may be nil. // // See NewMatch for usage example. -func NewMatchC(config Config, submatches []string, names []string) *Match { - return newMatch(newChainWithConfig("Match()", config.withDefaults()), submatches, names) +func NewMatchC(config Config, submatchValues []string, submatchNames []string) *Match { + return newMatch( + newChainWithConfig("Match()", config.withDefaults()), submatchValues, submatchNames) } -func newMatch(parent *chain, matchList []string, nameList []string) *Match { +func newMatch(parent *chain, submatchValues []string, submatchNames []string) *Match { m := &Match{parent.clone(), nil, nil} - if matchList != nil { - m.submatches = make([]string, len(matchList)) - copy(m.submatches, matchList) + if submatchValues != nil { + m.submatchValues = make([]string, len(submatchValues)) + copy(m.submatchValues, submatchValues) } else { - m.submatches = []string{} + m.submatchValues = []string{} } - m.names = map[string]int{} - for n, name := range nameList { + m.submatchNames = map[string]int{} + for n, name := range submatchNames { if name != "" { - m.names[name] = n + m.submatchNames[name] = n } } @@ -75,7 +77,7 @@ func newMatch(parent *chain, matchList []string, nameList []string) *Match { // m := NewMatch(t, submatches, names) // assert.Equal(t, submatches, m.Raw()) func (m *Match) Raw() []string { - return m.submatches + return m.submatchValues } // Alias is similar to Value.Alias. @@ -101,7 +103,7 @@ func (m *Match) Length() *Number { return newNumber(opChain, 0) } - return newNumber(opChain, float64(len(m.submatches))) + return newNumber(opChain, float64(len(m.submatchValues))) } // Index returns a new String instance with submatch for given index. @@ -127,13 +129,13 @@ func (m *Match) Index(index int) *String { return newString(opChain, "") } - if index < 0 || index >= len(m.submatches) { + if index < 0 || index >= len(m.submatchValues) { opChain.fail(AssertionFailure{ Type: AssertInRange, Actual: &AssertionValue{index}, Expected: &AssertionValue{AssertionRange{ Min: 0, - Max: len(m.submatches) - 1, + Max: len(m.submatchValues) - 1, }}, Errors: []error{ errors.New("expected: valid sub-match index"), @@ -142,7 +144,7 @@ func (m *Match) Index(index int) *String { return newString(opChain, "") } - return newString(opChain, m.submatches[index]) + return newString(opChain, m.submatchValues[index]) } // Name returns a new String instance with submatch for given name. @@ -167,10 +169,10 @@ func (m *Match) Name(name string) *String { return newString(opChain, "") } - index, ok := m.names[name] + index, ok := m.submatchNames[name] if !ok { - nameList := make([]interface{}, 0, len(m.names)) - for n := range m.names { + nameList := make([]interface{}, 0, len(m.submatchNames)) + for n := range m.submatchNames { nameList = append(nameList, n) } @@ -186,7 +188,7 @@ func (m *Match) Name(name string) *String { return newString(opChain, "") } - return newString(opChain, m.submatches[index]) + return newString(opChain, m.submatchValues[index]) } // IsEmpty succeeds if submatches array is empty. @@ -203,10 +205,10 @@ func (m *Match) IsEmpty() *Match { return m } - if !(len(m.submatches) == 0) { + if !(len(m.submatchValues) == 0) { opChain.fail(AssertionFailure{ Type: AssertEmpty, - Actual: &AssertionValue{m.submatches}, + Actual: &AssertionValue{m.submatchValues}, Errors: []error{ errors.New("expected: empty sub-match list"), }, @@ -230,10 +232,10 @@ func (m *Match) NotEmpty() *Match { return m } - if !(len(m.submatches) != 0) { + if !(len(m.submatchValues) != 0) { opChain.fail(AssertionFailure{ Type: AssertNotEmpty, - Actual: &AssertionValue{m.submatches}, + Actual: &AssertionValue{m.submatchValues}, Errors: []error{ errors.New("expected: non-empty sub-match list"), }, @@ -275,7 +277,7 @@ func (m *Match) Values(values ...string) *Match { if !reflect.DeepEqual(values, m.getValues()) { opChain.fail(AssertionFailure{ Type: AssertEqual, - Actual: &AssertionValue{m.submatches}, + Actual: &AssertionValue{m.submatchValues}, Expected: &AssertionValue{values}, Errors: []error{ errors.New("expected: sub-match lists are equal"), @@ -309,7 +311,7 @@ func (m *Match) NotValues(values ...string) *Match { if reflect.DeepEqual(values, m.getValues()) { opChain.fail(AssertionFailure{ Type: AssertNotEqual, - Actual: &AssertionValue{m.submatches}, + Actual: &AssertionValue{m.submatchValues}, Expected: &AssertionValue{values}, Errors: []error{ errors.New("expected: sub-match lists are non-equal"), @@ -321,8 +323,8 @@ func (m *Match) NotValues(values ...string) *Match { } func (m *Match) getValues() []string { - if len(m.submatches) > 1 { - return m.submatches[1:] + if len(m.submatchValues) > 1 { + return m.submatchValues[1:] } return []string{} } diff --git a/string_test.go b/string_test.go index 2a19f1bde..d5824a454 100644 --- a/string_test.go +++ b/string_test.go @@ -531,7 +531,7 @@ func TestString_Match(t *testing.T) { assert.Equal(t, []string{"http://example.com/users/john", "example.com", "john"}, - m.submatches) + m.submatchValues) }) t.Run("unnamed", func(t *testing.T) { @@ -544,7 +544,7 @@ func TestString_Match(t *testing.T) { assert.Equal(t, []string{"http://example.com/users/john", "example.com", "john"}, - m.submatches) + m.submatchValues) }) t.Run("all", func(t *testing.T) { @@ -562,11 +562,11 @@ func TestString_Match(t *testing.T) { assert.Equal(t, []string{"http://example.com/users/john", "example.com", "john"}, - m[0].submatches) + m[0].submatchValues) assert.Equal(t, []string{"http://example.com/users/bob", "example.com", "bob"}, - m[1].submatches) + m[1].submatchValues) }) t.Run("status", func(t *testing.T) { From c038021cb57a543b0f88989379f885daff1b6299 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Thu, 5 Oct 2023 14:13:12 +0400 Subject: [PATCH 46/57] Rename Match methods - Index() => Submatch() - Name() => NamedSubmatch() - Values() => HasSubmatches() - NotValues() => NotHasSubmatches() --- README.md | 10 +++--- match.go | 90 +++++++++++++++++++++++++++++++-------------------- match_test.go | 36 ++++++++++----------- string.go | 14 ++++---- 4 files changed, 85 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index 6a9971e0d..bab8b7133 100644 --- a/README.md +++ b/README.md @@ -359,12 +359,12 @@ m := e.GET("/users/john"). Expect(). Header("Location").Match("http://(?P.+)/users/(?P.+)") -m.Index(0).IsEqual("http://example.com/users/john") -m.Index(1).IsEqual("example.com") -m.Index(2).IsEqual("john") +m.Submatch(0).IsEqual("http://example.com/users/john") +m.Submatch(1).IsEqual("example.com") +m.Submatch(2).IsEqual("john") -m.Name("host").IsEqual("example.com") -m.Name("user").IsEqual("john") +m.NamedSubmatch("host").IsEqual("example.com") +m.NamedSubmatch("user").IsEqual("john") ``` ##### Redirection support diff --git a/match.go b/match.go index 4840f9e64..c07ffed7c 100644 --- a/match.go +++ b/match.go @@ -15,7 +15,7 @@ type Match struct { // NewMatch returns a new Match instance. // // If reporter is nil, the function panics. -// Both submatches and names may be nil. +// Both submatchValues and submatchNames may be nil. // // Example: // @@ -27,12 +27,12 @@ type Match struct { // m.NotEmpty() // m.Length().IsEqual(3) // -// m.Index(0).IsEqual("http://example.com/users/john") -// m.Index(1).IsEqual("example.com") -// m.Index(2).IsEqual("john") +// m.Submatch(0).IsEqual("http://example.com/users/john") +// m.Submatch(1).IsEqual("example.com") +// m.Submatch(2).IsEqual("john") // -// m.Name("host").IsEqual("example.com") -// m.Name("user").IsEqual("john") +// m.NamedSubmatch("host").IsEqual("example.com") +// m.NamedSubmatch("user").IsEqual("john") func NewMatch(reporter Reporter, submatchValues []string, submatchNames []string) *Match { return newMatch( newChainWithDefaults("Match()", reporter), submatchValues, submatchNames) @@ -106,10 +106,10 @@ func (m *Match) Length() *Number { return newNumber(opChain, float64(len(m.submatchValues))) } -// Index returns a new String instance with submatch for given index. +// Submatch returns a new String instance with submatch for given index. // // Note that submatch with index 0 contains the whole match. If index is out -// of bounds, Index reports failure and returns empty (but non-nil) instance. +// of bounds, Submatch reports failure and returns empty (but non-nil) instance. // // Example: // @@ -118,11 +118,11 @@ func (m *Match) Length() *Number { // r := regexp.MustCompile(`http://(.+)/users/(.+)`) // m := NewMatch(t, r.FindStringSubmatch(s), nil) // -// m.Index(0).IsEqual("http://example.com/users/john") -// m.Index(1).IsEqual("example.com") -// m.Index(2).IsEqual("john") -func (m *Match) Index(index int) *String { - opChain := m.chain.enter("Index(%d)", index) +// m.Submatch(0).IsEqual("http://example.com/users/john") +// m.Submatch(1).IsEqual("example.com") +// m.Submatch(2).IsEqual("john") +func (m *Match) Submatch(index int) *String { + opChain := m.chain.enter("Submatch(%d)", index) defer opChain.leave() if opChain.failed() { @@ -147,9 +147,9 @@ func (m *Match) Index(index int) *String { return newString(opChain, m.submatchValues[index]) } -// Name returns a new String instance with submatch for given name. +// NamedSubmatch returns a new String instance with submatch for given name. // -// If there is no submatch with given name, Name reports failure and returns +// If there is no submatch with given name, NamedSubmatch reports failure and returns // empty (but non-nil) instance. // // Example: @@ -159,10 +159,10 @@ func (m *Match) Index(index int) *String { // r := regexp.MustCompile(`http://(?P.+)/users/(?P.+)`) // m := NewMatch(t, r.FindStringSubmatch(s), r.SubexpNames()) // -// m.Name("host").IsEqual("example.com") -// m.Name("user").IsEqual("john") -func (m *Match) Name(name string) *String { - opChain := m.chain.enter("Name(%q)", name) +// m.NamedSubmatch("host").IsEqual("example.com") +// m.NamedSubmatch("user").IsEqual("john") +func (m *Match) NamedSubmatch(name string) *String { + opChain := m.chain.enter("NamedSubmatch(%q)", name) defer opChain.leave() if opChain.failed() { @@ -191,6 +191,16 @@ func (m *Match) Name(name string) *String { return newString(opChain, m.submatchValues[index]) } +// Deprecated: use Submatch instead. +func (m *Match) Index(index int) *String { + return m.Submatch(index) +} + +// Deprecated: use Submatch instead. +func (m *Match) Name(name string) *String { + return m.NamedSubmatch(name) +} + // IsEmpty succeeds if submatches array is empty. // // Example: @@ -250,7 +260,7 @@ func (m *Match) Empty() *Match { return m.IsEmpty() } -// Values succeeds if submatches array, starting from index 1, is equal to +// HasSubmatches succeeds if submatches array, starting from index 1, is equal to // given array. // // Note that submatch with index 0 contains the whole match and is not @@ -261,24 +271,24 @@ func (m *Match) Empty() *Match { // s := "http://example.com/users/john" // r := regexp.MustCompile(`http://(.+)/users/(.+)`) // m := NewMatch(t, r.FindStringSubmatch(s), nil) -// m.Values("example.com", "john") -func (m *Match) Values(values ...string) *Match { - opChain := m.chain.enter("Values()") +// m.HasSubmatches("example.com", "john") +func (m *Match) HasSubmatches(submatchValues ...string) *Match { + opChain := m.chain.enter("HasSubmatches()") defer opChain.leave() if opChain.failed() { return m } - if values == nil { - values = []string{} + if submatchValues == nil { + submatchValues = []string{} } - if !reflect.DeepEqual(values, m.getValues()) { + if !reflect.DeepEqual(submatchValues, m.getValues()) { opChain.fail(AssertionFailure{ Type: AssertEqual, Actual: &AssertionValue{m.submatchValues}, - Expected: &AssertionValue{values}, + Expected: &AssertionValue{submatchValues}, Errors: []error{ errors.New("expected: sub-match lists are equal"), }, @@ -288,7 +298,7 @@ func (m *Match) Values(values ...string) *Match { return m } -// NotValues succeeds if submatches array, starting from index 1, is not +// NotHasSubmatches succeeds if submatches array, starting from index 1, is not // equal to given array. // // Note that submatch with index 0 contains the whole match and is not @@ -299,20 +309,20 @@ func (m *Match) Values(values ...string) *Match { // s := "http://example.com/users/john" // r := regexp.MustCompile(`http://(.+)/users/(.+)`) // m := NewMatch(t, r.FindStringSubmatch(s), nil) -// m.NotValues("example.com", "bob") -func (m *Match) NotValues(values ...string) *Match { - opChain := m.chain.enter("NotValues()") +// m.NotHasSubmatches("example.com", "bob") +func (m *Match) NotHasSubmatches(submatchValues ...string) *Match { + opChain := m.chain.enter("NotHasSubmatches()") defer opChain.leave() - if values == nil { - values = []string{} + if submatchValues == nil { + submatchValues = []string{} } - if reflect.DeepEqual(values, m.getValues()) { + if reflect.DeepEqual(submatchValues, m.getValues()) { opChain.fail(AssertionFailure{ Type: AssertNotEqual, Actual: &AssertionValue{m.submatchValues}, - Expected: &AssertionValue{values}, + Expected: &AssertionValue{submatchValues}, Errors: []error{ errors.New("expected: sub-match lists are non-equal"), }, @@ -322,6 +332,16 @@ func (m *Match) NotValues(values ...string) *Match { return m } +// Deprecated: use HasSubmatches instead. +func (m *Match) Values(submatchValues ...string) *Match { + return m.HasSubmatches(submatchValues...) +} + +// Deprecated: use NotHasSubmatches instead. +func (m *Match) NotValues(submatchValues ...string) *Match { + return m.NotHasSubmatches(submatchValues...) +} + func (m *Match) getValues() []string { if len(m.submatchValues) > 1 { return m.submatchValues[1:] diff --git a/match_test.go b/match_test.go index a92aedeb4..82245b8a8 100644 --- a/match_test.go +++ b/match_test.go @@ -15,13 +15,13 @@ func TestMatch_FailedChain(t *testing.T) { value.Alias("foo") value.Length().chain.assert(t, failure) - value.Index(0).chain.assert(t, failure) - value.Name("").chain.assert(t, failure) + value.Submatch(0).chain.assert(t, failure) + value.NamedSubmatch("").chain.assert(t, failure) value.IsEmpty() value.NotEmpty() - value.Values("") - value.NotValues("") + value.HasSubmatches("") + value.NotHasSubmatches("") } func TestMatch_Constructors(t *testing.T) { @@ -90,9 +90,9 @@ func TestMatch_Alias(t *testing.T) { assert.Equal(t, []string{"Match()"}, value.chain.context.Path) assert.Equal(t, []string{"foo"}, value.chain.context.AliasedPath) - childValue := value.Index(0) - assert.Equal(t, []string{"Match()", "Index(0)"}, childValue.chain.context.Path) - assert.Equal(t, []string{"foo", "Index(0)"}, childValue.chain.context.AliasedPath) + childValue := value.Submatch(0) + assert.Equal(t, []string{"Match()", "Submatch(0)"}, childValue.chain.context.Path) + assert.Equal(t, []string{"foo", "Submatch(0)"}, childValue.chain.context.AliasedPath) } func TestMatch_Getters(t *testing.T) { @@ -107,28 +107,28 @@ func TestMatch_Getters(t *testing.T) { assert.Equal(t, 3.0, value.Length().Raw()) - assert.Equal(t, "m0", value.Index(0).Raw()) - assert.Equal(t, "m1", value.Index(1).Raw()) - assert.Equal(t, "m2", value.Index(2).Raw()) + assert.Equal(t, "m0", value.Submatch(0).Raw()) + assert.Equal(t, "m1", value.Submatch(1).Raw()) + assert.Equal(t, "m2", value.Submatch(2).Raw()) value.chain.assert(t, success) - assert.Equal(t, "m1", value.Name("n1").Raw()) - assert.Equal(t, "m2", value.Name("n2").Raw()) + assert.Equal(t, "m1", value.NamedSubmatch("n1").Raw()) + assert.Equal(t, "m2", value.NamedSubmatch("n2").Raw()) value.chain.assert(t, success) - assert.Equal(t, "", value.Index(-1).Raw()) + assert.Equal(t, "", value.Submatch(-1).Raw()) value.chain.assert(t, failure) value.chain.clear() - assert.Equal(t, "", value.Index(3).Raw()) + assert.Equal(t, "", value.Submatch(3).Raw()) value.chain.assert(t, failure) value.chain.clear() - assert.Equal(t, "", value.Name("").Raw()) + assert.Equal(t, "", value.NamedSubmatch("").Raw()) value.chain.assert(t, failure) value.chain.clear() - assert.Equal(t, "", value.Name("bad").Raw()) + assert.Equal(t, "", value.NamedSubmatch("bad").Raw()) value.chain.assert(t, failure) value.chain.clear() } @@ -226,10 +226,10 @@ func TestMatch_Values(t *testing.T) { reporter := newMockReporter(t) for _, match := range tc.wantMatch { - NewMatch(reporter, tc.submatches, nil).Values(match.target...). + NewMatch(reporter, tc.submatches, nil).HasSubmatches(match.target...). chain.assert(t, match.result) - NewMatch(reporter, tc.submatches, nil).NotValues(match.target...). + NewMatch(reporter, tc.submatches, nil).NotHasSubmatches(match.target...). chain.assert(t, !match.result) } }) diff --git a/string.go b/string.go index 3e8e1516a..dcc5277fe 100644 --- a/string.go +++ b/string.go @@ -865,12 +865,12 @@ func (s *String) NotHasSuffixFold(value string) *String { // m.NotEmpty() // m.Length().IsEqual(3) // -// m.Index(0).IsEqual("http://example.com/users/john") -// m.Index(1).IsEqual("example.com") -// m.Index(2).IsEqual("john") +// m.Submatch(0).IsEqual("http://example.com/users/john") +// m.Submatch(1).IsEqual("example.com") +// m.Submatch(2).IsEqual("john") // -// m.Name("host").IsEqual("example.com") -// m.Name("user").IsEqual("john") +// m.NamedSubmatch("host").IsEqual("example.com") +// m.NamedSubmatch("user").IsEqual("john") func (s *String) Match(re string) *Match { opChain := s.chain.enter("Match()") defer opChain.leave() @@ -963,8 +963,8 @@ func (s *String) NotMatch(re string) *String { // // m := s.MatchAll(`http://(?P\S+)/users/(?P\S+)`) // -// m[0].Name("user").IsEqual("john") -// m[1].Name("user").IsEqual("bob") +// m[0].NamedSubmatch("user").IsEqual("john") +// m[1].NamedSubmatch("user").IsEqual("bob") func (s *String) MatchAll(re string) []Match { opChain := s.chain.enter("MatchAll()") defer opChain.leave() From 346651bb7d6c3751423a7a47ac352f023bbdc576 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Thu, 5 Oct 2023 14:20:54 +0400 Subject: [PATCH 47/57] Rename Cookie methods - HasMaxAge() => ContainsMaxAge() - NotHasMaxAge() => NotContainsMaxAge() --- cookie.go | 36 +++++++++++++++++++++++------------- cookie_test.go | 44 ++++++++++++++++++++++---------------------- duration.go | 4 ++-- 3 files changed, 47 insertions(+), 37 deletions(-) diff --git a/cookie.go b/cookie.go index 6893f284d..71ff1c76d 100644 --- a/cookie.go +++ b/cookie.go @@ -165,7 +165,7 @@ func (c *Cookie) Expires() *DateTime { return newDateTime(opChain, c.value.Expires) } -// HasMaxAge succeeds if cookie has Max-Age field. +// ContainsMaxAge succeeds if cookie has Max-Age field. // // In particular, if Max-Age is present and is zero (which means delete // cookie now), method succeeds. @@ -173,9 +173,9 @@ func (c *Cookie) Expires() *DateTime { // Example: // // cookie := NewCookie(t, &http.Cookie{...}) -// cookie.HasMaxAge() -func (c *Cookie) HasMaxAge() *Cookie { - opChain := c.chain.enter("HasMaxAge()") +// cookie.ContainsMaxAge() +func (c *Cookie) ContainsMaxAge() *Cookie { + opChain := c.chain.enter("ContainsMaxAge()") defer opChain.leave() if opChain.failed() { @@ -195,7 +195,7 @@ func (c *Cookie) HasMaxAge() *Cookie { return c } -// NotHasMaxAge succeeds if cookie does not have Max-Age field. +// NotContainsMaxAge succeeds if cookie does not have Max-Age field. // // In particular, if Max-Age is present and is zero (which means delete // cookie now), method fails. @@ -203,9 +203,9 @@ func (c *Cookie) HasMaxAge() *Cookie { // Example: // // cookie := NewCookie(t, &http.Cookie{...}) -// cookie.NotHasMaxAge() -func (c *Cookie) NotHasMaxAge() *Cookie { - opChain := c.chain.enter("NotHasMaxAge()") +// cookie.NotContainsMaxAge() +func (c *Cookie) NotContainsMaxAge() *Cookie { + opChain := c.chain.enter("NotContainsMaxAge()") defer opChain.leave() if opChain.failed() { @@ -225,14 +225,24 @@ func (c *Cookie) NotHasMaxAge() *Cookie { return c } -// Deprecated: use HasMaxAge instead. +// Deprecated: use ContainsMaxAge instead. +func (c *Cookie) HasMaxAge() *Cookie { + return c.ContainsMaxAge() +} + +// Deprecated: use NotContainsMaxAge instead. +func (c *Cookie) NotHasMaxAge() *Cookie { + return c.NotContainsMaxAge() +} + +// Deprecated: use ContainsMaxAge instead. func (c *Cookie) HaveMaxAge() *Cookie { - return c.HasMaxAge() + return c.ContainsMaxAge() } -// Deprecated: use NotHasMaxAge instead. +// Deprecated: use NotContainsMaxAge instead. func (c *Cookie) NotHaveMaxAge() *Cookie { - return c.NotHasMaxAge() + return c.NotContainsMaxAge() } // MaxAge returns a new Duration instance with cookie Max-Age field. @@ -245,7 +255,7 @@ func (c *Cookie) NotHaveMaxAge() *Cookie { // Example: // // cookie := NewCookie(t, &http.Cookie{...}) -// cookie.HasMaxAge() +// cookie.ContainsMaxAge() // cookie.MaxAge().InRange(time.Minute, time.Minute*10) func (c *Cookie) MaxAge() *Duration { opChain := c.chain.enter("MaxAge()") diff --git a/cookie_test.go b/cookie_test.go index c6141f8b4..0ee84f8fc 100644 --- a/cookie_test.go +++ b/cookie_test.go @@ -28,8 +28,8 @@ func TestCookie_FailedChain(t *testing.T) { value.Expires().chain.assert(t, failure) value.MaxAge().chain.assert(t, failure) - value.HasMaxAge() - value.NotHasMaxAge() + value.ContainsMaxAge() + value.NotContainsMaxAge() } t.Run("failed chain", func(t *testing.T) { @@ -158,27 +158,27 @@ func TestCookie_Getters(t *testing.T) { func TestCookie_MaxAge(t *testing.T) { cases := []struct { - name string - maxAge int - wantHasMaxAge chainResult - wantDuration time.Duration + name string + maxAge int + wantContainsMaxAge chainResult + wantDuration time.Duration }{ { - name: "unset", - maxAge: 0, - wantHasMaxAge: failure, + name: "unset", + maxAge: 0, + wantContainsMaxAge: failure, }, { - name: "zero", - maxAge: -1, - wantHasMaxAge: success, - wantDuration: time.Duration(0), + name: "zero", + maxAge: -1, + wantContainsMaxAge: success, + wantDuration: time.Duration(0), }, { - name: "non-zero", - maxAge: 3, - wantHasMaxAge: success, - wantDuration: time.Duration(3) * time.Second, + name: "non-zero", + maxAge: 3, + wantContainsMaxAge: success, + wantDuration: time.Duration(3) * time.Second, }, } @@ -189,13 +189,13 @@ func TestCookie_MaxAge(t *testing.T) { MaxAge: tc.maxAge, } - NewCookie(reporter, data).HasMaxAge(). - chain.assert(t, tc.wantHasMaxAge) + NewCookie(reporter, data).ContainsMaxAge(). + chain.assert(t, tc.wantContainsMaxAge) - NewCookie(reporter, data).NotHasMaxAge(). - chain.assert(t, !tc.wantHasMaxAge) + NewCookie(reporter, data).NotContainsMaxAge(). + chain.assert(t, !tc.wantContainsMaxAge) - if tc.wantHasMaxAge { + if tc.wantContainsMaxAge { require.NotNil(t, NewCookie(reporter, data).MaxAge().value) diff --git a/duration.go b/duration.go index 5e4464223..adc0be63e 100644 --- a/duration.go +++ b/duration.go @@ -65,7 +65,7 @@ func (d *Duration) Alias(name string) *Duration { // Deprecated: support for unset durations will be removed. The only method that // can create unset duration is Cookie.MaxAge. Instead of Cookie.MaxAge().IsSet(), -// please use Cookie.HasMaxAge(). +// please use Cookie.ContainsMaxAge(). func (d *Duration) IsSet() *Duration { opChain := d.chain.enter("IsSet()") defer opChain.leave() @@ -89,7 +89,7 @@ func (d *Duration) IsSet() *Duration { // Deprecated: support for unset durations will be removed. The only method that // can create unset duration is Cookie.MaxAge. Instead of Cookie.MaxAge().NotSet(), -// please use Cookie.NotHasMaxAge(). +// please use Cookie.NotContainsMaxAge(). func (d *Duration) NotSet() *Duration { opChain := d.chain.enter("NotSet()") defer opChain.leave() From e0f56df47cf2bc077bbc94ca6c3bfd33ca831269 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Thu, 5 Oct 2023 14:30:56 +0400 Subject: [PATCH 48/57] Remove tests for first/last --- array_test.go | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/array_test.go b/array_test.go index 7fc11a899..3a46b0519 100644 --- a/array_test.go +++ b/array_test.go @@ -309,14 +309,6 @@ func TestArray_Getters(t *testing.T) { assert.NotNil(t, value.Value(0)) value.chain.assert(t, failure) value.chain.clear() - - assert.NotNil(t, value.First()) - value.chain.assert(t, failure) - value.chain.clear() - - assert.NotNil(t, value.Last()) - value.chain.assert(t, failure) - value.chain.clear() }) t.Run("not empty", func(t *testing.T) { @@ -338,11 +330,6 @@ func TestArray_Getters(t *testing.T) { assert.Equal(t, nil, value.Value(2).Raw()) value.chain.assert(t, failure) value.chain.clear() - - assert.Equal(t, "foo", value.First().Raw()) - assert.Equal(t, 123.0, value.Last().Raw()) - value.chain.assert(t, success) - value.chain.clear() }) } From b7b42aedd33d8abc99a955ea8e653367ab9f59db Mon Sep 17 00:00:00 2001 From: scheng Date: Fri, 7 Apr 2023 04:13:34 -0500 Subject: [PATCH 49/57] Implement Response.Reader --- e2e/chunked_test.go | 30 ++++++++ response.go | 97 +++++++++++++++++++++---- response_test.go | 167 +++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 278 insertions(+), 16 deletions(-) diff --git a/e2e/chunked_test.go b/e2e/chunked_test.go index 48ebc5969..c4ac17133 100644 --- a/e2e/chunked_test.go +++ b/e2e/chunked_test.go @@ -98,3 +98,33 @@ func TestE2EChunked_BinderFast(t *testing.T) { }, })) } + +func TestE2EChunked_ResponseReader(t *testing.T) { + const chars = "abcdefghijklmnopqrstuvwxyz" + mux := http.NewServeMux() + mux.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) { + b := make([]byte, 1000000) + for i := range b { + b[i] = chars[i%26] + } + w.Header().Add("Content-Type", "text/plain; charset=utf-8") + _, _ = w.Write(b) + }) + e := httpexpect.WithConfig(httpexpect.Config{ + BaseURL: "http://example.com", + Reporter: httpexpect.NewAssertReporter(t), + Client: &http.Client{ + Transport: httpexpect.NewBinder(mux), + }, + }) + reader := e.GET("/test").Expect().Reader() + + rb := make([]byte, 1000000) + l, err := reader.Read(rb) + assert.NoError(t, err) + assert.Equal(t, 1000000, l) + assert.Equal(t, chars, string(rb[0:26])) + + err = reader.Close() + assert.NoError(t, err) +} diff --git a/response.go b/response.go index 7d32ef00b..b0edb9cb5 100644 --- a/response.go +++ b/response.go @@ -28,18 +28,36 @@ type Response struct { websocket *websocket.Conn rtt *time.Duration - content []byte - contentState contentState + content []byte + contentState contentState + contentMethod string cookies []*http.Cookie } +type ErrorReader struct { + err error +} + +func (er *ErrorReader) Read(_ []byte) (int, error) { + return 0, er.err +} + +func (er *ErrorReader) Close() error { + return er.err +} + +func newErrorReader(err error) *ErrorReader { + return &ErrorReader{err} +} + type contentState int const ( contentPending contentState = iota contentRetreived contentFailed + contentHijacked ) // NewResponse returns a new Response instance. @@ -147,7 +165,7 @@ func newResponse(opts responseOpts) *Response { return r } -func (r *Response) getContent(opChain *chain) ([]byte, bool) { +func (r *Response) getContent(opChain *chain, method string) ([]byte, bool) { switch r.contentState { case contentRetreived: return r.content, true @@ -157,6 +175,15 @@ func (r *Response) getContent(opChain *chain) ([]byte, bool) { case contentPending: break + + case contentHijacked: + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{ + fmt.Errorf("cannot call %s because Reader() was already called", method), + }, + }) + return nil, false } resp := r.httpResp @@ -193,6 +220,7 @@ func (r *Response) getContent(opChain *chain) ([]byte, bool) { r.content = content r.contentState = contentRetreived + r.contentMethod = method return r.content, true } @@ -570,7 +598,7 @@ func (r *Response) Body() *String { return newString(opChain, "") } - content, ok := r.getContent(opChain) + content, ok := r.getContent(opChain, "Body()") if !ok { return newString(opChain, "") } @@ -593,7 +621,7 @@ func (r *Response) NoContent() *Response { return r } - content, ok := r.getContent(opChain) + content, ok := r.getContent(opChain, "NoContent()") if !ok { return r } @@ -726,7 +754,7 @@ func (r *Response) Text(options ...ContentOpts) *String { return newString(opChain, "") } - content, ok := r.getContent(opChain) + content, ok := r.getContent(opChain, "Text()") if !ok { return newString(opChain, "") } @@ -765,19 +793,19 @@ func (r *Response) Form(options ...ContentOpts) *Object { return newObject(opChain, nil) } - object := r.getForm(opChain, options...) + object := r.getForm(opChain, "Form()", options...) return newObject(opChain, object) } func (r *Response) getForm( - opChain *chain, options ...ContentOpts, + opChain *chain, method string, options ...ContentOpts, ) map[string]interface{} { if !r.checkContentOptions(opChain, options, "application/x-www-form-urlencoded", "") { return nil } - content, ok := r.getContent(opChain) + content, ok := r.getContent(opChain, method) if !ok { return nil } @@ -833,17 +861,19 @@ func (r *Response) JSON(options ...ContentOpts) *Value { return newValue(opChain, nil) } - value := r.getJSON(opChain, options...) + value := r.getJSON(opChain, "JSON()", options...) return newValue(opChain, value) } -func (r *Response) getJSON(opChain *chain, options ...ContentOpts) interface{} { +func (r *Response) getJSON( + opChain *chain, method string, options ...ContentOpts, +) interface{} { if !r.checkContentOptions(opChain, options, "application/json") { return nil } - content, ok := r.getContent(opChain) + content, ok := r.getContent(opChain, method) if !ok { return nil } @@ -905,7 +935,7 @@ func (r *Response) JSONP(callback string, options ...ContentOpts) *Value { return newValue(opChain, nil) } - value := r.getJSONP(opChain, callback, options...) + value := r.getJSONP(opChain, "JSONP()", callback, options...) return newValue(opChain, value) } @@ -915,13 +945,13 @@ var ( ) func (r *Response) getJSONP( - opChain *chain, callback string, options ...ContentOpts, + opChain *chain, method string, callback string, options ...ContentOpts, ) interface{} { if !r.checkContentOptions(opChain, options, "application/javascript") { return nil } - content, ok := r.getContent(opChain) + content, ok := r.getContent(opChain, method) if !ok { return nil } @@ -961,6 +991,43 @@ func (r *Response) getJSONP( return value } +// Reader returns the body reader from the response. +// +// Reader replaces the other methods for reading response body +// and disables rewinding when reading. +// +// Example: +// +// resp := NewResponse(t, response) +// reader := resp.Reader() +func (r *Response) Reader() io.ReadCloser { + opChain := r.chain.enter("Reader()") + defer opChain.leave() + + if opChain.failed() { + return newErrorReader(errors.New("cannot call Reader() because chain has failed")) + } + + if r.contentState != contentPending { + err := fmt.Errorf("cannot call Reader() because %s was already called", r.contentMethod) + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{err}, + }) + return newErrorReader(err) + } + + resp := r.httpResp + bw, ok := resp.Body.(*bodyWrapper) + if ok && bw != nil { + bw.DisableRewinds() + } + + r.contentState = contentHijacked + + return resp.Body +} + func (r *Response) checkContentOptions( opChain *chain, options []ContentOpts, expectedType string, expectedCharset ...string, ) bool { diff --git a/response_test.go b/response_test.go index 56e2fe218..c124a89d9 100644 --- a/response_test.go +++ b/response_test.go @@ -600,7 +600,7 @@ func TestResponse_BodyDeferred(t *testing.T) { // Invoke getContent() chain := resp.chain.enter("Test()") - content, ok := resp.getContent(chain) + content, ok := resp.getContent(chain, "Test()") chain.assert(t, failure) assert.Nil(t, content) @@ -611,6 +611,22 @@ func TestResponse_BodyDeferred(t *testing.T) { assert.Nil(t, resp.content) assert.Equal(t, contentFailed, resp.contentState) }) + + t.Run("content hijacked", func(t *testing.T) { + reporter := newMockReporter(t) + + resp := NewResponse(reporter, &http.Response{ + StatusCode: http.StatusOK, + Header: map[string][]string{ + "Content-Type": {"text/plain; charset=utf-8"}, + }, + Body: newMockBody("hijacked body"), + }) + resp.contentState = contentHijacked + + body := resp.Body() + body.IsEmpty() + }) } func TestResponse_NoContent(t *testing.T) { @@ -1683,3 +1699,152 @@ func TestResponse_Usage(t *testing.T) { resp.chain.assert(t, failure) }) } + +func TestResponse_Reader(t *testing.T) { + t.Run("get reader", func(t *testing.T) { + reporter := newMockReporter(t) + httpResp := &http.Response{ + StatusCode: http.StatusOK, + Header: http.Header(map[string][]string{ + "Content-Type": {"text/plain; charset=utf-8"}, + }), + Body: newMockBody("test body"), + } + resp := NewResponse(reporter, httpResp) + + reader := resp.Reader() + assert.Equal(t, contentHijacked, resp.contentState) + assert.Equal(t, "", resp.contentMethod) + resp.chain.assert(t, success) + + err := reader.Close() + assert.NoError(t, err) + }) + t.Run("rewind disabled", func(t *testing.T) { + reporter := newMockReporter(t) + bw := newBodyWrapper(newMockBody("test"), nil) + httpResp := &http.Response{ + StatusCode: http.StatusOK, + Header: http.Header(map[string][]string{ + "Content-Type": {"text/plain; charset=utf-8"}, + }), + Body: bw, + } + resp := NewResponse(reporter, httpResp) + + reader := resp.Reader() + resp.chain.assert(t, success) + assert.True(t, bw.isRewindDisabled) + + err := reader.Close() + assert.NoError(t, err) + }) + t.Run("Body()", func(t *testing.T) { + reporter := newMockReporter(t) + httpResp := &http.Response{ + StatusCode: http.StatusOK, + Header: http.Header(map[string][]string{ + "Content-Type": {"text/plain; charset=utf-8"}, + }), + Body: newMockBody("test body"), + } + resp := NewResponse(reporter, httpResp) + + body := resp.Body() + assert.Equal(t, "test body", body.value) + assert.Equal(t, resp.contentMethod, "Body()") + + reader := resp.Reader() + resp.chain.assert(t, failure) + + err := reader.Close() + assert.Error(t, err) + }) + t.Run("Text()", func(t *testing.T) { + reporter := newMockReporter(t) + httpResp := &http.Response{ + StatusCode: http.StatusOK, + Header: http.Header(map[string][]string{ + "Content-Type": {"text/plain; charset=utf-8"}, + }), + Body: newMockBody("test text"), + } + resp := NewResponse(reporter, httpResp) + + txt := resp.Text() + assert.Equal(t, "test text", txt.value) + assert.Equal(t, resp.contentMethod, "Text()") + + reader := resp.Reader() + resp.chain.assert(t, failure) + + err := reader.Close() + assert.Error(t, err) + }) + t.Run("Form()", func(t *testing.T) { + reporter := newMockReporter(t) + httpResp := &http.Response{ + StatusCode: http.StatusOK, + Header: http.Header(map[string][]string{ + "Content-Type": {"application/x-www-form-urlencoded"}, + }), + Body: newMockBody("x=1&y=0"), + } + resp := NewResponse(reporter, httpResp) + + form := resp.Form() + form.IsEqual(map[string]string{ + "x": "1", + "y": "0", + }) + + reader := resp.Reader() + resp.chain.assert(t, failure) + + err := reader.Close() + assert.Error(t, err) + }) + t.Run("JSON()", func(t *testing.T) { + reporter := newMockReporter(t) + httpResp := &http.Response{ + StatusCode: http.StatusOK, + Header: http.Header(map[string][]string{ + "Content-Type": {"application/json"}, + }), + Body: newMockBody(`{"a":"test","b":"value"}`), + } + resp := NewResponse(reporter, httpResp) + + json := resp.JSON() + json.IsEqual(map[string]string{ + "a": "test", + "b": "value", + }) + + reader := resp.Reader() + resp.chain.assert(t, failure) + + err := reader.Close() + assert.Error(t, err) + }) + t.Run("JSONP()", func(t *testing.T) { + reporter := newMockReporter(t) + httpResp := &http.Response{ + StatusCode: http.StatusOK, + Header: http.Header(map[string][]string{ + "Content-Type": {"application/javascript; charset=utf-8"}, + }), + Body: newMockBody(`cb({"test_key":"test_value"})`), + } + resp := NewResponse(reporter, httpResp) + + value := resp.JSONP("cb") + value.IsEqual(map[string]string{"test_key": "test_value"}) + + reader := resp.Reader() + resp.chain.assert(t, failure) + + err := reader.Close() + assert.Error(t, err) + }) +} From a84161038eba21d12e985ab9ee2c82863744e5cb Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Fri, 6 Oct 2023 15:00:20 +0400 Subject: [PATCH 50/57] Cleanup Response.Reader implementation and tests --- e2e/chunked_test.go | 57 +++++--- printer_test.go | 10 +- response.go | 109 +++++++------- response_test.go | 339 ++++++++++++++++++++++++-------------------- 4 files changed, 283 insertions(+), 232 deletions(-) diff --git a/e2e/chunked_test.go b/e2e/chunked_test.go index c4ac17133..41142be72 100644 --- a/e2e/chunked_test.go +++ b/e2e/chunked_test.go @@ -2,6 +2,7 @@ package e2e import ( "bufio" + "io" "net/http" "net/http/httptest" "strings" @@ -101,30 +102,54 @@ func TestE2EChunked_BinderFast(t *testing.T) { func TestE2EChunked_ResponseReader(t *testing.T) { const chars = "abcdefghijklmnopqrstuvwxyz" + + doneCh := make(chan struct{}) + mux := http.NewServeMux() mux.HandleFunc("/test", func(w http.ResponseWriter, r *http.Request) { - b := make([]byte, 1000000) - for i := range b { - b[i] = chars[i%26] + w.Header().Add("Content-Type", "text/plain") + for { + wb := make([]byte, len(chars)*10) + for i := range wb { + wb[i] = chars[i%26] + } + _, err := w.Write(wb) + if err != nil { + break + } + w.(http.Flusher).Flush() } - w.Header().Add("Content-Type", "text/plain; charset=utf-8") - _, _ = w.Write(b) + close(doneCh) }) - e := httpexpect.WithConfig(httpexpect.Config{ - BaseURL: "http://example.com", - Reporter: httpexpect.NewAssertReporter(t), - Client: &http.Client{ - Transport: httpexpect.NewBinder(mux), - }, - }) - reader := e.GET("/test").Expect().Reader() + + server := httptest.NewServer(mux) + defer server.Close() + + e := httpexpect.Default(t, server.URL) + + resp := e.GET("/test").Expect() + + resp.Status(http.StatusOK). + HasContentType("text/plain"). + HasTransferEncoding("chunked") + + reader := resp.Reader() rb := make([]byte, 1000000) - l, err := reader.Read(rb) + n, err := io.ReadFull(reader, rb) assert.NoError(t, err) - assert.Equal(t, 1000000, l) - assert.Equal(t, chars, string(rb[0:26])) + assert.Equal(t, 1000000, n) + + diff := 0 + for i := range rb { + if rb[i] != chars[i%26] { + diff++ + } + } + assert.Equal(t, 0, diff) err = reader.Close() assert.NoError(t, err) + + <-doneCh } diff --git a/printer_test.go b/printer_test.go index 96ce7ef14..4ddbf07cc 100644 --- a/printer_test.go +++ b/printer_test.go @@ -10,13 +10,13 @@ import ( "github.com/stretchr/testify/assert" ) -type errorReader struct{} +type failingReader struct{} -func (errorReader) Read(_ []byte) (n int, err error) { +func (failingReader) Read(_ []byte) (n int, err error) { return 0, errors.New("error") } -func (errorReader) Close() error { +func (failingReader) Close() error { return errors.New("error") } @@ -70,13 +70,13 @@ func TestPrinter_Panics(t *testing.T) { assert.Panics(t, func() { curl.Request(&http.Request{ - Body: errorReader{}, + Body: failingReader{}, }) }) assert.Panics(t, func() { curl.Response(&http.Response{ - Body: errorReader{}, + Body: failingReader{}, }, 0) }) }) diff --git a/response.go b/response.go index b0edb9cb5..2e9337b43 100644 --- a/response.go +++ b/response.go @@ -35,28 +35,16 @@ type Response struct { cookies []*http.Cookie } -type ErrorReader struct { - err error -} - -func (er *ErrorReader) Read(_ []byte) (int, error) { - return 0, er.err -} - -func (er *ErrorReader) Close() error { - return er.err -} - -func newErrorReader(err error) *ErrorReader { - return &ErrorReader{err} -} - type contentState int const ( + // We didn't try to retrieve response content yet contentPending contentState = iota + // We successfully retrieved response content contentRetreived + // We tried to retrieve response content and failed contentFailed + // We transferred body reader to user and will not use it by ourselves contentHijacked ) @@ -583,6 +571,44 @@ func (r *Response) Websocket() *Websocket { return newWebsocket(opChain, r.config, r.websocket) } +// Reader returns the body reader from the response. +// +// This method is mutually exclusive with methods that read entire +// response body, like Text, Body, JSON, etc. It can be used when +// you need to parse body manually or retrieve infinite responses. +// +// Example: +// +// resp := NewResponse(t, response) +// reader := resp.Reader() +func (r *Response) Reader() io.ReadCloser { + opChain := r.chain.enter("Reader()") + defer opChain.leave() + + if opChain.failed() { + return errBodyReader{errors.New("cannot read from failed Response")} + } + + if r.contentState != contentPending { + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{ + fmt.Errorf("cannot call Reader() because %s was already called", + r.contentMethod), + }, + }) + return errBodyReader{errors.New("cannot read from failed Response")} + } + + if bw, _ := r.httpResp.Body.(*bodyWrapper); bw != nil { + bw.DisableRewinds() + } + + r.contentState = contentHijacked + + return r.httpResp.Body +} + // Body returns a new String instance with response body. // // Example: @@ -916,7 +942,7 @@ func (r *Response) getJSON( // resp.JSONP("myCallback").Array().ConsistsOf("foo", "bar") // resp.JSONP("myCallback", ContentOpts{ // MediaType: "application/javascript", -// }).Array.ConsistsOf("foo", "bar") +// }).Array().ConsistsOf("foo", "bar") func (r *Response) JSONP(callback string, options ...ContentOpts) *Value { opChain := r.chain.enter("JSONP()") defer opChain.leave() @@ -991,43 +1017,6 @@ func (r *Response) getJSONP( return value } -// Reader returns the body reader from the response. -// -// Reader replaces the other methods for reading response body -// and disables rewinding when reading. -// -// Example: -// -// resp := NewResponse(t, response) -// reader := resp.Reader() -func (r *Response) Reader() io.ReadCloser { - opChain := r.chain.enter("Reader()") - defer opChain.leave() - - if opChain.failed() { - return newErrorReader(errors.New("cannot call Reader() because chain has failed")) - } - - if r.contentState != contentPending { - err := fmt.Errorf("cannot call Reader() because %s was already called", r.contentMethod) - opChain.fail(AssertionFailure{ - Type: AssertUsage, - Errors: []error{err}, - }) - return newErrorReader(err) - } - - resp := r.httpResp - bw, ok := resp.Body.(*bodyWrapper) - if ok && bw != nil { - bw.DisableRewinds() - } - - r.contentState = contentHijacked - - return resp.Body -} - func (r *Response) checkContentOptions( opChain *chain, options []ContentOpts, expectedType string, expectedCharset ...string, ) bool { @@ -1126,3 +1115,15 @@ func (r *Response) checkEqual( return true } + +type errBodyReader struct { + err error +} + +func (r errBodyReader) Read(_ []byte) (int, error) { + return 0, r.err +} + +func (r errBodyReader) Close() error { + return r.err +} diff --git a/response_test.go b/response_test.go index c124a89d9..59f3378f7 100644 --- a/response_test.go +++ b/response_test.go @@ -11,6 +11,7 @@ import ( "time" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestResponse_FailedChain(t *testing.T) { @@ -612,20 +613,38 @@ func TestResponse_BodyDeferred(t *testing.T) { assert.Equal(t, contentFailed, resp.contentState) }) - t.Run("content hijacked", func(t *testing.T) { + t.Run("hijacked state", func(t *testing.T) { reporter := newMockReporter(t) + body := newMockBody("body string") + resp := NewResponse(reporter, &http.Response{ StatusCode: http.StatusOK, - Header: map[string][]string{ - "Content-Type": {"text/plain; charset=utf-8"}, - }, - Body: newMockBody("hijacked body"), + Body: body, }) - resp.contentState = contentHijacked - body := resp.Body() - body.IsEmpty() + assert.Equal(t, 0, body.readCount) + assert.Equal(t, 0, body.closeCount) + assert.Nil(t, resp.content) + assert.Equal(t, contentPending, resp.contentState) + + // Hijack body + reader := resp.Reader() + assert.NotNil(t, reader) + resp.chain.assert(t, success) + + // Invoke getContent() + chain := resp.chain.enter("Test()") + content, ok := resp.getContent(chain, "Test()") + + chain.assert(t, failure) + assert.Nil(t, content) + assert.False(t, ok) + + assert.Equal(t, 0, body.readCount) + assert.Equal(t, 0, body.closeCount) + assert.Nil(t, resp.content) + assert.Equal(t, contentHijacked, resp.contentState) }) } @@ -1583,6 +1602,161 @@ func TestResponse_ContentOpts(t *testing.T) { }) } +func TestResponse_Reader(t *testing.T) { + t.Run("read body", func(t *testing.T) { + reporter := newMockReporter(t) + httpResp := &http.Response{ + StatusCode: http.StatusOK, + Body: newMockBody("test body"), + } + resp := NewResponse(reporter, httpResp) + + reader := resp.Reader() + require.NotNil(t, reader) + resp.chain.assert(t, success) + + b, err := io.ReadAll(reader) + assert.NoError(t, err) + assert.Equal(t, "test body", string(b)) + + err = reader.Close() + assert.NoError(t, err) + }) + + t.Run("rewinds disabled", func(t *testing.T) { + wrp := newBodyWrapper(newMockBody("test"), nil) + + reporter := newMockReporter(t) + httpResp := &http.Response{ + StatusCode: http.StatusOK, + Body: wrp, + } + resp := NewResponse(reporter, httpResp) + + assert.False(t, wrp.isRewindDisabled) + + reader := resp.Reader() + require.NotNil(t, reader) + resp.chain.assert(t, success) + + assert.True(t, wrp.isRewindDisabled) + + err := reader.Close() + assert.NoError(t, err) + }) + + t.Run("conflicts", func(t *testing.T) { + cases := []struct { + name string + contentType string + body string + method func(resp *Response) *chain + }{ + { + name: "Body", + contentType: "text/plain; charset=utf-8", + body: `test`, + method: func(resp *Response) *chain { + return resp.Body().chain + }, + }, + { + name: "Text", + contentType: "text/plain; charset=utf-8", + body: `test`, + method: func(resp *Response) *chain { + return resp.Text().chain + }, + }, + { + name: "Form", + contentType: "application/x-www-form-urlencoded", + body: `x=1&y=0`, + method: func(resp *Response) *chain { + return resp.Form().chain + }, + }, + { + name: "JSON", + contentType: "application/json", + body: `{"x":"y"}`, + method: func(resp *Response) *chain { + return resp.JSON().chain + }, + }, + { + name: "JSONP", + contentType: "application/javascript", + body: `test({"x":"y"})`, + method: func(resp *Response) *chain { + return resp.JSONP("test").chain + }, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + t.Run("before reader", func(t *testing.T) { + reporter := newMockReporter(t) + httpResp := &http.Response{ + StatusCode: http.StatusOK, + Header: http.Header(map[string][]string{ + "Content-Type": {tc.contentType}, + }), + Body: newMockBody(tc.body), + } + resp := NewResponse(reporter, httpResp) + + // other method reads body + tc.method(resp).assert(t, success) + + // Reader will fail + reader := resp.Reader() + require.NotNil(t, reader) + resp.chain.assert(t, failure) + + b, err := io.ReadAll(reader) + assert.Error(t, err) + assert.Empty(t, b) + + err = reader.Close() + assert.Error(t, err) + }) + }) + + t.Run(tc.name, func(t *testing.T) { + t.Run("after reader", func(t *testing.T) { + reporter := newMockReporter(t) + httpResp := &http.Response{ + StatusCode: http.StatusOK, + Header: http.Header(map[string][]string{ + "Content-Type": {tc.contentType}, + }), + Body: newMockBody(tc.body), + } + resp := NewResponse(reporter, httpResp) + + // Reader hijacks body + reader := resp.Reader() + require.NotNil(t, reader) + resp.chain.assert(t, success) + + // other method will fail + tc.method(resp).assert(t, failure) + resp.chain.assert(t, failure) + + b, err := io.ReadAll(reader) + assert.NoError(t, err) + assert.Equal(t, tc.body, string(b)) + + err = reader.Close() + assert.NoError(t, err) + }) + }) + } + }) +} + func TestResponse_Usage(t *testing.T) { t.Run("NewResponse multiple rtt arguments", func(t *testing.T) { reporter := newMockReporter(t) @@ -1699,152 +1873,3 @@ func TestResponse_Usage(t *testing.T) { resp.chain.assert(t, failure) }) } - -func TestResponse_Reader(t *testing.T) { - t.Run("get reader", func(t *testing.T) { - reporter := newMockReporter(t) - httpResp := &http.Response{ - StatusCode: http.StatusOK, - Header: http.Header(map[string][]string{ - "Content-Type": {"text/plain; charset=utf-8"}, - }), - Body: newMockBody("test body"), - } - resp := NewResponse(reporter, httpResp) - - reader := resp.Reader() - assert.Equal(t, contentHijacked, resp.contentState) - assert.Equal(t, "", resp.contentMethod) - resp.chain.assert(t, success) - - err := reader.Close() - assert.NoError(t, err) - }) - t.Run("rewind disabled", func(t *testing.T) { - reporter := newMockReporter(t) - bw := newBodyWrapper(newMockBody("test"), nil) - httpResp := &http.Response{ - StatusCode: http.StatusOK, - Header: http.Header(map[string][]string{ - "Content-Type": {"text/plain; charset=utf-8"}, - }), - Body: bw, - } - resp := NewResponse(reporter, httpResp) - - reader := resp.Reader() - resp.chain.assert(t, success) - assert.True(t, bw.isRewindDisabled) - - err := reader.Close() - assert.NoError(t, err) - }) - t.Run("Body()", func(t *testing.T) { - reporter := newMockReporter(t) - httpResp := &http.Response{ - StatusCode: http.StatusOK, - Header: http.Header(map[string][]string{ - "Content-Type": {"text/plain; charset=utf-8"}, - }), - Body: newMockBody("test body"), - } - resp := NewResponse(reporter, httpResp) - - body := resp.Body() - assert.Equal(t, "test body", body.value) - assert.Equal(t, resp.contentMethod, "Body()") - - reader := resp.Reader() - resp.chain.assert(t, failure) - - err := reader.Close() - assert.Error(t, err) - }) - t.Run("Text()", func(t *testing.T) { - reporter := newMockReporter(t) - httpResp := &http.Response{ - StatusCode: http.StatusOK, - Header: http.Header(map[string][]string{ - "Content-Type": {"text/plain; charset=utf-8"}, - }), - Body: newMockBody("test text"), - } - resp := NewResponse(reporter, httpResp) - - txt := resp.Text() - assert.Equal(t, "test text", txt.value) - assert.Equal(t, resp.contentMethod, "Text()") - - reader := resp.Reader() - resp.chain.assert(t, failure) - - err := reader.Close() - assert.Error(t, err) - }) - t.Run("Form()", func(t *testing.T) { - reporter := newMockReporter(t) - httpResp := &http.Response{ - StatusCode: http.StatusOK, - Header: http.Header(map[string][]string{ - "Content-Type": {"application/x-www-form-urlencoded"}, - }), - Body: newMockBody("x=1&y=0"), - } - resp := NewResponse(reporter, httpResp) - - form := resp.Form() - form.IsEqual(map[string]string{ - "x": "1", - "y": "0", - }) - - reader := resp.Reader() - resp.chain.assert(t, failure) - - err := reader.Close() - assert.Error(t, err) - }) - t.Run("JSON()", func(t *testing.T) { - reporter := newMockReporter(t) - httpResp := &http.Response{ - StatusCode: http.StatusOK, - Header: http.Header(map[string][]string{ - "Content-Type": {"application/json"}, - }), - Body: newMockBody(`{"a":"test","b":"value"}`), - } - resp := NewResponse(reporter, httpResp) - - json := resp.JSON() - json.IsEqual(map[string]string{ - "a": "test", - "b": "value", - }) - - reader := resp.Reader() - resp.chain.assert(t, failure) - - err := reader.Close() - assert.Error(t, err) - }) - t.Run("JSONP()", func(t *testing.T) { - reporter := newMockReporter(t) - httpResp := &http.Response{ - StatusCode: http.StatusOK, - Header: http.Header(map[string][]string{ - "Content-Type": {"application/javascript; charset=utf-8"}, - }), - Body: newMockBody(`cb({"test_key":"test_value"})`), - } - resp := NewResponse(reporter, httpResp) - - value := resp.JSONP("cb") - value.IsEqual(map[string]string{"test_key": "test_value"}) - - reader := resp.Reader() - resp.chain.assert(t, failure) - - err := reader.Close() - assert.Error(t, err) - }) -} From 410a9bd2c3a42b8f3134880e090f2600ff716684 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Fri, 6 Oct 2023 15:00:27 +0400 Subject: [PATCH 51/57] Bump example deps --- _examples/go.mod | 6 +++--- _examples/go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/_examples/go.mod b/_examples/go.mod index 0783db75c..09c564ded 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -101,9 +101,9 @@ require ( github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/net v0.15.0 // indirect - golang.org/x/sys v0.12.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/net v0.16.0 // indirect + golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/protobuf v1.30.0 // indirect diff --git a/_examples/go.sum b/_examples/go.sum index 790551997..922d032aa 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -305,8 +305,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= @@ -324,8 +324,8 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= +golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= @@ -360,8 +360,8 @@ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= From d5439782d09342ea53c28faa7de5273fd8a51a6c Mon Sep 17 00:00:00 2001 From: Carlos Robles Date: Sat, 7 Oct 2023 05:08:43 -0500 Subject: [PATCH 52/57] Implement Number.InDeltaRelative (#306) --- number.go | 271 +++++++++++++++++++++++++++++++++++++++++++++++++ number_test.go | 162 +++++++++++++++++++++++++++++ 2 files changed, 433 insertions(+) diff --git a/number.go b/number.go index 389a8585d..c91d3daaf 100644 --- a/number.go +++ b/number.go @@ -273,6 +273,217 @@ func (n *Number) NotInDelta(value, delta float64) *Number { return n } +// InDeltaRelative succeeds if two numbers are within relative delta of each other. +// +// The relative delta is expressed as a decimal. For example, to determine if a number +// and a value are within 1% of each other, use 0.01. +// +// A number and a value are within relative delta if +// Abs(number-value) / Abs(number) < relative delta. +// +// Please note that number, value, and delta can't be NaN, number and value can't +// be opposite Inf and delta cannot be Inf. +// +// Example: +// +// number := NewNumber(t, 123.0) +// number.InDeltaRelative(126.5, 0.03) +func (n *Number) InDeltaRelative(value, delta float64) *Number { + opChain := n.chain.enter("InDeltaRelative()") + defer opChain.leave() + + if opChain.failed() { + return n + } + + anyNumIsNaN := math.IsNaN(n.value) || math.IsNaN(value) || math.IsNaN(delta) + + if anyNumIsNaN { + assertionErrors := numNaNCheck(n.value, value, delta) + + opChain.fail(AssertionFailure{ + Type: AssertEqual, + Actual: &AssertionValue{n.value}, + Expected: &AssertionValue{value}, + Delta: &AssertionValue{relativeDelta(delta)}, + Errors: assertionErrors, + }) + return n + } + + if math.IsInf(delta, 0) { + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{ + errors.New("unexpected Inf delta argument"), + }, + }) + return n + } + + if delta < 0 { + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{ + errors.New("unexpected negative delta argument"), + }, + }) + return n + } + + // Pass if number and value are +-Inf and equal, + // regardless if delta is 0 or positive number + sameInfNumCheck := math.IsInf(n.value, 0) && math.IsInf(value, 0) && value == n.value + if sameInfNumCheck { + return n + } + + // Fail if number and value are +=Inf and unequal with specific error message + diffInfNumCheck := math.IsInf(n.value, 0) && math.IsInf(value, 0) && value != n.value + if diffInfNumCheck { + var assertionErrors []error + assertionErrors = append( + assertionErrors, + errors.New("expected: can compare values with relative delta"), + errors.New("actual value and expected value are opposite Infs"), + ) + opChain.fail(AssertionFailure{ + Type: AssertEqual, + Actual: &AssertionValue{n.value}, + Expected: &AssertionValue{value}, + Delta: &AssertionValue{relativeDelta(delta)}, + Errors: assertionErrors, + }) + return n + } + + deltaRelativeError := deltaRelativeErrorCheck(true, n.value, value, delta) + if deltaRelativeError { + opChain.fail(AssertionFailure{ + Type: AssertEqual, + Actual: &AssertionValue{n.value}, + Expected: &AssertionValue{value}, + Delta: &AssertionValue{relativeDelta(delta)}, + Errors: []error{ + errors.New("expected: numbers lie within relative delta"), + }, + }) + return n + } + + return n +} + +// NotInDeltaRelative succeeds if two numbers aren't within relative delta of each other. +// +// The relative delta is expressed as a decimal. For example, to determine if a number +// and a value are within 1% of each other, use 0.01. +// +// A number and a value are within relative delta if +// Abs(number-value) / Abs(number) < relative delta. +// +// Please note that number, value, and delta can't be NaN, number and value can't +// be opposite Inf and delta cannot be Inf. +// +// Example: +// +// number := NewNumber(t, 123.0) +// number.NotInDeltaRelative(126.5, 0.01) +func (n *Number) NotInDeltaRelative(value, delta float64) *Number { + opChain := n.chain.enter("NotInDeltaRelative()") + defer opChain.leave() + + if opChain.failed() { + return n + } + + anyNumIsNaN := math.IsNaN(n.value) || math.IsNaN(value) || math.IsNaN(delta) + + if anyNumIsNaN { + assertionErrors := numNaNCheck(n.value, value, delta) + + opChain.fail(AssertionFailure{ + Type: AssertEqual, + Actual: &AssertionValue{n.value}, + Expected: &AssertionValue{value}, + Delta: &AssertionValue{relativeDelta(delta)}, + Errors: assertionErrors, + }) + return n + } + + if math.IsInf(delta, 0) { + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{ + errors.New("unexpected Inf delta argument"), + }, + }) + return n + } + + if delta < 0 { + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{ + errors.New("unexpected negative delta argument"), + }, + }) + return n + } + + // Fail if number and value are +-Inf and equal, + // regardless if delta is 0 or positive number + sameInfNumCheck := math.IsInf(n.value, 0) && math.IsInf(value, 0) && value == n.value + if sameInfNumCheck { + opChain.fail(AssertionFailure{ + Type: AssertEqual, + Actual: &AssertionValue{n.value}, + Expected: &AssertionValue{value}, + Delta: &AssertionValue{relativeDelta(delta)}, + Errors: []error{ + errors.New("expected: numbers lie within relative delta"), + }, + }) + return n + } + + // Fail is number and value are +=Inf and unequal with specific error message + diffInfNumCheck := math.IsInf(n.value, 0) && math.IsInf(value, 0) && value != n.value + if diffInfNumCheck { + var assertionErrors []error + assertionErrors = append( + assertionErrors, + errors.New("expected: can compare values with relative delta"), + errors.New("actual value and expected value are opposite Infs"), + ) + opChain.fail(AssertionFailure{ + Type: AssertEqual, + Actual: &AssertionValue{n.value}, + Expected: &AssertionValue{value}, + Delta: &AssertionValue{relativeDelta(delta)}, + Errors: assertionErrors, + }) + return n + } + + deltaRelativeError := deltaRelativeErrorCheck(false, n.value, value, delta) + if deltaRelativeError { + opChain.fail(AssertionFailure{ + Type: AssertEqual, + Actual: &AssertionValue{n.value}, + Expected: &AssertionValue{value}, + Delta: &AssertionValue{relativeDelta(delta)}, + Errors: []error{ + errors.New("expected: numbers lie within relative delta"), + }, + }) + return n + } + + return n +} + // Deprecated: use InDelta instead. func (n *Number) EqualDelta(value, delta float64) *Number { return n.InDelta(value, delta) @@ -1091,3 +1302,63 @@ func (b intBoundary) String() string { } return fmt.Sprintf("%s", b.val) } + +type relativeDelta float64 + +func (rd relativeDelta) String() string { + return fmt.Sprintf("%v (%.f%%)", float64(rd), rd*100) +} + +func appendError(errorSlice []error, errorMsg string) []error { + return append( + errorSlice, + errors.New(errorMsg), + ) +} + +func deltaRelativeErrorCheck(inDeltaRelative bool, number, value, delta float64) bool { + if (number == 0 || math.IsInf(number, 0)) && value != number { + return true + } + if math.Abs(number-value)/math.Abs(number) > delta { + if inDeltaRelative { + return true + } + } else { + if !(inDeltaRelative) { + return true + } + } + return false +} + +func numNaNCheck(number, value, delta float64) []error { + var assertionErrors []error + assertionErrors = appendError( + assertionErrors, + "expected: can compare values with relative delta", + ) + + if math.IsNaN(number) { + assertionErrors = appendError( + assertionErrors, + "actual value is NaN", + ) + } + + if math.IsNaN(value) { + assertionErrors = appendError( + assertionErrors, + "expected value is NaN", + ) + } + + if math.IsNaN(delta) { + assertionErrors = appendError( + assertionErrors, + "delta is NaN", + ) + } + + return assertionErrors +} diff --git a/number_test.go b/number_test.go index 8778f14b9..b09c057eb 100644 --- a/number_test.go +++ b/number_test.go @@ -24,6 +24,8 @@ func TestNumber_FailedChain(t *testing.T) { value.NotEqual(0) value.InDelta(0, 0) value.NotInDelta(0, 0) + value.InDeltaRelative(0, 0) + value.NotInDeltaRelative(0, 0) value.InRange(0, 0) value.NotInRange(0, 0) value.InList(0) @@ -317,6 +319,166 @@ func TestNumber_InDelta(t *testing.T) { } } +func TestNumber_InDeltaRelative(t *testing.T) { + cases := []struct { + name string + number float64 + value float64 + delta float64 + wantInDelta chainResult + wantNotInDelta chainResult + }{ + { + name: "larger value in delta range", + number: 1234.5, + value: 1271.5, + delta: 0.03, + wantInDelta: success, + wantNotInDelta: failure, + }, + { + name: "smaller value in delta range", + number: 1234.5, + value: 1221.1, + delta: 0.03, + wantInDelta: success, + wantNotInDelta: failure, + }, + { + name: "larger value not in delta range", + number: 1234.5, + value: 1259.1, + delta: 0.01, + wantInDelta: failure, + wantNotInDelta: success, + }, + { + name: "smaller value not in delta range", + number: 1234.5, + value: 1209.8, + delta: 0.01, + wantInDelta: failure, + wantNotInDelta: success, + }, + { + name: "delta is negative", + number: 1234.5, + value: 1234.0, + delta: -0.01, + wantInDelta: failure, + wantNotInDelta: failure, + }, + { + name: "target is NaN", + number: math.NaN(), + value: 1234.0, + delta: 0.01, + wantInDelta: failure, + wantNotInDelta: failure, + }, + { + name: "value is NaN", + number: 1234.5, + value: math.NaN(), + delta: 0.01, + wantInDelta: failure, + wantNotInDelta: failure, + }, + { + name: "delta is NaN", + number: 1234.5, + value: 1234.0, + delta: math.NaN(), + wantInDelta: failure, + wantNotInDelta: failure, + }, + { + name: "delta is +Inf", + number: 1234.5, + value: 1234.0, + delta: math.Inf(1), + wantInDelta: failure, + wantNotInDelta: failure, + }, + { + name: "+Inf target", + number: math.Inf(1), + value: 1234.0, + delta: 0, + wantInDelta: failure, + wantNotInDelta: failure, + }, + { + name: "-Inf value", + number: 1234.5, + value: math.Inf(-1), + delta: 0.01, + wantInDelta: failure, + wantNotInDelta: success, + }, + { + name: "+Inf number and target with 0 delta", + number: math.Inf(1), + value: math.Inf(1), + delta: 0, + wantInDelta: success, + wantNotInDelta: failure, + }, + { + name: "-Inf number and target with 0 delta", + number: math.Inf(-1), + value: math.Inf(-1), + delta: 0, + wantInDelta: success, + wantNotInDelta: failure, + }, + { + name: "+Inf number and -Inf target", + number: math.Inf(1), + value: math.Inf(-1), + delta: 0, + wantInDelta: failure, + wantNotInDelta: failure, + }, + { + name: "target is 0 in delta range", + number: 0, + value: 0, + delta: 0, + wantInDelta: success, + wantNotInDelta: failure, + }, + { + name: "value is 0 in delta range", + number: 0.05, + value: 0, + delta: 1.0, + wantInDelta: success, + wantNotInDelta: failure, + }, + { + name: "value is 0 not in delta range", + number: 0.01, + value: 0, + delta: 0.01, + wantInDelta: failure, + wantNotInDelta: success, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + reporter := newMockReporter(t) + + NewNumber(reporter, tc.number).InDeltaRelative(tc.value, tc.delta). + chain.assert(t, tc.wantInDelta) + + NewNumber(reporter, tc.number).NotInDeltaRelative(tc.value, tc.delta). + chain.assert(t, tc.wantNotInDelta) + }) + } +} + func TestNumber_InRange(t *testing.T) { t.Run("basic", func(t *testing.T) { cases := []struct { From 2b1131c5dcb3b2d14a5d0227562bc079b0b0af56 Mon Sep 17 00:00:00 2001 From: Victor Gaydov Date: Sat, 7 Oct 2023 14:09:29 +0400 Subject: [PATCH 53/57] Refine InDeltaRelative --- number.go | 197 +++++++++++++++++++++++++------------------------ number_test.go | 34 ++++++++- 2 files changed, 132 insertions(+), 99 deletions(-) diff --git a/number.go b/number.go index c91d3daaf..d11e8f5d5 100644 --- a/number.go +++ b/number.go @@ -197,7 +197,17 @@ func (n *Number) InDelta(value, delta float64) *Number { return n } - if math.IsNaN(n.value) || math.IsNaN(value) || math.IsNaN(delta) { + if math.IsNaN(delta) { + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{ + errors.New("unexpected NaN delta argument"), + }, + }) + return n + } + + if math.IsNaN(n.value) || math.IsNaN(value) { opChain.fail(AssertionFailure{ Type: AssertEqual, Actual: &AssertionValue{n.value}, @@ -242,7 +252,17 @@ func (n *Number) NotInDelta(value, delta float64) *Number { return n } - if math.IsNaN(n.value) || math.IsNaN(value) || math.IsNaN(delta) { + if math.IsNaN(delta) { + opChain.fail(AssertionFailure{ + Type: AssertUsage, + Errors: []error{ + errors.New("unexpected NaN delta argument"), + }, + }) + return n + } + + if math.IsNaN(n.value) || math.IsNaN(value) { opChain.fail(AssertionFailure{ Type: AssertNotEqual, Actual: &AssertionValue{n.value}, @@ -273,6 +293,16 @@ func (n *Number) NotInDelta(value, delta float64) *Number { return n } +// Deprecated: use InDelta instead. +func (n *Number) EqualDelta(value, delta float64) *Number { + return n.InDelta(value, delta) +} + +// Deprecated: use NotInDelta instead. +func (n *Number) NotEqualDelta(value, delta float64) *Number { + return n.NotInDelta(value, delta) +} + // InDeltaRelative succeeds if two numbers are within relative delta of each other. // // The relative delta is expressed as a decimal. For example, to determine if a number @@ -296,37 +326,52 @@ func (n *Number) InDeltaRelative(value, delta float64) *Number { return n } - anyNumIsNaN := math.IsNaN(n.value) || math.IsNaN(value) || math.IsNaN(delta) - - if anyNumIsNaN { - assertionErrors := numNaNCheck(n.value, value, delta) - + if math.IsNaN(delta) || math.IsInf(delta, 0) { opChain.fail(AssertionFailure{ - Type: AssertEqual, - Actual: &AssertionValue{n.value}, - Expected: &AssertionValue{value}, - Delta: &AssertionValue{relativeDelta(delta)}, - Errors: assertionErrors, + Type: AssertUsage, + Errors: []error{ + fmt.Errorf("unexpected non-number delta argument: %v", delta), + }, }) return n } - if math.IsInf(delta, 0) { + if delta < 0 { opChain.fail(AssertionFailure{ Type: AssertUsage, Errors: []error{ - errors.New("unexpected Inf delta argument"), + fmt.Errorf("unexpected negative delta argument: %v", delta), }, }) return n } - if delta < 0 { + // Fail if any of the numbers is NaN with specific error message + anyNumIsNaN := math.IsNaN(n.value) || math.IsNaN(value) + if anyNumIsNaN { + var assertionErrors []error + assertionErrors = append( + assertionErrors, + errors.New("expected: can compare values with relative delta"), + ) + if math.IsNaN(n.value) { + assertionErrors = append( + assertionErrors, + errors.New("actual value is NaN"), + ) + } + if math.IsNaN(value) { + assertionErrors = append( + assertionErrors, + errors.New("expected value is NaN"), + ) + } opChain.fail(AssertionFailure{ - Type: AssertUsage, - Errors: []error{ - errors.New("unexpected negative delta argument"), - }, + Type: AssertEqual, + Actual: &AssertionValue{n.value}, + Expected: &AssertionValue{value}, + Delta: &AssertionValue{relativeDelta(delta)}, + Errors: assertionErrors, }) return n } @@ -357,6 +402,7 @@ func (n *Number) InDeltaRelative(value, delta float64) *Number { return n } + // Normal comparison after filtering out all corner cases deltaRelativeError := deltaRelativeErrorCheck(true, n.value, value, delta) if deltaRelativeError { opChain.fail(AssertionFailure{ @@ -397,37 +443,52 @@ func (n *Number) NotInDeltaRelative(value, delta float64) *Number { return n } - anyNumIsNaN := math.IsNaN(n.value) || math.IsNaN(value) || math.IsNaN(delta) - - if anyNumIsNaN { - assertionErrors := numNaNCheck(n.value, value, delta) - + if math.IsNaN(delta) || math.IsInf(delta, 0) { opChain.fail(AssertionFailure{ - Type: AssertEqual, - Actual: &AssertionValue{n.value}, - Expected: &AssertionValue{value}, - Delta: &AssertionValue{relativeDelta(delta)}, - Errors: assertionErrors, + Type: AssertUsage, + Errors: []error{ + fmt.Errorf("unexpected non-number delta argument: %v", delta), + }, }) return n } - if math.IsInf(delta, 0) { + if delta < 0 { opChain.fail(AssertionFailure{ Type: AssertUsage, Errors: []error{ - errors.New("unexpected Inf delta argument"), + fmt.Errorf("unexpected negative delta argument: %v", delta), }, }) return n } - if delta < 0 { + // Fail if any of the numbers is NaN with specific error message + anyNumIsNaN := math.IsNaN(n.value) || math.IsNaN(value) + if anyNumIsNaN { + var assertionErrors []error + assertionErrors = append( + assertionErrors, + errors.New("expected: can compare values with relative delta"), + ) + if math.IsNaN(n.value) { + assertionErrors = append( + assertionErrors, + errors.New("actual value is NaN"), + ) + } + if math.IsNaN(value) { + assertionErrors = append( + assertionErrors, + errors.New("expected value is NaN"), + ) + } opChain.fail(AssertionFailure{ - Type: AssertUsage, - Errors: []error{ - errors.New("unexpected negative delta argument"), - }, + Type: AssertEqual, + Actual: &AssertionValue{n.value}, + Expected: &AssertionValue{value}, + Delta: &AssertionValue{relativeDelta(delta)}, + Errors: assertionErrors, }) return n } @@ -448,25 +509,13 @@ func (n *Number) NotInDeltaRelative(value, delta float64) *Number { return n } - // Fail is number and value are +=Inf and unequal with specific error message + // Pass if number and value are +=Inf and unequal diffInfNumCheck := math.IsInf(n.value, 0) && math.IsInf(value, 0) && value != n.value if diffInfNumCheck { - var assertionErrors []error - assertionErrors = append( - assertionErrors, - errors.New("expected: can compare values with relative delta"), - errors.New("actual value and expected value are opposite Infs"), - ) - opChain.fail(AssertionFailure{ - Type: AssertEqual, - Actual: &AssertionValue{n.value}, - Expected: &AssertionValue{value}, - Delta: &AssertionValue{relativeDelta(delta)}, - Errors: assertionErrors, - }) return n } + // Normal comparison after filtering out all corner cases deltaRelativeError := deltaRelativeErrorCheck(false, n.value, value, delta) if deltaRelativeError { opChain.fail(AssertionFailure{ @@ -484,16 +533,6 @@ func (n *Number) NotInDeltaRelative(value, delta float64) *Number { return n } -// Deprecated: use InDelta instead. -func (n *Number) EqualDelta(value, delta float64) *Number { - return n.InDelta(value, delta) -} - -// Deprecated: use NotInDelta instead. -func (n *Number) NotEqualDelta(value, delta float64) *Number { - return n.NotInDelta(value, delta) -} - // InRange succeeds if number is within given range [min; max]. // // min and max should have numeric type convertible to float64. Before comparison, @@ -1309,13 +1348,6 @@ func (rd relativeDelta) String() string { return fmt.Sprintf("%v (%.f%%)", float64(rd), rd*100) } -func appendError(errorSlice []error, errorMsg string) []error { - return append( - errorSlice, - errors.New(errorMsg), - ) -} - func deltaRelativeErrorCheck(inDeltaRelative bool, number, value, delta float64) bool { if (number == 0 || math.IsInf(number, 0)) && value != number { return true @@ -1331,34 +1363,3 @@ func deltaRelativeErrorCheck(inDeltaRelative bool, number, value, delta float64) } return false } - -func numNaNCheck(number, value, delta float64) []error { - var assertionErrors []error - assertionErrors = appendError( - assertionErrors, - "expected: can compare values with relative delta", - ) - - if math.IsNaN(number) { - assertionErrors = appendError( - assertionErrors, - "actual value is NaN", - ) - } - - if math.IsNaN(value) { - assertionErrors = appendError( - assertionErrors, - "expected value is NaN", - ) - } - - if math.IsNaN(delta) { - assertionErrors = appendError( - assertionErrors, - "delta is NaN", - ) - } - - return assertionErrors -} diff --git a/number_test.go b/number_test.go index b09c057eb..2b0545110 100644 --- a/number_test.go +++ b/number_test.go @@ -400,6 +400,14 @@ func TestNumber_InDeltaRelative(t *testing.T) { wantInDelta: failure, wantNotInDelta: failure, }, + { + name: "delta is -Inf", + number: 1234.5, + value: 1234.0, + delta: math.Inf(-1), + wantInDelta: failure, + wantNotInDelta: failure, + }, { name: "+Inf target", number: math.Inf(1), @@ -432,13 +440,37 @@ func TestNumber_InDeltaRelative(t *testing.T) { wantInDelta: success, wantNotInDelta: failure, }, + { + name: "+Inf number and target with non-zero delta", + number: math.Inf(1), + value: math.Inf(1), + delta: 10000, + wantInDelta: success, + wantNotInDelta: failure, + }, + { + name: "-Inf number and target with non-zero delta", + number: math.Inf(-1), + value: math.Inf(-1), + delta: 10000, + wantInDelta: success, + wantNotInDelta: failure, + }, { name: "+Inf number and -Inf target", number: math.Inf(1), value: math.Inf(-1), delta: 0, wantInDelta: failure, - wantNotInDelta: failure, + wantNotInDelta: success, + }, + { + name: "-Inf number and +Inf target", + number: math.Inf(-1), + value: math.Inf(1), + delta: 0, + wantInDelta: failure, + wantNotInDelta: success, }, { name: "target is 0 in delta range", From 68efbdf925bf1542bdc68a871fedc8183e452294 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Oct 2023 23:25:40 +0000 Subject: [PATCH 54/57] Bump golang.org/x/net from 0.7.0 to 0.17.0 Bumps [golang.org/x/net](https://github.com/golang/net) from 0.7.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.7.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- go.mod | 4 ++-- go.sum | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index e9db14134..d177ccb8d 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/xeipuuv/gojsonschema v1.2.0 github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 github.com/yudai/gojsondiff v1.0.0 - golang.org/x/net v0.7.0 + golang.org/x/net v0.17.0 moul.io/http2curl/v2 v2.3.0 ) @@ -40,6 +40,6 @@ require ( github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect github.com/yudai/pp v2.0.1+incompatible // indirect - golang.org/x/sys v0.7.0 // indirect + golang.org/x/sys v0.13.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) diff --git a/go.sum b/go.sum index e46ba1130..302509082 100644 --- a/go.sum +++ b/go.sum @@ -102,8 +102,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g= -golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -119,15 +119,15 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 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/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo= +golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= From c32379bb0d21c47db5f23400bd4345818a7b6ffb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 16:55:20 +0000 Subject: [PATCH 55/57] Bump golang.org/x/net from 0.16.0 to 0.17.0 in /_examples Bumps [golang.org/x/net](https://github.com/golang/net) from 0.16.0 to 0.17.0. - [Commits](https://github.com/golang/net/compare/v0.16.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] --- _examples/go.mod | 2 +- _examples/go.sum | 207 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 206 insertions(+), 3 deletions(-) diff --git a/_examples/go.mod b/_examples/go.mod index 09c564ded..00713a022 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -102,7 +102,7 @@ require ( github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect golang.org/x/arch v0.3.0 // indirect golang.org/x/crypto v0.14.0 // indirect - golang.org/x/net v0.16.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/sys v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/time v0.3.0 // indirect diff --git a/_examples/go.sum b/_examples/go.sum index 922d032aa..8d7f64abc 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -1,4 +1,6 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= @@ -9,35 +11,53 @@ github.com/Joker/hpp v1.0.0 h1:65+iuJYdRXv/XyN62C1uEmmOx3432rNG/rKlX6V7Kkc= github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY= github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2 h1:ZBbLwSJqkHBuFDA6DUhhse0IGJ7T5bemHyNILUjvOq4= github.com/TylerBrock/colorjson v0.0.0-20200706003622-8a50f05110d2/go.mod h1:VSw57q4QFiWDbRnjdX8Cb3Ow0SFncRw+bA/ofY6Q83w= github.com/ajg/form v1.5.1 h1:t9c7v8JUKu/XxOGBU0yjNpaMloxGEJhUkqFRq0ibGeU= github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY= +github.com/andybalholm/brotli v1.0.2/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 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/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM= github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s= github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 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/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk= +github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E= github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/djherbis/atime v1.1.0/go.mod h1:28OF6Y8s3NQWwacXc5eZTsEsiMzp7LF8MbXE+XJPdBE= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8= +github.com/fasthttp/websocket v1.4.3-rc.6/go.mod h1:43W9OM2T8FeXpCWMsBd9Cb7nE2CACNqNvCqQCoty/Lc= github.com/fasthttp/websocket v1.5.0 h1:B4zbe3xXyvIdnqjOZrafVFklCUq5ZLo/TqCt5JA1wLE= github.com/fasthttp/websocket v1.5.0/go.mod h1:n0BlOQvJdPbTuBkZT0O5+jk/sp/1/VCzquR1BehI2F4= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= @@ -60,18 +80,26 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.9.1 h1:4idEAncQnU5cB7BeOkPtxjfCSye0AAm1R0RVIqJ+Jmg= github.com/gin-gonic/gin v1.9.1/go.mod h1:hPrL7YrpYKXt5YId3A/Tnip5kqbEAP+KLuI3SUcPTeU= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-oauth2/oauth2/v4 v4.5.1 h1:3vxp+cjLqDe1TbogbwtMyeHRHr1tD+ksrK7xNppYRDs= github.com/go-oauth2/oauth2/v4 v4.5.1/go.mod h1:wk/2uLImWIa9VVQDgxz99H2GDbhmfi/9/Xr+GvkSUSQ= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s= +github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA= github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.14.0 h1:vgvQWe3XCz3gIeFDm/HnTIbj6UGmg/+t63MyGU2n5js= github.com/go-playground/validator/v10 v10.14.0/go.mod h1:9iXMNT7sEkjXb0I+enO7QXmzG6QCsPWY4zveKFVRSyU= +github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-session/session v3.1.2+incompatible/go.mod h1:8B3iivBQjrz/JtC68Np2T1yBBLxTan3mn/3OM0CyRt0= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= +github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= +github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw= +github.com/gobwas/ws v1.1.0/go.mod h1:nzvNcVha5eUziGrbxFCo6qFIojQHjJV5cLYIbezhfL0= github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/golang-jwt/jwt v3.2.1+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= @@ -88,6 +116,7 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +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/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -95,26 +124,39 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f h1:7LYC+Yfkj3CTRcShK0KOL/w6iTiKyqqBA9a41Wnggw8= +github.com/hokaccha/go-prettyjson v0.0.0-20211117102719-0474bc63780f/go.mod h1:pFlLw2CfqZiIBOx6BuCeRLCrfxBJipTY0nIOF/VbGcI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imkira/go-interpol v1.1.0 h1:KIiKr0VSG2CUW1hl1jpiyuzuJeKUUpC8iM1AIE7N1Vk= github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0= github.com/iris-contrib/httpexpect/v2 v2.12.1 h1:3cTZSyBBen/kfjCtgNFoUKi1u0FVXNaAjyRJOo6AVS4= +github.com/iris-contrib/httpexpect/v2 v2.12.1/go.mod h1:7+RB6W5oNClX7PTwJgJnsQP3ZuUUYB3u61KCqeSgZ88= github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= @@ -130,20 +172,28 @@ github.com/kataras/golog v0.1.8 h1:isP8th4PJH2SrbkciKnylaND9xoTtfxv++NB+DF0l9g= github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= github.com/kataras/iris/v12 v12.2.0 h1:WzDY5nGuW/LgVaFS5BtTkW3crdSKJ/FEgWnxPnIVVLI= github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= +github.com/kataras/jwt v0.1.8/go.mod h1:Q5j2IkcIHnfwy+oNY3TVWuEBJNw0ADgCcXK9CaZwV4o= +github.com/kataras/neffos v0.0.21/go.mod h1:FeGka8lu8cjD2H+0OpBvW8c6xXawy3fj5VX6xcIJ1Fg= github.com/kataras/pio v0.0.11 h1:kqreJ5KOEXGMwHAWHDwIl+mjfNCPhAwZPa8gK7MKlyw= github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= +github.com/klauspost/compress v1.12.2/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= +github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= +github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= +github.com/klauspost/compress v1.16.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.16.3/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.2.4 h1:acbojRNwl3o09bUq+yDCtZFc1aiwaAAxtcn8YkZXnvk= github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= 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= @@ -153,6 +203,8 @@ github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8 github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q= github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= @@ -165,12 +217,18 @@ github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovk github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= +github.com/mattn/go-isatty v0.0.18/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mediocregopher/radix/v3 v3.8.1/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8= github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= +github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 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= @@ -178,27 +236,68 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/moul/http2curl v1.0.0 h1:dRMWoAtb+ePxMlLkrCbAqh4TlPHXvoGUSQ323/9Zahs= github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ= +github.com/nats-io/jwt/v2 v2.3.0/go.mod h1:0tqz9Hlu6bCBFLWAASKhE5vUA4c24L9KPUUgvwumE/k= +github.com/nats-io/nats-server/v2 v2.9.11/go.mod h1:b0oVuxSlkvS3ZjMkncFeACGyZohbO4XhSqW1Lt7iRRY= +github.com/nats-io/nats.go v1.19.0/go.mod h1:tLqubohF7t4z3du1QDPYJIQQyhb4wl6DhjxEajSI7UA= +github.com/nats-io/nats.go v1.23.0/go.mod h1:ki/Scsa23edbh8IRZbCuNXR9TDcbvfaSijKtaqQgw+Q= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= +github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.13.0 h1:M76yO2HkZASFjXL0HSoZJ1AYEmQxNJmY41Jx1zNUq1Y= github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.4/go.mod h1:um6tUpWM/cxCK3/FK8BXqEiUMUwRgSM4JXG47RKZmLU= +github.com/onsi/ginkgo/v2 v2.1.6/go.mod h1:MEH45j8TBi6u9BMogfbp0stKC5cdGjumZj5Y7AG4VIk= +github.com/onsi/ginkgo/v2 v2.3.0/go.mod h1:Eew0uilEqZmIEZr8JrvYlvOM7Rr6xzTmMV8AyFNU9d0= +github.com/onsi/ginkgo/v2 v2.4.0/go.mod h1:iHkDK1fKGcBoEHT5W7YBq4RFWaQulw+caOMkAt4OrFo= +github.com/onsi/ginkgo/v2 v2.5.0/go.mod h1:Luc4sArBICYCS8THh8v3i3i5CuSZO+RaQRaJoeNwomw= +github.com/onsi/ginkgo/v2 v2.7.0/go.mod h1:yjiuMwPokqY1XauOgju45q3sJt6VzQ/Fict1LFVcsAo= +github.com/onsi/ginkgo/v2 v2.8.1/go.mod h1:N1/NbDngAFcSLdyZ+/aYTYGSlq9qMCS/cNKGJjy+csc= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= +github.com/onsi/gomega v1.19.0/go.mod h1:LY+I3pBVzYsTBU1AnDwOSxaYi9WoWiqgwooUqq9yPro= +github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= +github.com/onsi/gomega v1.21.1/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc= +github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= +github.com/onsi/gomega v1.24.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg= +github.com/onsi/gomega v1.24.1/go.mod h1:3AOiACssS3/MajrniINInwbfOOtfZvplPzuRSmvt1jM= +github.com/onsi/gomega v1.26.0/go.mod h1:r+zV744Re+DiYCIPRlYOTxn0YkOLcAnW8k1xXdMPGhM= +github.com/onsi/gomega v1.27.1 h1:rfztXRbg6nv/5f+Raen9RcGoSecHIFgBBLQK3Wdj754= +github.com/onsi/gomega v1.27.1/go.mod h1:aHX5xOykVYzWOV4WqQy0sy8BQptgukenXpCXfadcIAw= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZR9tGQ= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/pkg/diff v0.0.0-20200914180035-5b29258ca4f7/go.mod h1:zO8QMzTeZd5cpnIkz/Gn6iK0jDfGicM1nynOkkPIl28= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= +github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sanity-io/litter v1.5.5 h1:iE+sBxPBzoK6uaEP5Lt3fHNgpKcHXc/A2HGETy0uJQo= github.com/sanity-io/litter v1.5.5/go.mod h1:9gzJgR2i4ZpjZHsKvUXIRQVk7P+yM3e+jAF7bU2UI5U= +github.com/savsgio/gotils v0.0.0-20210617111740-97865ed5a873/go.mod h1:dmPawKuiAeG/aFYVs2i+Dyosoo7FNcm+Pi8iK6ZUrX8= github.com/savsgio/gotils v0.0.0-20211223103454-d0aaa54c5899/go.mod h1:oejLrk1Y/5zOF+c/aHtXqn3TFlzzbAgPWg8zBiAHDas= github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d h1:Q+gqLBOPkFGHyCJxXMRqtUgUbTjI8/Ze8vu8GGyNFwo= github.com/savsgio/gotils v0.0.0-20220530130905-52f3993e8d6d/go.mod h1:Gy+0tqhJvgGlqnTF8CVGP0AaGRjwBtXs/a5PA0Y3+A4= @@ -209,6 +308,7 @@ github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAm github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= +github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= 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= @@ -217,14 +317,25 @@ github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYl github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg= github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.2.1/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 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/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.0/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= @@ -260,12 +371,16 @@ github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e h1:+NL1GDIUOKxVfbp2K github.com/tidwall/rtree v0.0.0-20180113144539-6cd427091e0e/go.mod h1:/h+UnNGt0IhNNJLkGikcdcJqm66zGD/uJGMRxK/9+Ao= github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563 h1:Otn9S136ELckZ3KKDyCkxapfufrqDqwmGjcHfAyXRrE= github.com/tidwall/tinyqueue v0.0.0-20180302190814-1e39f5511563/go.mod h1:mLqSmt7Dv/CNneF2wfcChfN1rvapyQr01LGKnKex0DQ= +github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= +github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI= github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasthttp v1.27.0/go.mod h1:cmWIqlu99AO/RKcp1HWaViTqc57FswJOfYYdPJBl8BA= github.com/valyala/fasthttp v1.33.0/go.mod h1:KJRK/MXx0J+yd0c5hlR+s1tIHD72sniU8ZJjl97LIw4= github.com/valyala/fasthttp v1.34.0/go.mod h1:epZA5N+7pY6ZaEKRmstzOuYJx9HI8DI1oaCGZpdH4h0= github.com/valyala/fasthttp v1.50.0 h1:H7fweIlBm0rXLs2q0XbalvJ6r0CUPFWK3/bB4N13e9M= @@ -285,6 +400,7 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74= github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 h1:6fRhSjgLCkTD3JnJxvaJ4Sj+TYblw757bqYgZaOq5ZY= github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI= github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= @@ -297,19 +413,39 @@ github.com/yudai/pp v2.0.1+incompatible h1:Q4//iY4pNF6yPLZIigmvcl7k/bPgrcTPIFIcm github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= +go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= +go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= +go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k= golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= +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/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= +golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= +golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= +golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -320,12 +456,26 @@ golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220111093109-d55c255bac03/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= -golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= +golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= +golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= +golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= +golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.4.0 h1:NF0gk8LVPg1Ml7SSbGyySuoxdsXitj7TvgvuRxIMc/M= golang.org/x/oauth2 v0.4.0/go.mod h1:RznEsdpjGAINPTOF0UH/t+xJ75L18YO3Ho6Pyn+uRec= @@ -334,20 +484,31 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/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-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201207223542-d4d67f95c62d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -356,28 +517,63 @@ golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= +golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA= +golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20201211185031-d93e913c1a58/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= +golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 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-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -395,17 +591,24 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.29.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.30.0 h1:kPPoIgf3TsEvrm0PFe15JQ+570QVxYzEvvHqChK+cng= google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= From 85c3b02d2e4d884fa345678adc57e775187d9454 Mon Sep 17 00:00:00 2001 From: Sergey Aksenov Date: Sun, 15 Oct 2023 12:01:27 +0200 Subject: [PATCH 56/57] chore: bump golangci-lint version --- .github/workflows/build.yaml | 2 +- .golangci.yml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index dd2452e4e..1bd1b8fd5 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -119,7 +119,7 @@ jobs: uses: golangci/golangci-lint-action@v3 timeout-minutes: 20 with: - version: v1.51.2 + version: v1.54.2 working-directory: ${{ matrix.dir }} args: --timeout=20m diff --git a/.golangci.yml b/.golangci.yml index 4f0aa540e..34fb81f98 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -15,6 +15,10 @@ linters: linters-settings: lll: line-length: 90 + revive: + rules: + - name: unused-parameter + disabled: true issues: exclude-rules: From d0cfaf989a08da6bb947dd683521263f4da9084f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 23:27:44 +0000 Subject: [PATCH 57/57] Bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /_examples Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0. - [Commits](https://github.com/golang/crypto/compare/v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] --- _examples/go.mod | 6 +++--- _examples/go.sum | 10 +++++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/_examples/go.mod b/_examples/go.mod index 00713a022..45d9bd87f 100644 --- a/_examples/go.mod +++ b/_examples/go.mod @@ -101,10 +101,10 @@ require ( github.com/yudai/gojsondiff v1.0.0 // indirect github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect golang.org/x/arch v0.3.0 // indirect - golang.org/x/crypto v0.14.0 // indirect + golang.org/x/crypto v0.17.0 // indirect golang.org/x/net v0.17.0 // indirect - golang.org/x/sys v0.13.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/sys v0.15.0 // indirect + golang.org/x/text v0.14.0 // indirect golang.org/x/time v0.3.0 // indirect google.golang.org/protobuf v1.30.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/_examples/go.sum b/_examples/go.sum index 8d7f64abc..531b12371 100644 --- a/_examples/go.sum +++ b/_examples/go.sum @@ -435,8 +435,9 @@ golang.org/x/crypto v0.2.0/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4 golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0= -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= @@ -533,8 +534,9 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -545,6 +547,7 @@ golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= +golang.org/x/term v0.15.0/go.mod h1:BDl952bC7+uMoWR75FIrCDx79TPU9oHkTZ9yRbYOrX0= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -557,8 +560,9 @@ golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20220922220347-f3bd1da661af/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.2.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4=