From 118f9fa812a7bf5ffe2f3605b8a0abd127a4bb3e Mon Sep 17 00:00:00 2001 From: fredbi Date: Tue, 29 Nov 2022 09:43:35 +0100 Subject: [PATCH] Chore/update deps (#699) * fixup linting Signed-off-by: Frederic BIDON * updated deps Signed-off-by: Frederic BIDON --- .golangci.yml | 4 + go.mod | 10 +-- go.sum | 65 ++++++++------- pkg/cafs/cafs.go | 7 +- pkg/cafs/freelists.go | 12 +-- pkg/cafs/freelists_test.go | 10 +-- pkg/cafs/reader.go | 4 +- pkg/cafs/reader_test.go | 4 +- pkg/convert/unsafe.go | 4 +- pkg/core/bundle_list.go | 14 ++-- pkg/core/diamond_list.go | 14 ++-- pkg/core/diamond_ops.go | 4 +- pkg/core/keys.go | 6 +- pkg/core/split_list.go | 14 ++-- pkg/metrics/api.go | 66 +++++++-------- pkg/metrics/exporters/influxdb/exporter.go | 6 +- pkg/metrics/shared.go | 96 +++++++++++----------- pkg/metrics/struct_tags.go | 8 +- pkg/model/bundle.go | 9 +- pkg/model/diamond.go | 27 ++++-- pkg/model/doc.go | 24 +++--- pkg/model/label.go | 3 +- pkg/model/repo.go | 3 +- pkg/storage/localfs/store.go | 4 +- pkg/web/routes_test.go | 2 +- 25 files changed, 220 insertions(+), 200 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 07d987c8..723d8e51 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -74,5 +74,9 @@ linters: - errname - maintidx - nosnakecase + - structcheck + - varcheck + - deadcode + - interfacebloat max-same-issues: 0 diff --git a/go.mod b/go.mod index aad9c740..604eb13c 100644 --- a/go.mod +++ b/go.mod @@ -6,9 +6,9 @@ require ( cloud.google.com/go v0.107.0 // indirect cloud.google.com/go/storage v1.28.0 github.com/PuerkitoBio/goquery v1.8.0 - github.com/aws/aws-sdk-go v1.44.145 + github.com/aws/aws-sdk-go v1.44.147 github.com/blang/semver v3.5.1+incompatible - github.com/cenkalti/backoff/v4 v4.1.3 + github.com/cenkalti/backoff/v4 v4.2.0 github.com/davecgh/go-spew v1.1.1 github.com/docker/go-units v0.5.0 github.com/go-chi/chi v4.1.2+incompatible @@ -17,7 +17,7 @@ require ( github.com/gobuffalo/packr/v2 v2.8.3 github.com/google/go-querystring v1.1.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 - github.com/hashicorp/golang-lru v0.5.4 + github.com/hashicorp/golang-lru v0.6.0 github.com/influxdata/influxdb v1.10.0 github.com/jacobsa/daemonize v0.0.0-20160101105449-e460293e890f github.com/jacobsa/fuse v0.0.0-20220531202254-21122235c77a @@ -25,18 +25,18 @@ require ( github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 github.com/nightlyone/lockfile v1.0.0 github.com/opentracing/opentracing-go v1.2.0 + github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 github.com/rhysd/go-github-selfupdate v1.2.3 github.com/segmentio/ksuid v1.0.4 github.com/spf13/afero v1.9.3 github.com/spf13/cobra v1.6.1 - github.com/spf13/viper v1.13.0 + github.com/spf13/viper v1.14.0 github.com/stretchr/testify v1.8.1 github.com/ulikunitz/xz v0.5.10 // indirect go.opencensus.io v0.24.0 go.uber.org/atomic v1.10.0 // indirect go.uber.org/goleak v1.2.0 - go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.23.0 golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect golang.org/x/oauth2 v0.2.0 // indirect diff --git a/go.sum b/go.sum index 7a41578d..22e4398b 100644 --- a/go.sum +++ b/go.sum @@ -178,7 +178,7 @@ cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEu cloud.google.com/go/filestore v1.3.0/go.mod h1:+qbvHGvXU1HaKX2nD0WEPo92TP/8AQuCVEBXNY9z0+w= cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= -cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY= +cloud.google.com/go/firestore v1.8.0/go.mod h1:r3KB8cAdRIe8znzoPWLw8S6gpDVd9treohhn8b09424= cloud.google.com/go/functions v1.6.0/go.mod h1:3H1UA3qiIPRWD7PeZKLvHZ9SaQhR26XIJcC0A5GbvAk= cloud.google.com/go/functions v1.7.0/go.mod h1:+d+QBcWM+RsrgZfV9xo6KfA1GlzJfxcfZcRPEhDDfzg= cloud.google.com/go/functions v1.8.0/go.mod h1:RTZ4/HsQjIqIYP9a9YPbU+QFoQsAlYgrwOXJWHn1POY= @@ -458,6 +458,7 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= @@ -470,8 +471,8 @@ github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.29.16/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg= github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= -github.com/aws/aws-sdk-go v1.44.145 h1:KMVRrIyjBsNz3xGPuHIRnhIuKlb5h3Ii5e5jbi3cgnc= -github.com/aws/aws-sdk-go v1.44.145/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.44.147 h1:C/YQv0QAvRHio4cESBTFGh8aI/JM9VdRislDIOz/Dx4= +github.com/aws/aws-sdk-go v1.44.147/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.11.0/go.mod h1:SQfA+m2ltnu1cA0soUkj4dRSsmITiVQUJvBIZjzfPyQ= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0/go.mod h1:Xn6sxgRuIDflLRJFj5Ev7UxABIkNbccFPV/p8itDReM= @@ -510,8 +511,8 @@ github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.0 h1:HN5dHm3WBOgndBH6E8V0q2jIYIR3s9yglV8k/+MN3u4= +github.com/cenkalti/backoff/v4 v4.2.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= @@ -601,8 +602,8 @@ github.com/fredbi/pflag v1.0.6-0.20201106154427-e6824c13371a h1:5fxCxRuvCSLKGYY1 github.com/fredbi/pflag v1.0.6-0.20201106154427-e6824c13371a/go.mod h1:tILoT32c3RnN7+q+eAO+IULoVXhX4wc/Ypg/qAG3E0E= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 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/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/gabriel-vasile/mimetype v1.4.0/go.mod h1:fA8fi6KUiG7MgQQ+mEWotXoEOvmxRtOJlERCzSmRvr8= github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -892,25 +893,29 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= github.com/hashicorp/consul/api v1.4.0/go.mod h1:xc8u05kyMa3Wjr9eEAsIAo3dg8+LywT5E/Cl7cNS5nU= -github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= +github.com/hashicorp/consul/api v1.15.3/go.mod h1:/g/qgcoBcEXALCNZgRRisyTW0nY86++L0KbeAMXYCeY= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.4.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= +github.com/hashicorp/consul/sdk v0.11.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.2.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-msgpack v0.5.5/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= +github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= @@ -918,14 +923,16 @@ github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerX github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru v0.6.0 h1:uL2shRDx7RTrOrTCUZEGP/wJUFiUI8QT6E7z5o8jga4= +github.com/hashicorp/golang-lru v0.6.0/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -936,10 +943,11 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/memberlist v0.1.4/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/memberlist v0.2.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= +github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.0/go.mod h1:YL0HO+FifKOW2u1ke99DGVu1zhcpZzNwrLIqBC7vbYU= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= +github.com/hashicorp/serf v0.9.8/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.0.0/go.mod h1:4qWG/gcEcfX4z/mBDHJ++3ReCw9ibxbsNJbcucJdbSo= @@ -1178,8 +1186,9 @@ github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAv github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= +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/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/peterh/liner v1.0.1-0.20180619022028-8c1271fcf47f/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= @@ -1259,7 +1268,7 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8= +github.com/sagikazarmark/crypt v0.8.0/go.mod h1:TmKwZAo97S4Fy4sfMH/HX/cQP5D+ijra2NyLpNNmttY= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v0.0.0-20160603004225-b111a074d5ef/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= @@ -1286,7 +1295,7 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= +github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/afero v1.9.3 h1:41FoI0fD7OR7mGcKE/aOiLkGreyf8ifIOQmJANWogMk= github.com/spf13/afero v1.9.3/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= @@ -1300,8 +1309,8 @@ github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUq github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= -github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= -github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= +github.com/spf13/viper v1.14.0 h1:Rg7d3Lo706X9tHsJMUjdiwMpHB7W8WnSVOssIY+JElU= +github.com/spf13/viper v1.14.0/go.mod h1:WT//axPky3FdvXHzGw33dNdXXXfFQqmEalje+egj8As= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= @@ -1371,12 +1380,12 @@ github.com/zeebo/xxh3 v0.13.0/go.mod h1:AQY73TOrhF3jNsdiM9zZOb8MThrYbZONHj7ryDBa go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A= +go.etcd.io/etcd/api/v3 v3.5.5/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/pkg/v3 v3.5.5/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU= -go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY= +go.etcd.io/etcd/client/v2 v2.305.5/go.mod h1:zQjKllfqfBVyVStbt4FaosoX2iYd8fV/GRy/PbowgP4= +go.etcd.io/etcd/client/v3 v3.5.5/go.mod h1:aApjR4WGlSumpnJ2kloS75h6aHUmAyaPLjHMxpc7E7c= go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.1.2/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= @@ -1407,6 +1416,7 @@ go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= @@ -1426,6 +1436,7 @@ go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.14.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= go.uber.org/zap v1.23.0 h1:OjGQ5KQDEUawVHxNwQgPpiypGHOxo2mNZsOqTak4fFY= go.uber.org/zap v1.23.0/go.mod h1:D+nX8jyLsMHMYrln8A0rJjFt/T/9/bGgIhAqxv5URuY= golang.org/x/crypto v0.0.0-20180505025534-4ec37c66abab/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1459,7 +1470,6 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211117183948-ae814b36b871/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM= golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= @@ -1583,12 +1593,12 @@ golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qx 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-20211118161319-6a13c67c3ce4/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220617184016-355a448f1bc9/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= @@ -1618,7 +1628,6 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= @@ -1745,7 +1754,6 @@ golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/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-20211007075335-d3039528d8ac/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-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1765,6 +1773,7 @@ golang.org/x/sys v0.0.0-20220615213510-4f61da869c0c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220624220833-87e55d714810/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-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0 h1:ljd4t30dBnAvMZaQCevtY0xLLD0A+bRZXbgLMLU1F/A= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1794,6 +1803,7 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220609170525-579cf78fd858/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1930,7 +1940,6 @@ google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6 google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= -google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= @@ -1941,7 +1950,6 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/api v0.85.0/go.mod h1:AqZf8Ep9uZ2pyTvgL+x0D3Zt0eoT9b5E8fmzfu6FO2g= google.golang.org/api v0.90.0/go.mod h1:+Sem1dnrKlrXMR/X0bPnMWyluQe4RsNoYfmNLhOIkzw= @@ -2033,8 +2041,6 @@ google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= @@ -2054,7 +2060,6 @@ google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= diff --git a/pkg/cafs/cafs.go b/pkg/cafs/cafs.go index fb218d3f..36647371 100644 --- a/pkg/cafs/cafs.go +++ b/pkg/cafs/cafs.go @@ -7,16 +7,13 @@ import ( "sync" "time" + "github.com/docker/go-units" lru "github.com/hashicorp/golang-lru" - - "go.uber.org/zap" - "github.com/oneconcern/datamon/pkg/dlogger" "github.com/oneconcern/datamon/pkg/metrics" "github.com/oneconcern/datamon/pkg/storage" "github.com/oneconcern/datamon/pkg/storage/localfs" - - "github.com/docker/go-units" + "go.uber.org/zap" ) const ( diff --git a/pkg/cafs/freelists.go b/pkg/cafs/freelists.go index 0b54896c..04a2f0c2 100644 --- a/pkg/cafs/freelists.go +++ b/pkg/cafs/freelists.go @@ -46,10 +46,10 @@ type FreeList interface { // It allocates a fixed array and exposes a slice backed by this array for consuming callers. // // Usage: -// * Bytes() buffer method to access the backing array as a slice -// * Copy() and Slice() buffer methods to modify the content of the buffer -// * Pin() to pin the buffer and prevent it from being recycled while in a critical section -// * Unpin() to mark a buffer recyclable +// - Bytes() buffer method to access the backing array as a slice +// - Copy() and Slice() buffer methods to modify the content of the buffer +// - Pin() to pin the buffer and prevent it from being recycled while in a critical section +// - Unpin() to mark a buffer recyclable type LeafBuffer interface { Bytes() []byte Copy([]byte) @@ -250,8 +250,8 @@ func sizeFunc(leafSize uint32) func() uint32 { // The nil instance behaves as a regular new allocator, without buffer recycling. // // Usage: -// * Get() to get a bufer -// * Release() to mark a buffer for releasing to the free list. +// - Get() to get a bufer +// - Release() to mark a buffer for releasing to the free list. // // Releasing buffers to the list means that they can be re-used whenever idle. // diff --git a/pkg/cafs/freelists_test.go b/pkg/cafs/freelists_test.go index 60f9a212..27470d10 100644 --- a/pkg/cafs/freelists_test.go +++ b/pkg/cafs/freelists_test.go @@ -176,23 +176,23 @@ func testFreeBuffers(t *testing.T, leafSize, expectedSize uint32, expectedType i var xsize uint32 switch expectedType.(type) { case *leafBuffer1MB: - // nolint: staticcheck + //nolint: staticcheck d := leafBuffer1MB{} xsize = uint32(unsafe.Sizeof(d)) case *leafBuffer2MB: - // nolint: staticcheck + //nolint: staticcheck d := leafBuffer2MB{} xsize = uint32(unsafe.Sizeof(d)) case *leafBuffer3MB: - // nolint: staticcheck + //nolint: staticcheck d := leafBuffer3MB{} xsize = uint32(unsafe.Sizeof(d)) case *leafBuffer4MB: - // nolint: staticcheck + //nolint: staticcheck d := leafBuffer4MB{} xsize = uint32(unsafe.Sizeof(d)) case *leafBufferMax: - // nolint: staticcheck + //nolint: staticcheck d := leafBufferMax{} xsize = uint32(unsafe.Sizeof(d)) default: diff --git a/pkg/cafs/reader.go b/pkg/cafs/reader.go index 8abf4553..b668e4b2 100644 --- a/pkg/cafs/reader.go +++ b/pkg/cafs/reader.go @@ -10,13 +10,11 @@ import ( "sync" "sync/atomic" - "go.uber.org/zap" - lru "github.com/hashicorp/golang-lru" - "github.com/oneconcern/datamon/pkg/dlogger" "github.com/oneconcern/datamon/pkg/metrics" "github.com/oneconcern/datamon/pkg/storage" + "go.uber.org/zap" ) const ( diff --git a/pkg/cafs/reader_test.go b/pkg/cafs/reader_test.go index 313841c2..c7704a07 100644 --- a/pkg/cafs/reader_test.go +++ b/pkg/cafs/reader_test.go @@ -14,16 +14,14 @@ import ( "github.com/davecgh/go-spew/spew" lru "github.com/hashicorp/golang-lru" - "go.uber.org/zap" - "github.com/oneconcern/datamon/internal/rand" - "github.com/oneconcern/datamon/pkg/dlogger" "github.com/oneconcern/datamon/pkg/storage" "github.com/oneconcern/datamon/pkg/storage/localfs" "github.com/spf13/afero" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.uber.org/zap" ) func keyFromFile(t testing.TB, pth string) Key { diff --git a/pkg/convert/unsafe.go b/pkg/convert/unsafe.go index e5e34196..2e096690 100644 --- a/pkg/convert/unsafe.go +++ b/pkg/convert/unsafe.go @@ -14,7 +14,7 @@ const sizeOfUintPtr = unsafe.Sizeof(uintptr(0)) // UnsafeStringToBytes converts strings to []byte without memcopy func UnsafeStringToBytes(s string) []byte { ln := len(s) - // nolint: govet + //nolint: govet return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{ Len: ln, Cap: ln, @@ -44,6 +44,6 @@ func BytesToInt64(b []byte) int64 { // UnsafeBytesToString converts []byte to string without a memcopy func UnsafeBytesToString(b []byte) string { - // nolint: govet + //nolint: govet return *(*string)(unsafe.Pointer(&reflect.StringHeader{Data: uintptr(unsafe.Pointer(&b[0])), Len: len(b)})) } diff --git a/pkg/core/bundle_list.go b/pkg/core/bundle_list.go index 5c297117..5fa88e33 100644 --- a/pkg/core/bundle_list.go +++ b/pkg/core/bundle_list.go @@ -42,9 +42,9 @@ type bundlesEvent struct { // // Example usage: // -// err := doSelectBundles(bundlesChan, func(bundleBatch model.BundleDescriptors) { -// bundles = append(bundles, bundleBatch...) -// }) +// err := doSelectBundles(bundlesChan, func(bundleBatch model.BundleDescriptors) { +// bundles = append(bundles, bundleBatch...) +// }) func doSelectBundles(bundlesChan <-chan bundlesEvent, do func(model.BundleDescriptors)) error { // consume batches of ordered bundle metadata for bundleBatch := range bundlesChan { @@ -65,10 +65,10 @@ type ApplyBundleFunc func(model.BundleDescriptor) error // // Example usage: printing bundle descriptors as they come // -// err := core.ListBundlesApply(repo, store, func(bundle model.BundleDescriptor) error { -// fmt.Fprintf(os.Stderr, "%v\n", bundle) -// return nil -// }) +// err := core.ListBundlesApply(repo, store, func(bundle model.BundleDescriptor) error { +// fmt.Fprintf(os.Stderr, "%v\n", bundle) +// return nil +// }) func ListBundlesApply(repo string, stores context2.Stores, apply ApplyBundleFunc, opts ...Option) error { var ( err, applyErr error diff --git a/pkg/core/diamond_list.go b/pkg/core/diamond_list.go index 6676f78f..3daacf83 100644 --- a/pkg/core/diamond_list.go +++ b/pkg/core/diamond_list.go @@ -37,9 +37,9 @@ type diamondsEvent struct { // // Example usage: // -// err := doSelectDiamonds(diamondsChan, func(diamondBatch model.DiamondDescriptors) { -// diamonds = append(diamonds, diamondBatch...) -// }) +// err := doSelectDiamonds(diamondsChan, func(diamondBatch model.DiamondDescriptors) { +// diamonds = append(diamonds, diamondBatch...) +// }) func doSelectDiamonds(diamondsChan <-chan diamondsEvent, do func(model.DiamondDescriptors)) error { // consume batches of ordered diamond metadata for diamondBatch := range diamondsChan { @@ -60,10 +60,10 @@ type ApplyDiamondFunc func(model.DiamondDescriptor) error // // Example usage: printing diamond descriptors as they come // -// err := core.ListDiamondsApply(repo, store, func(diamond model.DiamondDescriptor) error { -// fmt.Fprintf(os.Stderr, "%v\n", diamond) -// return nil -// }) +// err := core.ListDiamondsApply(repo, store, func(diamond model.DiamondDescriptor) error { +// fmt.Fprintf(os.Stderr, "%v\n", diamond) +// return nil +// }) func ListDiamondsApply(repo string, stores context2.Stores, apply ApplyDiamondFunc, opts ...Option) error { var ( err, applyErr error diff --git a/pkg/core/diamond_ops.go b/pkg/core/diamond_ops.go index f531008a..cb7e7930 100644 --- a/pkg/core/diamond_ops.go +++ b/pkg/core/diamond_ops.go @@ -61,8 +61,8 @@ func DiamondExists(repo, diamondID string, stores context2.Stores) error { // diamondReady returns an error if the diamond is not in one of the following states: // -// * DiamondInitialized -// * DiamondRunning +// - DiamondInitialized +// - DiamondRunning // // Diamonds in the DiamondCommitting state are not ready unless the state is older than 30s (stale lock state). func diamondReady(repo, diamondID string, stores context2.Stores) error { diff --git a/pkg/core/keys.go b/pkg/core/keys.go index 249191d7..ba06666a 100644 --- a/pkg/core/keys.go +++ b/pkg/core/keys.go @@ -87,9 +87,9 @@ func distributeKeys(keys []string) func(chan<- string, <-chan struct{}, *sync.Wa // // To achieve this without stashing previously fetched keys, we rely on the following properties of the metadata keys. // -// * (filtered) keys for the same diamond or split in different states are adjacent: the internal map remains sparsely -// populated under normal conditions -// * keys are sorted: ".../{diamond-id}/diamond-done.yaml" will be fetched _before_ ".../{diamond-id}/diamond-running.yaml" +// - (filtered) keys for the same diamond or split in different states are adjacent: the internal map remains sparsely +// populated under normal conditions +// - keys are sorted: ".../{diamond-id}/diamond-done.yaml" will be fetched _before_ ".../{diamond-id}/diamond-running.yaml" func mergeKeys(inputChan <-chan keyBatchEvent, outputChan chan<- keyBatchEvent, settings Settings, wg *sync.WaitGroup) { defer func() { close(outputChan) diff --git a/pkg/core/split_list.go b/pkg/core/split_list.go index b1dbfbbf..9b88cee2 100644 --- a/pkg/core/split_list.go +++ b/pkg/core/split_list.go @@ -38,9 +38,9 @@ type splitsEvent struct { // // Example usage: // -// err := doSelectSplits(splitsChan, func(splitBatch model.SplitDescriptors) { -// splits = append(splits, splitBatch...) -// }) +// err := doSelectSplits(splitsChan, func(splitBatch model.SplitDescriptors) { +// splits = append(splits, splitBatch...) +// }) func doSelectSplits(splitsChan <-chan splitsEvent, do func(model.SplitDescriptors)) error { // consume batches of ordered split metadata for splitBatch := range splitsChan { @@ -61,10 +61,10 @@ type ApplySplitFunc func(model.SplitDescriptor) error // // Example usage: printing split descriptors as they come // -// err := core.ListSplitsApply(repo, store, func(split model.SplitDescriptor) error { -// fmt.Fprintf(os.Stderr, "%v\n", split) -// return nil -// }) +// err := core.ListSplitsApply(repo, store, func(split model.SplitDescriptor) error { +// fmt.Fprintf(os.Stderr, "%v\n", split) +// return nil +// }) func ListSplitsApply(repo, diamondID string, stores context2.Stores, apply ApplySplitFunc, opts ...Option) error { var ( err, applyErr error diff --git a/pkg/metrics/api.go b/pkg/metrics/api.go index cef50c12..605688f8 100644 --- a/pkg/metrics/api.go +++ b/pkg/metrics/api.go @@ -79,39 +79,39 @@ func mergeTags(extras []map[string]string) []tag.Mutator { // // Sample usage: // -// type myType struct{ -// ... -// metrics.Enable -// m *myMetrics // m points to the globally registered metrics collector -// } -// -// ... -// -// // MyTypeUsage describes a tree of metrics to be recorded on myType -// type MyTypeUsage struct { -// Volumetry struct { -// Metadata FilesMetrics `group:"metadata" description:"some file metrics issued by myType"` -// TestCount *stats.Int64Measure `metric:"testCount" description:"number of tests" extraviews:"sum"` -// } `group:"volumetry" description:"volumetry measurements that pertain to myType"` -// } -// -// func (u *MyTypeUsage) Reads() { -// metrics.Inc(u.Volumetry.Metadata.Read) -// } -// -// func (u *MyTypeUsage) Tests(p int) { -// metrics.Int64(u.Volumetry.TestCount, intt64(p)) -// } -// -// ... -// -// func NewMyType() *myType { -// ... -// t := &MyType{} -// t.m := t.EnsureMetrics("MyType", &myMetrics{}) -// t.EnableMetrics(true) -// return t -// } +// type myType struct{ +// ... +// metrics.Enable +// m *myMetrics // m points to the globally registered metrics collector +// } +// +// ... +// +// // MyTypeUsage describes a tree of metrics to be recorded on myType +// type MyTypeUsage struct { +// Volumetry struct { +// Metadata FilesMetrics `group:"metadata" description:"some file metrics issued by myType"` +// TestCount *stats.Int64Measure `metric:"testCount" description:"number of tests" extraviews:"sum"` +// } `group:"volumetry" description:"volumetry measurements that pertain to myType"` +// } +// +// func (u *MyTypeUsage) Reads() { +// metrics.Inc(u.Volumetry.Metadata.Read) +// } +// +// func (u *MyTypeUsage) Tests(p int) { +// metrics.Int64(u.Volumetry.TestCount, intt64(p)) +// } +// +// ... +// +// func NewMyType() *myType { +// ... +// t := &MyType{} +// t.m := t.EnsureMetrics("MyType", &myMetrics{}) +// t.EnableMetrics(true) +// return t +// } type Enable struct { metricsEnabled bool } diff --git a/pkg/metrics/exporters/influxdb/exporter.go b/pkg/metrics/exporters/influxdb/exporter.go index e7842def..cad8bd3b 100644 --- a/pkg/metrics/exporters/influxdb/exporter.go +++ b/pkg/metrics/exporters/influxdb/exporter.go @@ -22,9 +22,9 @@ func defaultExporter() *Exporter { // NewExporter creates a new Influxdb exporter. // // Use options to configure: -// * an influxdd.Store instance, configured with the desired settings -// * an error handler. If set to nil, a no-op handler is set by default -// * a map of custom tags for written records (may be nil) +// - an influxdd.Store instance, configured with the desired settings +// - an error handler. If set to nil, a no-op handler is set by default +// - a map of custom tags for written records (may be nil) func NewExporter(opts ...Option) *Exporter { e := defaultExporter() for _, apply := range opts { diff --git a/pkg/metrics/shared.go b/pkg/metrics/shared.go index cb1e5107..7b83d845 100644 --- a/pkg/metrics/shared.go +++ b/pkg/metrics/shared.go @@ -42,20 +42,21 @@ func (n *IOMetrics) tags(operation string) map[string]string { // IO records some metrics for an IO operation. // // Example: -// var myIOMetrics = &IOMetrics{} // -// func (m *myType) MyInstrumentedFunc() { -// var size int, err error +// var myIOMetrics = &IOMetrics{} // -// defer myIOMetrics.IO(time.Now(), "read") -// ... -// size,err := doSomeWork() -// if err != nil { -// myIOMetrics.Failed("read") -// return err -// } -// myIOMetrics.IOSize(size, "read") -// } +// func (m *myType) MyInstrumentedFunc() { +// var size int, err error +// +// defer myIOMetrics.IO(time.Now(), "read") +// ... +// size,err := doSomeWork() +// if err != nil { +// myIOMetrics.Failed("read") +// return err +// } +// myIOMetrics.IOSize(size, "read") +// } func (n *IOMetrics) IO(start time.Time, operation string) { now := time.Now() Duration(start, now, n.Timing, n.tags(operation)) @@ -94,20 +95,21 @@ func (n *IOMetrics) Throughput(start, end time.Time, size int64, operation strin // deferred call. // // Example with deferred error capture: -// var myIOMetrics = &IOMetrics{} // -// func (m *myType) MyInstrumentedFunc() { -// var size int, err error +// var myIOMetrics = &IOMetrics{} +// +// func (m *myType) MyInstrumentedFunc() { +// var size int, err error // -// defer func(start time.Time) { -// myIOMetrics.IORecord(start, "read")(size, err) -// }(time.Now()) -// ... -// size, err = doSomeWork() -// if err != nil { -// return -// } -// } +// defer func(start time.Time) { +// myIOMetrics.IORecord(start, "read")(size, err) +// }(time.Now()) +// ... +// size, err = doSomeWork() +// if err != nil { +// return +// } +// } func (n *IOMetrics) IORecord(start time.Time, operation string) func(int64, error) { return func(size int64, err error) { now := time.Now() @@ -141,17 +143,18 @@ func (u *UsageMetrics) Inc(method string) { // Used records usage of some instrumented entry point. // // Example: -// var myUsageMetrics = &UsageMetrics{} // -// func (m *myType) MyInstrumentedFunc() { -// defer myUsageMetrics.Used(time.Now(), "MyInstrumentedFunc") -// ... -// err := doSomeWork() -// if err != nil { -// myUsageMetrics.Failed() -// ... -// } -// } +// var myUsageMetrics = &UsageMetrics{} +// +// func (m *myType) MyInstrumentedFunc() { +// defer myUsageMetrics.Used(time.Now(), "MyInstrumentedFunc") +// ... +// err := doSomeWork() +// if err != nil { +// myUsageMetrics.Failed() +// ... +// } +// } func (u *UsageMetrics) Used(start time.Time, method string) { Since(start, u.Timing, u.tags(method)) Inc(u.Count, u.tags(method)) @@ -160,19 +163,20 @@ func (u *UsageMetrics) Used(start time.Time, method string) { // UsedAll records usage of some instrumented entry point with failures, in one go. // // Example: -// var myUsageMetrics = &UsageMetrics{} -// var err error // -// func (m *myType) MyInstrumentedFunc() { -// defer func(start time.Time) { -// myUsageMetrics.UsedAll(start, "MyInstrumentedFunc")(err) -// }(time.Now()) -// ... -// err = doSomeWork() -// if err != nil { -// return -// } -// } +// var myUsageMetrics = &UsageMetrics{} +// var err error +// +// func (m *myType) MyInstrumentedFunc() { +// defer func(start time.Time) { +// myUsageMetrics.UsedAll(start, "MyInstrumentedFunc")(err) +// }(time.Now()) +// ... +// err = doSomeWork() +// if err != nil { +// return +// } +// } func (u *UsageMetrics) UsedAll(start time.Time, method string) func(error) { return func(err error) { Since(start, u.Timing, u.tags(method)) diff --git a/pkg/metrics/struct_tags.go b/pkg/metrics/struct_tags.go index 6e6821e9..264be901 100644 --- a/pkg/metrics/struct_tags.go +++ b/pkg/metrics/struct_tags.go @@ -98,10 +98,10 @@ func skipMetric(field reflect.Value) bool { // fieldTags decodes field tags that decorate the struct. // Supported tags are: -// * metric: the metric name -// * group: builds an additional path to the metric (e.g. root/path/mymetrics/{metric}) -// * description: adds this description to the metric and the associated views -// * extraviews:[aggregator, ...]: builds additional views with alternate aggregators +// - metric: the metric name +// - group: builds an additional path to the metric (e.g. root/path/mymetrics/{metric}) +// - description: adds this description to the metric and the associated views +// - extraviews:[aggregator, ...]: builds additional views with alternate aggregators func fieldTags(field reflect.StructField) map[string]string { tags := make(map[string]string, 5) if metric, ok := field.Tag.Lookup("metric"); ok { diff --git a/pkg/model/bundle.go b/pkg/model/bundle.go index 9401cd7f..c21b5803 100644 --- a/pkg/model/bundle.go +++ b/pkg/model/bundle.go @@ -169,7 +169,8 @@ func GetConsumablePathToBundleFileList(bundleID string, index uint64) string { // GetArchivePathToBundle yields a path in a repo to the descriptor of a bundle // // Example: -// bundles/{repo}/{bundleID}/bundle.yaml +// +// bundles/{repo}/{bundleID}/bundle.yaml func GetArchivePathToBundle(repo string, bundleID string) string { return fmt.Sprint(getArchivePathToBundles(), repo, "/", bundleID, "/", bundleDescriptorFile) } @@ -177,7 +178,8 @@ func GetArchivePathToBundle(repo string, bundleID string) string { // GetArchivePathPrefixToBundles yields a path to all bundles in a repo. // // Example: -// bundles/{repo}/ +// +// bundles/{repo}/ func GetArchivePathPrefixToBundles(repo string) string { return fmt.Sprint(getArchivePathToBundles(), repo+"/") } @@ -189,7 +191,8 @@ func getArchivePathToBundles() string { // GetArchivePathToBundleFileList yields a path to the list of the files in a bundle // // Example: -// bundles/{repo}/{bundleID}/bundle-files-{index}.yaml +// +// bundles/{repo}/{bundleID}/bundle-files-{index}.yaml func GetArchivePathToBundleFileList(repo string, bundleID string, index uint64) string { return fmt.Sprint(getArchivePathToBundles(), repo, "/", bundleID, "/", bundleFilesIndexPrefix, index, ".yaml") } diff --git a/pkg/model/diamond.go b/pkg/model/diamond.go index 777c9e0c..89e22632 100644 --- a/pkg/model/diamond.go +++ b/pkg/model/diamond.go @@ -212,7 +212,8 @@ func getArchivePathToDiamonds() string { // GetArchivePathPrefixToDiamonds yields a path to all diamonds in a repo. // // Example: -// diamonds/{repo}/ +// +// diamonds/{repo}/ func GetArchivePathPrefixToDiamonds(repo string) string { return fmt.Sprint(getArchivePathToDiamonds(), repo+"/") } @@ -220,7 +221,8 @@ func GetArchivePathPrefixToDiamonds(repo string) string { // GetArchivePathToDiamond yields a path in a repo to the descriptor of a diamond in any state. // // Example: -// diamonds/{repo}/{diamond}/diamond-*.yaml +// +// diamonds/{repo}/{diamond}/diamond-*.yaml func GetArchivePathToDiamond(repo, diamondID string, state DiamondState) string { var suffix string switch state { @@ -235,7 +237,8 @@ func GetArchivePathToDiamond(repo, diamondID string, state DiamondState) string // GetArchivePathToFinalDiamond yields a path in a repo to the descriptor of a diamond in a final state. // // Example: -// diamonds/{repo}/{diamond}/diamond-done.yaml +// +// diamonds/{repo}/{diamond}/diamond-done.yaml func GetArchivePathToFinalDiamond(repo, diamondID string) string { return fmt.Sprint(getArchivePathToDiamonds(), repo, "/", diamondID, "/", diamondFinalDescriptorFile) } @@ -243,7 +246,8 @@ func GetArchivePathToFinalDiamond(repo, diamondID string) string { // GetArchivePathToInitialDiamond yields a path in a repo to the descriptor of a diamond in an initialized state. // // Example: -// diamonds/{repo}/{diamond}/diamond-running.yaml +// +// diamonds/{repo}/{diamond}/diamond-running.yaml func GetArchivePathToInitialDiamond(repo, diamondID string) string { return fmt.Sprint(getArchivePathToDiamonds(), repo, "/", diamondID, "/", diamondInitialDescriptorFile) } @@ -251,7 +255,8 @@ func GetArchivePathToInitialDiamond(repo, diamondID string) string { // GetArchivePathPrefixToSplits yields a path to all splits in a diamond in a repo. // // Example: -// diamonds/{repo}/{diamond}/ +// +// diamonds/{repo}/{diamond}/ func GetArchivePathPrefixToSplits(repo, diamondID string) string { return fmt.Sprint(getArchivePathToDiamonds(), repo, "/", diamondID, "/", "splits", "/") } @@ -259,7 +264,8 @@ func GetArchivePathPrefixToSplits(repo, diamondID string) string { // GetArchivePathToSplit yields a path in a repo to the descriptor of a split in any state. // // Example: -// diamonds/{repo}/{diamond}/splits/{split}/split-*.yaml +// +// diamonds/{repo}/{diamond}/splits/{split}/split-*.yaml func GetArchivePathToSplit(repo, diamondID, splitID string, state SplitState) string { var suffix string switch state { @@ -274,7 +280,8 @@ func GetArchivePathToSplit(repo, diamondID, splitID string, state SplitState) st // GetArchivePathToFinalSplit yields a path in a repo to the descriptor of a split in a final state. // // Example: -// diamonds/{repo}/{diamond}/splits/{split}/split-done.yaml +// +// diamonds/{repo}/{diamond}/splits/{split}/split-done.yaml func GetArchivePathToFinalSplit(repo, diamondID, splitID string) string { return fmt.Sprint(getArchivePathToDiamonds(), repo, "/", diamondID, "/", "splits", "/", splitID, "/", splitFinalDescriptorFile) } @@ -282,7 +289,8 @@ func GetArchivePathToFinalSplit(repo, diamondID, splitID string) string { // GetArchivePathToInitialSplit yields a path in a repo to the descriptor of a split in a running state. // // Example: -// diamonds/{repo}/{diamond}/splits/split}/split-running.yaml +// +// diamonds/{repo}/{diamond}/splits/split}/split-running.yaml func GetArchivePathToInitialSplit(repo, diamondID, splitID string) string { return fmt.Sprint(getArchivePathToDiamonds(), repo, "/", diamondID, "/", "splits", "/", splitID, "/", splitInitialDescriptorFile) } @@ -290,7 +298,8 @@ func GetArchivePathToInitialSplit(repo, diamondID, splitID string) string { // GetArchivePathToSplitFileList yields a path to the list of the files in a diamond split // // Example: -// diamonds/{repo}/{diamond}/splits/{split}/{generation}/bundle-files-{index}.yaml +// +// diamonds/{repo}/{diamond}/splits/{split}/{generation}/bundle-files-{index}.yaml func GetArchivePathToSplitFileList(repo, diamondID, splitID string, generationID string, index uint64) string { return fmt.Sprint(getArchivePathToDiamonds(), repo, "/", diamondID, "/", "splits", "/", splitID, "/", generationID, "/", splitFilesIndexPrefix, index, ext) } diff --git a/pkg/model/doc.go b/pkg/model/doc.go index 4cb24b98..4062d477 100644 --- a/pkg/model/doc.go +++ b/pkg/model/doc.go @@ -4,20 +4,20 @@ // // The object model for datamon is composed of: // -// Repos: -// A datamon repository is analogous to a git repo. A repo is a dataset that has a unified lifecycle. -// A particular version of the files in a repo is called a bundle. +// Repos: +// A datamon repository is analogous to a git repo. A repo is a dataset that has a unified lifecycle. +// A particular version of the files in a repo is called a bundle. // -// Bundles: -// A bundle is a point in time read-only view of a repo, composed of individual files. -// This is analogous to a commit in git. +// Bundles: +// A bundle is a point in time read-only view of a repo, composed of individual files. +// This is analogous to a commit in git. // -// Labels: -// A name given to a bundle, analogous to tags in git. Examples: Latest, production. +// Labels: +// A name given to a bundle, analogous to tags in git. Examples: Latest, production. // -// Contexts: -// A context provides a way to define multiple instances of datamon. Example: development, production +// Contexts: +// A context provides a way to define multiple instances of datamon. Example: development, production // -// WAL: -// A write-ahead log tracks all changes to a repo. +// WAL: +// A write-ahead log tracks all changes to a repo. package model diff --git a/pkg/model/label.go b/pkg/model/label.go index 3ee60dec..c7f4e08b 100644 --- a/pkg/model/label.go +++ b/pkg/model/label.go @@ -63,7 +63,8 @@ func GetArchivePathPrefixToLabels(repo string, prefixes ...string) string { // GetArchivePathToLabel gets the path to the label descriptor. // // Example: -// labels/{repo}/{label}/label.yaml +// +// labels/{repo}/{label}/label.yaml func GetArchivePathToLabel(repo string, labelName string) string { return fmt.Sprint(GetArchivePathPrefixToLabels(repo), labelName, "/", labelDescriptorFile) } diff --git a/pkg/model/repo.go b/pkg/model/repo.go index 7ada0141..e4a2d179 100644 --- a/pkg/model/repo.go +++ b/pkg/model/repo.go @@ -35,7 +35,8 @@ func (b RepoDescriptors) Last() RepoDescriptor { // GetArchivePathToRepoDescriptor yields a path in a repo to the descriptor of a bundle // // Example: -// repos/{repo}/{bundleID}/repo.yaml +// +// repos/{repo}/{bundleID}/repo.yaml func GetArchivePathToRepoDescriptor(repo string) string { return fmt.Sprint("repos/", repo, "/", repoDescriptorFile) } diff --git a/pkg/storage/localfs/store.go b/pkg/storage/localfs/store.go index a70ce317..d6fbcc86 100644 --- a/pkg/storage/localfs/store.go +++ b/pkg/storage/localfs/store.go @@ -279,8 +279,8 @@ func (l *localFS) Keys(ctx context.Context) ([]string, error) { // is required to make KeyPrefix a first class citizen for localfs. // // TODO(known limitations): -// * this implementation does not really scale up, but it is quite workable for our testcases using localfs. -// * this implementation is not meant for parallel use with mutable FS. +// - this implementation does not really scale up, but it is quite workable for our testcases using localfs. +// - this implementation is not meant for parallel use with mutable FS. func (l *localFS) KeysPrefix(_ context.Context, token, prefix, delimiter string, count int) ([]string, string, error) { l.exclusive.Lock() defer l.exclusive.Unlock() diff --git a/pkg/web/routes_test.go b/pkg/web/routes_test.go index d547aab5..d41bebcb 100644 --- a/pkg/web/routes_test.go +++ b/pkg/web/routes_test.go @@ -164,7 +164,7 @@ func (page *fileListPage) filenames(t *testing.T) map[string]bool { } func getPageDocument(t *testing.T, routes http.Handler, relURLPath string) *goquery.Document { - req, err := http.NewRequestWithContext(context.Background(), "GET", relURLPath, nil) + req, err := http.NewRequestWithContext(context.Background(), http.MethodGet, relURLPath, nil) require.NoError(t, err, "create mock request") rr := httptest.NewRecorder() routes.ServeHTTP(rr, req)