From 19f6956f5a475ae594f7c91d681a80a025b7535f Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Mon, 8 Aug 2022 15:05:46 -0400 Subject: [PATCH 1/2] Upgrade to Go 1.19 --- .github/workflows/ci.yaml | 24 ++----- Makefile | 16 ++++- builders/build.yaml | 123 +++++++++++--------------------- builders/deploy.yaml | 26 +++---- builders/promote.yaml | 26 +++---- docs/images/architecture/go.mod | 2 +- go.mod | 53 +++++++------- go.sum | 99 +++++++++++++------------ 8 files changed, 164 insertions(+), 205 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 12fcb3f4a..1b5c85d9d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -26,16 +26,10 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: '1.18' + go-version: '1.19' - - uses: actions/cache@v3 - with: - path: | - ~/go/pkg/mod - key: ${{ runner.os }}-go-test-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-test- - ${{ runner.os }}-go- + - name: Download modules + run: go mod download - name: go-test shell: bash @@ -74,16 +68,10 @@ jobs: - uses: actions/setup-go@v3 with: - go-version: '1.18' + go-version: '1.19' - - uses: actions/cache@v3 - with: - path: | - ~/go/pkg/mod - key: ${{ runner.os }}-go-lint-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go-lint- - ${{ runner.os }}-go- + - name: Download modules + run: go mod download - name: go-lint shell: bash diff --git a/Makefile b/Makefile index 1c622d51f..4ed41f90b 100644 --- a/Makefile +++ b/Makefile @@ -18,12 +18,24 @@ GO_FILES = $(shell find . -name \*.go) MD_FILES = $(shell find . -name \*.md) PO_FILES = $(shell find . -name \*.po) +# diff-check runs git-diff and fails if there are any changes. +diff-check: + @FINDINGS="$$(git status -s -uall)" ; \ + if [ -n "$${FINDINGS}" ]; then \ + echo "Changed files:\n\n" ; \ + echo "$${FINDINGS}\n\n" ; \ + echo "Diffs:\n\n" ; \ + git diff ; \ + git diff --cached ; \ + exit 1 ; \ + fi +.PHONY: diff-check + generate: @go generate ./... .PHONY: generate -generate-check: generate - @git update-index --refresh && git diff-index --quiet HEAD -- +generate-check: generate diff-check .PHONY: generate-check # lint uses the same linter as CI and tries to report the same results running diff --git a/builders/build.yaml b/builders/build.yaml index 71975ec8d..fa622431c 100644 --- a/builders/build.yaml +++ b/builders/build.yaml @@ -26,9 +26,6 @@ options: - 'CGO_ENABLED=0' - 'GOOS=linux' - 'GOARCH=amd64' - volumes: - - name: 'go-modules' - path: '/go/pkg' substitutions: _BINAUTHZ_ATTESTOR: @@ -38,30 +35,6 @@ substitutions: _TAG: steps: -# /go/pkg sometimes already has data. We want to clear that before restoring our -# cache (and saving our cache) to reduce the size of our cache and speed up our -# builds. -- id: 'clear-cache' - name: 'golang:1.18' - args: - - 'go' - - 'clean' - - '-modcache' - waitFor: - - '-' - -- id: 'restore-cache' - name: 'us-docker.pkg.dev/vargolabs/gcs-cacher/gcs-cacher:0.1' - args: - - '-bucket=${PROJECT_ID}-cloudbuild-cache' - - '-restore=go-{{ hashGlob "go.mod" }}' - - '-restore=go-' - - '-dir=/go/pkg' - - '-allow-failure' - waitFor: - - 'clear-cache' - - # # Minify static assets # @@ -98,7 +71,7 @@ steps: - '-' - id: 'build' - name: 'golang:1.18' + name: 'golang:1.19' args: - 'go' - 'build' @@ -108,26 +81,16 @@ steps: - '-o=./bin/' - './cmd/...' waitFor: - - 'restore-cache' - 'mkdir-bin' - 'minify-css' - 'minify-js' -- id: 'save-cache' - name: 'us-docker.pkg.dev/vargolabs/gcs-cacher/gcs-cacher:0.1' - args: - - '-bucket=${PROJECT_ID}-cloudbuild-cache' - - '-cache=go-{{ hashGlob "go.mod" }}' - - '-dir=/go/pkg' - waitFor: - - 'build' - # # adminapi # - id: 'dockerize-adminapi' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -138,7 +101,7 @@ steps: - 'build' - id: 'push-adminapi' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/adminapi:${_TAG}' @@ -146,7 +109,7 @@ steps: - 'dockerize-adminapi' - id: 'attest-adminapi' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -166,7 +129,7 @@ steps: # apiserver # - id: 'dockerize-apiserver' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -177,7 +140,7 @@ steps: - 'build' - id: 'push-apiserver' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/apiserver:${_TAG}' @@ -185,7 +148,7 @@ steps: - 'dockerize-apiserver' - id: 'attest-apiserver' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -206,7 +169,7 @@ steps: # appsync # - id: 'dockerize-appsync' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -217,7 +180,7 @@ steps: - 'build' - id: 'push-appsync' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/appsync:${_TAG}' @@ -225,7 +188,7 @@ steps: - 'dockerize-appsync' - id: 'attest-appsync' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -245,7 +208,7 @@ steps: # backup # - id: 'dockerize-backup' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -256,7 +219,7 @@ steps: - 'build' - id: 'push-backup' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/backup:${_TAG}' @@ -264,7 +227,7 @@ steps: - 'dockerize-backup' - id: 'attest-backup' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -284,7 +247,7 @@ steps: # cleanup # - id: 'dockerize-cleanup' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -295,7 +258,7 @@ steps: - 'build' - id: 'push-cleanup' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/cleanup:${_TAG}' @@ -303,7 +266,7 @@ steps: - 'dockerize-cleanup' - id: 'attest-cleanup' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -324,7 +287,7 @@ steps: # e2e-runner # - id: 'dockerize-e2e-runner' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -335,7 +298,7 @@ steps: - 'build' - id: 'push-e2e-runner' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/e2e-runner:${_TAG}' @@ -343,7 +306,7 @@ steps: - 'dockerize-e2e-runner' - id: 'attest-e2e-runner' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -364,7 +327,7 @@ steps: # emailer # - id: 'dockerize-emailer' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -375,7 +338,7 @@ steps: - 'build' - id: 'push-emailer' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/emailer:${_TAG}' @@ -383,7 +346,7 @@ steps: - 'dockerize-emailer' - id: 'attest-emailer' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -404,7 +367,7 @@ steps: # enx-redirect # - id: 'dockerize-enx-redirect' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -415,7 +378,7 @@ steps: - 'build' - id: 'push-enx-redirect' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/enx-redirect:${_TAG}' @@ -423,7 +386,7 @@ steps: - 'dockerize-enx-redirect' - id: 'attest-enx-redirect' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -444,7 +407,7 @@ steps: # migrate # - id: 'dockerize-migrate' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/migrate.dockerfile' @@ -454,7 +417,7 @@ steps: - 'build' - id: 'push-migrate' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/migrate:${_TAG}' @@ -462,7 +425,7 @@ steps: - 'dockerize-migrate' - id: 'attest-migrate' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -482,7 +445,7 @@ steps: # metrics-registrar # - id: 'dockerize-metrics-registrar' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -493,7 +456,7 @@ steps: - 'build' - id: 'push-metrics-registrar' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/metrics-registrar:${_TAG}' @@ -501,7 +464,7 @@ steps: - 'dockerize-metrics-registrar' - id: 'attest-metrics-registrar' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -522,7 +485,7 @@ steps: # modeler # - id: 'dockerize-modeler' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -533,7 +496,7 @@ steps: - 'build' - id: 'push-modeler' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/modeler:${_TAG}' @@ -541,7 +504,7 @@ steps: - 'dockerize-modeler' - id: 'attest-modeler' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -562,7 +525,7 @@ steps: # rotation # - id: 'dockerize-rotation' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -573,7 +536,7 @@ steps: - 'build' - id: 'push-rotation' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/rotation:${_TAG}' @@ -581,7 +544,7 @@ steps: - 'dockerize-rotation' - id: 'attest-rotation' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -602,7 +565,7 @@ steps: # server # - id: 'dockerize-server' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -613,7 +576,7 @@ steps: - 'build' - id: 'push-server' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/server:${_TAG}' @@ -621,7 +584,7 @@ steps: - 'dockerize-server' - id: 'attest-server' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' @@ -642,7 +605,7 @@ steps: # stats-puller # - id: 'dockerize-stats-puller' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'build' - '--file=builders/service.dockerfile' @@ -653,7 +616,7 @@ steps: - 'build' - id: 'push-stats-puller' - name: 'docker:19' + name: 'gcr.io/cloud-builders/docker' args: - 'push' - 'gcr.io/${PROJECT_ID}/${_REPO}/stats-puller:${_TAG}' @@ -661,7 +624,7 @@ steps: - 'dockerize-stats-puller' - id: 'attest-stats-puller' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0' args: - 'bash' - '-eEuo' diff --git a/builders/deploy.yaml b/builders/deploy.yaml index c03d25116..9b104e502 100644 --- a/builders/deploy.yaml +++ b/builders/deploy.yaml @@ -26,7 +26,7 @@ steps: # adminapi # - id: 'deploy-adminapi' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -47,7 +47,7 @@ steps: # apiserver # - id: 'deploy-apiserver' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -68,7 +68,7 @@ steps: # appsync # - id: 'deploy-appsync' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -89,7 +89,7 @@ steps: # backup # - id: 'deploy-backup' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -110,7 +110,7 @@ steps: # cleanup # - id: 'deploy-cleanup' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -131,7 +131,7 @@ steps: # e2e-runner # - id: 'deploy-e2e-runner' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -152,7 +152,7 @@ steps: # emailer # - id: 'deploy-emailer' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -173,7 +173,7 @@ steps: # enx-redirect # - id: 'deploy-enx-redirect' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -195,7 +195,7 @@ steps: # metrics-registrar # - id: 'deploy-metrics-registrar' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -217,7 +217,7 @@ steps: # modeler # - id: 'deploy-modeler' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -239,7 +239,7 @@ steps: # rotation # - id: 'deploy-rotation' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -261,7 +261,7 @@ steps: # server # - id: 'deploy-server' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -283,7 +283,7 @@ steps: # stats-puller # - id: 'deploy-stats-puller' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' diff --git a/builders/promote.yaml b/builders/promote.yaml index 179aa26cd..b407294df 100644 --- a/builders/promote.yaml +++ b/builders/promote.yaml @@ -26,7 +26,7 @@ steps: # adminapi # - id: 'promote-adminapi' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -46,7 +46,7 @@ steps: # apiserver # - id: 'promote-apiserver' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -66,7 +66,7 @@ steps: # appsync # - id: 'promote-appsync' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -86,7 +86,7 @@ steps: # backup # - id: 'promote-backup' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -106,7 +106,7 @@ steps: # cleanup # - id: 'promote-cleanup' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -126,7 +126,7 @@ steps: # e2e-runner # - id: 'promote-e2e-runner' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -146,7 +146,7 @@ steps: # emailer # - id: 'promote-emailer' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -166,7 +166,7 @@ steps: # enx-redirect # - id: 'promote-enx-redirect' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -186,7 +186,7 @@ steps: # modeler # - id: 'promote-modeler' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -206,7 +206,7 @@ steps: # metrics-registrar # - id: 'promote-metrics-registrar' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -226,7 +226,7 @@ steps: # rotation # - id: 'promote-rotation' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -246,7 +246,7 @@ steps: # server # - id: 'promote-server' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' @@ -267,7 +267,7 @@ steps: # stats-puller # - id: 'promote-stats-puller' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:365.0.0-alpine' + name: 'gcr.io/google.com/cloudsdktool/cloud-sdk:396.0.0-alpine' args: - 'bash' - '-eEuo' diff --git a/docs/images/architecture/go.mod b/docs/images/architecture/go.mod index 9ca640c73..d85410618 100644 --- a/docs/images/architecture/go.mod +++ b/docs/images/architecture/go.mod @@ -1,5 +1,5 @@ module github.com/google/exposure-notifications-verification-server/docs/images/architecture -go 1.18 +go 1.19 require github.com/blushft/go-diagrams v0.0.0-20200926141704-5a1c57dcd0fb diff --git a/go.mod b/go.mod index 234528cf4..f000329a7 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/google/exposure-notifications-verification-server -go 1.18 +go 1.19 require ( cloud.google.com/go/monitoring v1.5.0 @@ -8,14 +8,14 @@ require ( contrib.go.opencensus.io/integrations/ocsql v0.1.7 firebase.google.com/go v3.13.0+incompatible github.com/NYTimes/gziphandler v1.1.1 - github.com/chromedp/cdproto v0.0.0-20220801115359-6a862c1fb810 + github.com/chromedp/cdproto v0.0.0-20220807232216-bd515c3c04a9 github.com/chromedp/chromedp v0.8.3 github.com/dustin/go-humanize v1.0.0 github.com/fatih/structs v1.1.0 github.com/golang-jwt/jwt v3.2.2+incompatible github.com/golang-migrate/migrate/v4 v4.15.2 - github.com/golangci/golangci-lint v1.47.3 - github.com/google/exposure-notifications-server v1.12.0 + github.com/golangci/golangci-lint v1.48.0 + github.com/google/exposure-notifications-server v1.12.1-0.20220808184754-3fe8ef98e470 github.com/google/go-cmp v0.5.8 github.com/google/uuid v1.3.0 github.com/gorilla/handlers v1.5.1 @@ -35,7 +35,7 @@ require ( github.com/ory/dockertest v3.3.5+incompatible github.com/rakutentech/jwk-go v1.0.1 github.com/russross/blackfriday/v2 v2.1.0 - github.com/sethvargo/go-envconfig v0.8.1 + github.com/sethvargo/go-envconfig v0.8.2 github.com/sethvargo/go-limiter v0.7.2 github.com/sethvargo/go-password v0.2.0 github.com/sethvargo/go-redisstore-opencensus v1.0.1 @@ -44,13 +44,13 @@ require ( github.com/unrolled/secure v1.12.0 go.opencensus.io v0.23.0 go.uber.org/zap v1.21.0 - golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b + golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 golang.org/x/text v0.3.7 golang.org/x/tools v0.1.12 gonum.org/v1/gonum v0.11.0 google.golang.org/api v0.91.0 - google.golang.org/genproto v0.0.0-20220804142021-4e6b2dfa6612 + google.golang.org/genproto v0.0.0-20220808145710-bf34ca4dd83a gopkg.in/gormigrate.v1 v1.6.0 ) @@ -95,7 +95,7 @@ require ( github.com/armon/go-radix v1.0.0 // indirect github.com/ashanbrown/forbidigo v1.3.0 // indirect github.com/ashanbrown/makezero v1.1.1 // indirect - github.com/aws/aws-sdk-go v1.44.69 // indirect + github.com/aws/aws-sdk-go v1.44.71 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/benbjohnson/clock v1.3.0 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -113,7 +113,7 @@ require ( github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4 // indirect github.com/chromedp/sysutil v1.0.0 // indirect github.com/containerd/continuity v0.3.0 // indirect - github.com/daixiang0/gci v0.5.0 // indirect + github.com/daixiang0/gci v0.6.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/denis-tingaikin/go-header v0.4.3 // indirect github.com/dimchansky/utfbom v1.1.1 // indirect @@ -137,13 +137,12 @@ require ( github.com/go-toolsmith/astp v1.0.0 // indirect github.com/go-toolsmith/strparse v1.0.0 // indirect github.com/go-toolsmith/typep v1.0.2 // indirect - github.com/go-xmlfmt/xmlfmt v0.0.0-20220206211657-0a94163c4677 // indirect + github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect github.com/gobwas/ws v1.1.0 // indirect github.com/gofrs/flock v0.8.1 // indirect - github.com/gofrs/uuid v4.2.0+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.4.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect @@ -155,10 +154,10 @@ require ( github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect github.com/golangci/misspell v0.3.5 // indirect - github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2 // indirect + github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect - github.com/googleapis/gax-go/v2 v2.4.0 // indirect + github.com/googleapis/gax-go/v2 v2.5.1 // indirect github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect github.com/gorilla/css v1.0.0 // indirect github.com/gostaticanalysis/analysisutil v0.7.1 // indirect @@ -174,7 +173,7 @@ require ( github.com/hashicorp/go-retryablehttp v0.7.1 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-secure-stdlib/mlock v0.1.2 // indirect - github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 // indirect + github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 // indirect github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 // indirect github.com/hashicorp/go-sockaddr v1.0.2 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect @@ -187,13 +186,13 @@ require ( github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jackc/chunkreader/v2 v2.0.1 // indirect - github.com/jackc/pgconn v1.12.1 // indirect + github.com/jackc/pgconn v1.13.0 // indirect github.com/jackc/pgio v1.0.0 // indirect github.com/jackc/pgpassfile v1.0.0 // indirect - github.com/jackc/pgproto3/v2 v2.3.0 // indirect + github.com/jackc/pgproto3/v2 v2.3.1 // indirect github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect - github.com/jackc/pgtype v1.11.0 // indirect - github.com/jackc/pgx/v4 v4.16.1 // indirect + github.com/jackc/pgtype v1.12.0 // indirect + github.com/jackc/pgx/v4 v4.17.0 // indirect github.com/jackc/puddle v1.2.1 // indirect github.com/jgautheron/goconst v1.5.1 // indirect github.com/jingyugao/rowserrcheck v1.1.1 // indirect @@ -202,7 +201,7 @@ require ( github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/julz/importas v0.1.0 // indirect - github.com/kisielk/errcheck v1.6.1 // indirect + github.com/kisielk/errcheck v1.6.2 // indirect github.com/kisielk/gotool v1.0.0 // indirect github.com/kulti/thelper v0.6.3 // indirect github.com/kunwardeep/paralleltest v1.0.6 // indirect @@ -219,7 +218,7 @@ require ( github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-ieproxy v0.0.7 // indirect github.com/mattn/go-isatty v0.0.14 // indirect - github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect github.com/mbilski/exhaustivestruct v1.2.0 // indirect github.com/mgechev/revive v1.2.1 // indirect @@ -245,7 +244,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/polyfloyd/go-errorlint v1.0.0 // indirect - github.com/prometheus/client_golang v1.12.2 // indirect + github.com/prometheus/client_golang v1.13.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect @@ -253,13 +252,13 @@ require ( github.com/prometheus/statsd_exporter v0.22.7 // indirect github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a // indirect github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect - github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 // indirect + github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect - github.com/rivo/uniseg v0.2.0 // indirect github.com/ryancurrah/gomodguard v1.2.4 // indirect github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect github.com/ryanuber/go-glob v1.0.0 // indirect - github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect + github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect + github.com/sashamelentyev/usestdlibvars v1.8.0 // indirect github.com/securego/gosec/v2 v2.12.0 // indirect github.com/sethvargo/go-gcpkms v0.1.0 // indirect github.com/sethvargo/go-redisstore v0.3.0 // indirect @@ -281,7 +280,7 @@ require ( github.com/stretchr/objx v0.4.0 // indirect github.com/stretchr/testify v1.8.0 // indirect github.com/subosito/gotenv v1.4.0 // indirect - github.com/sylvia7788/contextcheck v1.0.5 // indirect + github.com/sylvia7788/contextcheck v1.0.4 // indirect github.com/tdakkota/asciicheck v0.1.1 // indirect github.com/tetafro/godot v1.4.11 // indirect github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect @@ -298,8 +297,8 @@ require ( golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c // indirect - golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704 // indirect + golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7 // indirect + golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 // indirect golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/go.sum b/go.sum index 69e47ce64..36d7eaa9d 100644 --- a/go.sum +++ b/go.sum @@ -247,8 +247,8 @@ github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.44/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.69 h1:3A3DEizrCK6dAbBoRGh8KmoZij7She9snclG1ixY/xQ= -github.com/aws/aws-sdk-go v1.44.69/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.71 h1:e5ZbeFAdDB9i7NcQWdmIiA/NOC4aWec3syOUtUE0dBA= +github.com/aws/aws-sdk-go v1.44.71/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.8.0/go.mod h1:xEFuWz+3TYdlPRuo+CqATbeDWIWyaT5uAPwPaWtgse0= github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/config v1.6.0/go.mod h1:TNtBVmka80lRPk5+S9ZqVfFszOQAGJJ9KbT3EM3CHNU= @@ -336,8 +336,8 @@ github.com/chavacava/garif v0.0.0-20220316182200-5cad0b5181d4/go.mod h1:W8EnPSQ8 github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= -github.com/chromedp/cdproto v0.0.0-20220801115359-6a862c1fb810 h1:xLOQqZeuczP6H79nHDNDu72Y938paC5P7JsvCbQdC54= -github.com/chromedp/cdproto v0.0.0-20220801115359-6a862c1fb810/go.mod h1:5Y4sD/eXpwrChIuxhSr/G20n9CdbCmoerOHnuAf0Zr0= +github.com/chromedp/cdproto v0.0.0-20220807232216-bd515c3c04a9 h1:LMxGJgxdT8aGhbWiGsbxuP6fUK1NEvXENM7mjcQPC1I= +github.com/chromedp/cdproto v0.0.0-20220807232216-bd515c3c04a9/go.mod h1:5Y4sD/eXpwrChIuxhSr/G20n9CdbCmoerOHnuAf0Zr0= github.com/chromedp/chromedp v0.8.3 h1:UwOY+fhC5Vv3uKgRpnvilCbWs/QPz8ciFwRB0q6pH8k= github.com/chromedp/chromedp v0.8.3/go.mod h1:9YfKSJnBNeP77vKecv+DNx2/Tcb+6Gli0d1aZPw/xbk= github.com/chromedp/sysutil v1.0.0 h1:+ZxhTpfpZlmchB58ih/LBHX52ky7w2VhQVKQMucy3Ic= @@ -504,8 +504,8 @@ github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1S github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= -github.com/daixiang0/gci v0.5.0 h1:3+Z8nb/4dhJQYjpEbG4wt5na+KFJJTZ++PVEq/MVKX4= -github.com/daixiang0/gci v0.5.0/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= +github.com/daixiang0/gci v0.6.2 h1:TXCP5RqjE/UupXO+p33MEhqdv7QxjKGw5MVkt9ATiMs= +github.com/daixiang0/gci v0.6.2/go.mod h1:EpVfrztufwVgQRXjnX4zuNinEpLj5OmMjtu/+MB0V0c= 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= @@ -678,9 +678,8 @@ github.com/go-toolsmith/strparse v1.0.0 h1:Vcw78DnpCAKlM20kSbAyO4mPfJn/lyYA4BJUD github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/typep v1.0.2 h1:8xdsa1+FSIH/RhEkgnD1j2CJOy5mNllW1Q9tRiYwvlk= github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= +github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b h1:khEcpUM4yFcxg4/FHQWkvVRmgijNXRfzkIDHh23ggEo= github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= -github.com/go-xmlfmt/xmlfmt v0.0.0-20220206211657-0a94163c4677 h1:+k/R5MXzpgWkdqHjiuirfHk6QzzTToFxlKVrvkSR/ek= -github.com/go-xmlfmt/xmlfmt v0.0.0-20220206211657-0a94163c4677/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= @@ -724,9 +723,8 @@ github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw= github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0= -github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -798,16 +796,16 @@ github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe h1:6RGUuS7EGotKx6 github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe/go.mod h1:gjqyPShc/m8pEMpk0a3SeagVb0kaqvhscv+i9jI5ZhQ= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.47.3 h1:ri7A2DgtFpxgqcMSsU3qIT0IBm/SCdYgXlvmJx4szUU= -github.com/golangci/golangci-lint v1.47.3/go.mod h1:IvT5xyPX1W8JUJJrV60gcMzgQe1ttW/38yAzn6LuHOk= +github.com/golangci/golangci-lint v1.48.0 h1:hRiBNk9iRqdAKMa06ntfEiLyza1/3IE9rHLNJaek4a8= +github.com/golangci/golangci-lint v1.48.0/go.mod h1:5N+oxduCho+7yuccW69upg/O7cxjfR/d+IQeiNxGmKM= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= github.com/golangci/misspell v0.3.5 h1:pLzmVdl3VxTOncgzHcvLOKirdvcx/TydsClUQXTehjo= github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= -github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2 h1:SgM7GDZTxtTTQPU84heOxy34iG5Du7F2jcoZnvp+fXI= -github.com/golangci/revgrep v0.0.0-20210930125155-c22e5001d4f2/go.mod h1:LK+zW4MpyytAWQRz0M4xnzEk50lSvqDQKfx304apFkY= +github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 h1:DIPQnGy2Gv2FSA4B/hh8Q7xx3B7AIDk3DAMeHclH1vQ= +github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6/go.mod h1:0AKcRCkMoKvUvlf89F6O7H2LYdhr1zBh736mBItOdRs= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 h1:zwtduBRr5SSWhqsYNgcuWO2kFlpdOZbP0+yRjmvPGys= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= @@ -817,8 +815,8 @@ github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg= github.com/google/certificate-transparency-go v1.1.1/go.mod h1:FDKqPvSXawb2ecErVRrD+nfy23RCzyl7eqVCEmlT1Zs= -github.com/google/exposure-notifications-server v1.12.0 h1:8DrO0tqNT75YzM0eHf2JlKBsxHoD+kyZpyyiv1rUYaI= -github.com/google/exposure-notifications-server v1.12.0/go.mod h1:ZOEFh9r9gMREDyI+QbxV/vqoze6M5qBf28RhKf/r4Rc= +github.com/google/exposure-notifications-server v1.12.1-0.20220808184754-3fe8ef98e470 h1:tRJAkQUDumldz/2XVOF5RLCujC/tOGYy9pM0RWGsu7o= +github.com/google/exposure-notifications-server v1.12.1-0.20220808184754-3fe8ef98e470/go.mod h1:BewgKznZo5FEpMQzyJqe5jQ3QPRQ0wPzfs9PhycBB24= github.com/google/flatbuffers v2.0.0+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -883,8 +881,9 @@ github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pf github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= -github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= +github.com/googleapis/gax-go/v2 v2.5.1 h1:kBRZU0PSuI7PspsSb/ChWoVResUcwNVIdpB049pKTiw= +github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= @@ -978,8 +977,8 @@ github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5O github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-secure-stdlib/mlock v0.1.2 h1:p4AKXPPS24tO8Wc8i1gLvSKdmkiSY5xuju57czJ/IJQ= github.com/hashicorp/go-secure-stdlib/mlock v0.1.2/go.mod h1:zq93CJChV6L9QTfGKtfBxKqD7BqqXx5O04A/ns2p5+I= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6 h1:om4Al8Oy7kCm/B86rLCLah4Dt5Aa0Fr5rYBG60OzwHQ= -github.com/hashicorp/go-secure-stdlib/parseutil v0.1.6/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7 h1:UpiO20jno/eV1eVZcxqWnUohyKRe1g8FPV/xH1s/2qs= +github.com/hashicorp/go-secure-stdlib/parseutil v0.1.7/go.mod h1:QmrqtbKuxxSWTN3ETMPuB+VtEiBJ/A9XhoYGv8E1uD8= github.com/hashicorp/go-secure-stdlib/strutil v0.1.1/go.mod h1:gKOamz3EwoIoJq7mlMIRBpVTAUn8qPCrEclOKKWhD3U= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2 h1:kes8mmyCpxJsI7FTwtzRqEy9CdjCtrXrXGuOpxEA7Ts= github.com/hashicorp/go-secure-stdlib/strutil v0.1.2/go.mod h1:Gou2R9+il93BqX25LAKCLuM+y9U2T4hlwvT1yprcna4= @@ -1043,8 +1042,8 @@ github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpT github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI= -github.com/jackc/pgconn v1.12.1 h1:rsDFzIpRk7xT4B8FufgpCCeyjdNpKyghZeSefViE5W8= -github.com/jackc/pgconn v1.12.1/go.mod h1:ZkhRC59Llhrq3oSfrikvwQ5NaxYExr6twkdkMLaKono= +github.com/jackc/pgconn v1.13.0 h1:3L1XMNV2Zvca/8BYhzcRFS70Lr0WlDg16Di6SFGAbys= +github.com/jackc/pgconn v1.13.0/go.mod h1:AnowpAqO4CMIIJNZl2VJp+KrkAZciAkhEl0W0JIobpI= github.com/jackc/pgerrcode v0.0.0-20201024163028-a0d42d470451/go.mod h1:a/s9Lp5W7n/DD0VrVoyJ00FbP2ytTPDVOivvn2bMlds= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= @@ -1063,8 +1062,8 @@ github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwX github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.0.7/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgproto3/v2 v2.3.0 h1:brH0pCGBDkBW07HWlN/oSBXrmo3WB0UvZd1pIuDcL8Y= -github.com/jackc/pgproto3/v2 v2.3.0/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.3.1 h1:nwj7qwf0S+Q7ISFfBndqeLwSwxs+4DPsbRFjECT1Y4Y= +github.com/jackc/pgproto3/v2 v2.3.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= @@ -1076,8 +1075,8 @@ github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkAL github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= github.com/jackc/pgtype v1.6.2/go.mod h1:JCULISAZBFGrHaOXIIFiyfzW5VY0GRitRr8NeJsrdig= github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM= -github.com/jackc/pgtype v1.11.0 h1:u4uiGPz/1hryuXzyaBhSk6dnIyyG2683olG2OV+UUgs= -github.com/jackc/pgtype v1.11.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= +github.com/jackc/pgtype v1.12.0 h1:Dlq8Qvcch7kiehm8wPGIW0W3KsCCHJnRacKW0UM8n5w= +github.com/jackc/pgtype v1.12.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= @@ -1086,8 +1085,8 @@ github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6 github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= github.com/jackc/pgx/v4 v4.10.1/go.mod h1:QlrWebbs3kqEZPHCTGyxecvzG6tvIsYu+A5b1raylkA= github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs= -github.com/jackc/pgx/v4 v4.16.1 h1:JzTglcal01DrghUqt+PmzWsZx/Yh7SC/CTQmSBMTd0Y= -github.com/jackc/pgx/v4 v4.16.1/go.mod h1:SIhx0D5hoADaiXZVyv+3gSm3LCIIINTVO0PficsvWGQ= +github.com/jackc/pgx/v4 v4.17.0 h1:Hsx+baY8/zU2WtPLQyZi8WbecgcsWEeyoK1jvg/WgIo= +github.com/jackc/pgx/v4 v4.17.0/go.mod h1:Gd6RmOhtFLTu8cp/Fhq4kP195KrshxYJH3oW8AWJ1pw= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= @@ -1158,8 +1157,8 @@ github.com/kelseyhightower/run v0.0.17/go.mod h1:qggbYejLh94f8K/ZWW+lAbp1tOVzNgr github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/errcheck v1.6.1 h1:cErYo+J4SmEjdXZrVXGwLJCE2sB06s23LpkcyWNrT+s= -github.com/kisielk/errcheck v1.6.1/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= +github.com/kisielk/errcheck v1.6.2 h1:uGQ9xI8/pgc9iOoCe7kWQgRE6SBTrCGmTSf0LrEtY7c= +github.com/kisielk/errcheck v1.6.2/go.mod h1:nXw/i/MfnvRHqXa7XXmQMUB0oNFGuBrNI8d8NLy0LPw= github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= @@ -1263,9 +1262,8 @@ github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27k github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.6/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= -github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= @@ -1494,8 +1492,8 @@ github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= -github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= +github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1546,17 +1544,14 @@ github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mo github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 h1:PDWGei+Rf2bBiuZIbZmM20J2ftEy9IeUCHA8HbQqed8= github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5/go.mod h1:wSEyW6O61xRV6zb6My3HxrQ5/8ke7NE2OayqCHa3xRM= +github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 h1:L8QM9bvf68pVdQ3bCFZMDmnt9yqcMBro1pC7F+IPYMY= github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= -github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl980XxGFEZSS6KlBGIV0diGdySzxATTWoqaU= -github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs= github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ= github.com/rakutentech/jwk-go v1.0.1 h1:yCE+M/FsgPbO94hMIRkcMNFZAlmyFwmrstg717dykFc= github.com/rakutentech/jwk-go v1.0.1/go.mod h1:LtzSv4/+Iti1nnNeVQiP6l5cI74GBStbhyXCYvgPZFk= github.com/remyoudompheng/bigfft v0.0.0-20190728182440-6a916e37a237/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -1582,8 +1577,10 @@ github.com/ryanuber/go-glob v1.0.0 h1:iQh3xXAumdQ+4Ufa5b25cRpC5TYKlno6hsv6Cb3pkB github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= -github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc= -github.com/sanposhiho/wastedassign/v2 v2.0.7/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/sanposhiho/wastedassign/v2 v2.0.6 h1:+6/hQIHKNJAUixEj6EmOngGIisyeI+T3335lYTyxRoA= +github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= +github.com/sashamelentyev/usestdlibvars v1.8.0 h1:QnWP9IOEuRyYKH+IG0LlQIjuJlc0rfdo4K3/Zh3WRMw= +github.com/sashamelentyev/usestdlibvars v1.8.0/go.mod h1:BFt7b5mSVHaaa26ZupiNRV2ODViQBxZZVhtAxAJRrjs= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= @@ -1594,8 +1591,8 @@ github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod github.com/securego/gosec/v2 v2.12.0 h1:CQWdW7ATFpvLSohMVsajscfyHJ5rsGmEXmsNcsDNmAg= github.com/securego/gosec/v2 v2.12.0/go.mod h1:iTpT+eKTw59bSgklBHlSnH5O2tNygHMDxfvMubA4i7I= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/sethvargo/go-envconfig v0.8.1 h1:Gcy6BxTI3A/fOxyoFVDaXcRrhXM1+9Og4ww03/XK1tY= -github.com/sethvargo/go-envconfig v0.8.1/go.mod h1:Iz1Gy1Sf3T64TQlJSvee81qDhf7YIlt8GMUX6yyNFs0= +github.com/sethvargo/go-envconfig v0.8.2 h1:DDUVuG21RMgeB/bn4leclUI/837y6cQCD4w8hb5797k= +github.com/sethvargo/go-envconfig v0.8.2/go.mod h1:Iz1Gy1Sf3T64TQlJSvee81qDhf7YIlt8GMUX6yyNFs0= github.com/sethvargo/go-gcpkms v0.1.0 h1:pyjDLqLwpk9pMjDSTilPpaUjgP1AfSjX9WGzitZwGUY= github.com/sethvargo/go-gcpkms v0.1.0/go.mod h1:33BuvqUjsYk0bpMgn+WCclCYtMLOyaqtn5j0fCo4vvk= github.com/sethvargo/go-limiter v0.6.0/go.mod h1:C0kbSFbiriE5k2FFOe18M1YZbAR2Fiwf72uGu0CXCcU= @@ -1706,8 +1703,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs= github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo= -github.com/sylvia7788/contextcheck v1.0.5 h1:sIC4UT2ffb4XfcBB6YxFNhdyZVpblh4kc3R8FMnRq4c= -github.com/sylvia7788/contextcheck v1.0.5/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= +github.com/sylvia7788/contextcheck v1.0.4 h1:MsiVqROAdr0efZc/fOCt0c235qm9XJqHtWwM+2h2B04= +github.com/sylvia7788/contextcheck v1.0.4/go.mod h1:vuPKJMQ7MQ91ZTqfdyreNKwZjyUg6KO+IebVyQDedZQ= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -2035,8 +2032,8 @@ golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su 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= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b h1:3ogNYyK4oIQdIKzTu68hQrr4iuVxF3AxKl9Aj/eDrw0= -golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 h1:N9Vc/rorQUDes6B9CNdIxAn5jODGj2wzfrei2x4wNj4= +golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/oauth2 v0.0.0-20180227000427-d7d64896b5ff/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= @@ -2061,8 +2058,8 @@ golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220622183110-fd043fe589d2/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c h1:q3gFqPqH7NVofKo3c3yETAP//pPI+G5mvB7qqj1Y5kY= -golang.org/x/oauth2 v0.0.0-20220722155238-128564f6959c/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7 h1:dtndE8FcEta75/4kHF3AbpuWzV6f1LjnLrM4pe2SZrw= +golang.org/x/oauth2 v0.0.0-20220808172628-8227340efae7/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -2225,8 +2222,8 @@ 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-20220702020025-31831981b65f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704 h1:Y7NOhdqIOU8kYI7BxsgL38d0ot0raxvcW+EMQU2QrT4= -golang.org/x/sys v0.0.0-20220803195053-6e608f9ce704/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 h1:v1W7bwXHsnLLloWYTVEdvGvA7BHMeBYsPcF0GLDxIRs= +golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= @@ -2552,8 +2549,8 @@ google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljW google.golang.org/genproto v0.0.0-20220617124728-180714bec0ad/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220628213854-d9e0b6570c03/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220804142021-4e6b2dfa6612 h1:NX3L5YesD5qgxxrPHdKqHH38Ao0AG6poRXG+JljPsGU= -google.golang.org/genproto v0.0.0-20220804142021-4e6b2dfa6612/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= +google.golang.org/genproto v0.0.0-20220808145710-bf34ca4dd83a h1:FX/Y0fehmt5BT/GcKqm2u8l/Y1d0EQwAkI0vbXytJ60= +google.golang.org/genproto v0.0.0-20220808145710-bf34ca4dd83a/go.mod h1:dbqgFATTzChvnt+ujMdZwITVAJHFtfyN1qUhDqEiIlk= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= From 4d015f07f321d8a54168aafd4cd37ae1fc59ce59 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Mon, 8 Aug 2022 15:18:57 -0400 Subject: [PATCH 2/2] Fix gofmt --- internal/project/context.go | 3 +- pkg/api/api.go | 50 ++++++++++++---------- pkg/api/ios.go | 2 +- pkg/controller/admin/events.go | 3 +- pkg/controller/admin/mobile_apps.go | 3 +- pkg/controller/admin/realms.go | 6 ++- pkg/controller/admin/sms.go | 3 +- pkg/controller/apikey/index.go | 3 +- pkg/controller/appsync/helpers.go | 6 ++- pkg/controller/associated/associated.go | 6 ++- pkg/controller/associated/index.go | 7 ++- pkg/controller/certapi/signers.go | 3 +- pkg/controller/codes/index.go | 3 +- pkg/controller/email.go | 9 ++-- pkg/controller/login/register_phone.go | 3 +- pkg/controller/realmadmin/events.go | 3 +- pkg/controller/realmadmin/settings_show.go | 3 +- pkg/controller/user/import_batch.go | 3 +- pkg/controller/user/index.go | 3 +- pkg/controller/userreport/send.go | 4 +- pkg/database/authorized_app.go | 3 +- pkg/database/token_test.go | 1 - pkg/email/config.go | 14 +++--- 23 files changed, 86 insertions(+), 58 deletions(-) diff --git a/internal/project/context.go b/internal/project/context.go index 6e8a74c9f..fc1fbc2ec 100644 --- a/internal/project/context.go +++ b/internal/project/context.go @@ -33,8 +33,7 @@ func TestContext(tb testing.TB) context.Context { // TestLogger returns a logger configured for test. See the following link for // more information: // -// https://pkg.go.dev/go.uber.org/zap/zaptest -// +// https://pkg.go.dev/go.uber.org/zap/zaptest func TestLogger(tb testing.TB) *zap.SugaredLogger { if testing.Verbose() { return zaptest.NewLogger(tb, zaptest.Level(zap.DebugLevel)).Sugar() diff --git a/pkg/api/api.go b/pkg/api/api.go index 1602109ec..a84274a45 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -382,7 +382,6 @@ type UserReportRequest struct { } // UserReportResponse is the reply from a UserReportRequest. -// type UserReportResponse struct { Padding Padding `json:"padding"` @@ -398,33 +397,40 @@ type UserReportResponse struct { ErrorCode string `json:"errorCode,omitempty"` } -// VerifyCodeRequest is the request structure for exchanging a short term Verification Code -// (OTP) for a long term token (a JWT) that can later be used to sign TEKs. -// -// 'code' is either the issued short code or long code issued to the user. Either one is -// acceptable. Note that they normally have different expiry times. -// 'accept' is a list of accepted test types by the client. Acceptable values are -// - ["confirmed"] -// - ["confirmed", "likely"] == ["likely"] -// - ["confirmed", "likely", "negative"] == ["negative"] -// These values form a hierarchy, if a client will accept 'likely' they must accept -// both confirmed and likely. 'negative' indicates you accept confirmed, likely, and negative. -// A client can pass in the complete list they accept or the "highest" value they can accept. -// If this value is omitted or is empty, the client agrees to accept ALL possible -// test types, including test types that may be introduced in the future. -// The special type of test, '"user-report"' can be added safely to any of the other types. -// -// The nonce must be provided when validating a self report key. +// VerifyCodeRequest is the request structure for exchanging a short term +// Verification Code (OTP) for a long term token (a JWT) that can later be used +// to sign TEKs. // // Requires API key in a HTTP header, X-API-Key: APIKEY type VerifyCodeRequest struct { Padding Padding `json:"padding"` - VerificationCode string `json:"code"` - AcceptTestTypes []string `json:"accept"` + // VerificationCode (code) is either the issued short code or long code issued + // to the user. Either one is acceptable. Note that they normally have + // different expiry times. + VerificationCode string `json:"code"` + + // AcceptTestTypes (accept) is a list of accepted test types by the client. + // Acceptable values are: + // + // - ["confirmed"] + // - ["confirmed", "likely"] == ["likely"] + // - ["confirmed", "likely", "negative"] == ["negative"] + // + // These values form a hierarchy, if a client will accept 'likely' they must + // accept both confirmed and likely. 'negative' indicates you accept + // confirmed, likely, and negative. A client can pass in the complete list + // they accept or the "highest" value they can accept. If this value is + // omitted or is empty, the client agrees to accept ALL possible test types, + // including test types that may be introduced in the future. + // + // The special type of test, '"user-report"' can be added safely to any of the + // other types. + AcceptTestTypes []string `json:"accept"` - // Optional: If present must be the same nonce that was used to request the verification code. - // base64 encoded. + // Nonce (nonce) If present must be the same nonce that was used to request + // the verification code. base64 encoded. The nonce must be provided when + // validating a self report key. Nonce string `json:"nonce,omitempty"` } diff --git a/pkg/api/ios.go b/pkg/api/ios.go index 1ee0c6f09..3bc6164ee 100644 --- a/pkg/api/ios.go +++ b/pkg/api/ios.go @@ -15,8 +15,8 @@ package api // IOSDataResponse is the iOS format is specified by: -// https://developer.apple.com/documentation/safariservices/supporting_associated_domains // +// https://developer.apple.com/documentation/safariservices/supporting_associated_domains type IOSDataResponse struct { Applinks IOSAppLinks `json:"applinks"` diff --git a/pkg/controller/admin/events.go b/pkg/controller/admin/events.go index 5a5a24b6e..854c6ec55 100644 --- a/pkg/controller/admin/events.go +++ b/pkg/controller/admin/events.go @@ -103,7 +103,8 @@ func (c *Controller) HandleEventsShow() http.Handler { } func (c *Controller) renderEvents(ctx context.Context, w http.ResponseWriter, - events []*database.AuditEntry, paginator *pagination.Paginator, from, to string, realm *database.Realm) { + events []*database.AuditEntry, paginator *pagination.Paginator, from, to string, realm *database.Realm, +) { m := controller.TemplateMapFromContext(ctx) m["events"] = events m["paginator"] = paginator diff --git a/pkg/controller/admin/mobile_apps.go b/pkg/controller/admin/mobile_apps.go index 00129df30..58dd06b95 100644 --- a/pkg/controller/admin/mobile_apps.go +++ b/pkg/controller/admin/mobile_apps.go @@ -60,7 +60,8 @@ func (c *Controller) HandleMobileAppsIndex() http.Handler { } func (c *Controller) renderMobileAppsIndex(ctx context.Context, w http.ResponseWriter, - apps []*database.MobileApp, paginator *pagination.Paginator, q string) { + apps []*database.MobileApp, paginator *pagination.Paginator, q string, +) { m := controller.TemplateMapFromContext(ctx) m.Title("Mobile apps - System Admin") m["apps"] = apps diff --git a/pkg/controller/admin/realms.go b/pkg/controller/admin/realms.go index 23bbe2258..c5cccc380 100644 --- a/pkg/controller/admin/realms.go +++ b/pkg/controller/admin/realms.go @@ -175,7 +175,8 @@ func (c *Controller) HandleRealmsCreate() http.Handler { } func (c *Controller) renderNewRealm(ctx context.Context, w http.ResponseWriter, - realm *database.Realm, smsConfig *database.SMSConfig, emailConfig *database.EmailConfig) { + realm *database.Realm, smsConfig *database.SMSConfig, emailConfig *database.EmailConfig, +) { m := controller.TemplateMapFromContext(ctx) m.Title("New Realm - System Admin") m["realm"] = realm @@ -309,7 +310,8 @@ func (c *Controller) renderEditRealm(ctx context.Context, w http.ResponseWriter, realm *database.Realm, membership *database.Membership, smsConfig *database.SMSConfig, emailConfig *database.EmailConfig, chaffEvents []*database.RealmChaffEvent, quotaLimit, quotaRemaining uint64, - translations []*database.DynamicTranslation) { + translations []*database.DynamicTranslation, +) { m := controller.TemplateMapFromContext(ctx) m.Title("Realm: %s - System Admin", realm.Name) m["realm"] = realm diff --git a/pkg/controller/admin/sms.go b/pkg/controller/admin/sms.go index 405c4a26f..6fa89e8c2 100644 --- a/pkg/controller/admin/sms.go +++ b/pkg/controller/admin/sms.go @@ -119,7 +119,8 @@ func (c *Controller) HandleSMSUpdate() http.Handler { } func (c *Controller) renderShowSMS(ctx context.Context, w http.ResponseWriter, - smsConfig *database.SMSConfig, smsFromNumbers []*database.SMSFromNumber) { + smsConfig *database.SMSConfig, smsFromNumbers []*database.SMSFromNumber, +) { m := controller.TemplateMapFromContext(ctx) m.Title("SMS - System Admin") m["smsConfig"] = smsConfig diff --git a/pkg/controller/apikey/index.go b/pkg/controller/apikey/index.go index 5cb8f0330..208d77748 100644 --- a/pkg/controller/apikey/index.go +++ b/pkg/controller/apikey/index.go @@ -66,7 +66,8 @@ func (c *Controller) HandleIndex() http.Handler { // renderIndex renders the index page. func (c *Controller) renderIndex(ctx context.Context, w http.ResponseWriter, - apps []*database.AuthorizedApp, paginator *pagination.Paginator, query string) { + apps []*database.AuthorizedApp, paginator *pagination.Paginator, query string, +) { m := controller.TemplateMapFromContext(ctx) m.Title("API keys") m["apps"] = apps diff --git a/pkg/controller/appsync/helpers.go b/pkg/controller/appsync/helpers.go index e2ad34251..968ef2578 100644 --- a/pkg/controller/appsync/helpers.go +++ b/pkg/controller/appsync/helpers.go @@ -125,7 +125,8 @@ func (c *Controller) syncApps(ctx context.Context, apps *appsync.AppsResponse) * } func (c *Controller) findRealmForApp( - app appsync.App, realms map[string]*database.Realm) (*database.Realm, error) { + app appsync.App, realms map[string]*database.Realm, +) (*database.Realm, error) { var err error realm, has := realms[app.Region] if !has { // Find this apps region and cache it in our realms map @@ -139,7 +140,8 @@ func (c *Controller) findRealmForApp( } func (c *Controller) findAppsForRealm( - realmID uint, appsByRealm map[uint][]*database.MobileApp) ([]*database.MobileApp, error) { + realmID uint, appsByRealm map[uint][]*database.MobileApp, +) ([]*database.MobileApp, error) { var err error realmApps, has := appsByRealm[realmID] if !has { // Find all of the apps for this realm and cache that list in our appByRealmMap diff --git a/pkg/controller/associated/associated.go b/pkg/controller/associated/associated.go index 9e4bcfbc1..73e676ff5 100644 --- a/pkg/controller/associated/associated.go +++ b/pkg/controller/associated/associated.go @@ -16,10 +16,12 @@ // protocols. For more discussion of these protocols, please see: // // Android: -// https://developer.android.com/training/app-links/verify-site-associations +// +// https://developer.android.com/training/app-links/verify-site-associations // // iOS: -// https://developer.apple.com/documentation/safariservices/supporting_associated_domains +// +// https://developer.apple.com/documentation/safariservices/supporting_associated_domains package associated import ( diff --git a/pkg/controller/associated/index.go b/pkg/controller/associated/index.go index 9f0b2ae96..e83c6861a 100644 --- a/pkg/controller/associated/index.go +++ b/pkg/controller/associated/index.go @@ -16,9 +16,12 @@ // protocols. For more discussion of these protocols, please see: // // Android: -// https://developer.android.com/training/app-links/verify-site-associations +// +// https://developer.android.com/training/app-links/verify-site-associations +// // iOS: -// https://developer.apple.com/documentation/safariservices/supporting_associated_domains +// +// https://developer.apple.com/documentation/safariservices/supporting_associated_domains package associated import ( diff --git a/pkg/controller/certapi/signers.go b/pkg/controller/certapi/signers.go index 1001cc19d..1d0fc97b6 100644 --- a/pkg/controller/certapi/signers.go +++ b/pkg/controller/certapi/signers.go @@ -40,7 +40,8 @@ func (c *Controller) getSignerForAuthApp(ctx context.Context, authApp *database. // GetSignerForRealm gets the certificate signer info for the given realm. func GetSignerForRealm(ctx context.Context, realmID uint, - cfg config.CertificateSigningConfig, cache *cache.Cache[*SignerInfo], db *database.Database, kms keys.KeyManager) (*SignerInfo, error) { + cfg config.CertificateSigningConfig, cache *cache.Cache[*SignerInfo], db *database.Database, kms keys.KeyManager, +) (*SignerInfo, error) { signer, err := cache.WriteThruLookup(fmt.Sprintf("%d", realmID), func() (*SignerInfo, error) { realm, err := db.FindRealm(realmID) diff --git a/pkg/controller/codes/index.go b/pkg/controller/codes/index.go index f359bf02a..349ad510a 100644 --- a/pkg/controller/codes/index.go +++ b/pkg/controller/codes/index.go @@ -60,7 +60,8 @@ func (c *Controller) renderStatus( w http.ResponseWriter, realm *database.Realm, user *database.User, - code *database.VerificationCode) error { + code *database.VerificationCode, +) error { recentCodes, err := realm.ListRecentCodes(c.db, user) if err != nil { return err diff --git a/pkg/controller/email.go b/pkg/controller/email.go index 3b89c269b..513a08ff5 100644 --- a/pkg/controller/email.go +++ b/pkg/controller/email.go @@ -25,7 +25,8 @@ import ( // SendInviteEmailFunc returns a function capable of sending a new user invitation. func SendInviteEmailFunc(ctx context.Context, db *database.Database, h *render.Renderer, email string, - realm *database.Realm) (auth.InviteUserEmailFunc, error) { + realm *database.Realm, +) (auth.InviteUserEmailFunc, error) { // Lookup the email provider emailer, err := realm.EmailProvider(db) if err != nil { @@ -73,7 +74,8 @@ func SendInviteEmailFunc(ctx context.Context, db *database.Database, h *render.R // SendPasswordResetEmailFunc returns a function capable of sending a password // reset for the given user. func SendPasswordResetEmailFunc(ctx context.Context, db *database.Database, h *render.Renderer, email string, - realm *database.Realm) (auth.ResetPasswordEmailFunc, error) { + realm *database.Realm, +) (auth.ResetPasswordEmailFunc, error) { // Lookup the email provider emailer, err := realm.EmailProvider(db) if err != nil { @@ -120,7 +122,8 @@ func SendPasswordResetEmailFunc(ctx context.Context, db *database.Database, h *r // SendEmailVerificationEmailFunc returns a function capable of sending an email // verification email. func SendEmailVerificationEmailFunc(ctx context.Context, db *database.Database, h *render.Renderer, email string, - realm *database.Realm) (auth.EmailVerificationEmailFunc, error) { + realm *database.Realm, +) (auth.EmailVerificationEmailFunc, error) { // Lookup the email provider emailer, err := realm.EmailProvider(db) if err != nil { diff --git a/pkg/controller/login/register_phone.go b/pkg/controller/login/register_phone.go index 370049780..9296666c0 100644 --- a/pkg/controller/login/register_phone.go +++ b/pkg/controller/login/register_phone.go @@ -75,7 +75,8 @@ func (c *Controller) HandleRegisterPhone() http.Handler { } func (c *Controller) renderRegisterPhone(ctx context.Context, w http.ResponseWriter, - mode *database.AuthRequirement, mfaEnabled bool) { + mode *database.AuthRequirement, mfaEnabled bool, +) { m := controller.TemplateMapFromContext(ctx) m.Title("Multi-factor authentication registration") m["mfaMode"] = mode diff --git a/pkg/controller/realmadmin/events.go b/pkg/controller/realmadmin/events.go index 55a3d325e..173ac44c9 100644 --- a/pkg/controller/realmadmin/events.go +++ b/pkg/controller/realmadmin/events.go @@ -75,7 +75,8 @@ func (c *Controller) HandleEvents() http.Handler { } func (c *Controller) renderEvents(ctx context.Context, w http.ResponseWriter, - realm *database.Realm, events []*database.AuditEntry, paginator *pagination.Paginator, from, to string) { + realm *database.Realm, events []*database.AuditEntry, paginator *pagination.Paginator, from, to string, +) { m := controller.TemplateMapFromContext(ctx) m.Title("Events") m["user"] = realm diff --git a/pkg/controller/realmadmin/settings_show.go b/pkg/controller/realmadmin/settings_show.go index 9cd6a30d5..020b602f0 100644 --- a/pkg/controller/realmadmin/settings_show.go +++ b/pkg/controller/realmadmin/settings_show.go @@ -33,7 +33,8 @@ type TemplateData struct { func (c *Controller) renderSettings( ctx context.Context, w http.ResponseWriter, r *http.Request, realm *database.Realm, smsConfig *database.SMSConfig, emailConfig *database.EmailConfig, keyServerStats *database.KeyServerStats, - quotaLimit, quotaRemaining uint64) { + quotaLimit, quotaRemaining uint64, +) { if smsConfig == nil { var err error smsConfig, err = realm.SMSConfig(c.db) diff --git a/pkg/controller/user/import_batch.go b/pkg/controller/user/import_batch.go index 83d4c0150..d5a9b5b2c 100644 --- a/pkg/controller/user/import_batch.go +++ b/pkg/controller/user/import_batch.go @@ -78,7 +78,8 @@ func (c *Controller) HandleImportBatch() http.Handler { func (c *Controller) importUsers(ctx context.Context, realm *database.Realm, realmMemberships map[uint]rbac.Permission, actor database.Auditable, - users []api.BatchUser, sendInvites bool) ([]*api.BatchUser, *multierror.Error) { + users []api.BatchUser, sendInvites bool, +) ([]*api.BatchUser, *multierror.Error) { logger := logging.FromContext(ctx).Named("user.importUsers") addedUsers := make([]*api.BatchUser, 0, len(users)) diff --git a/pkg/controller/user/index.go b/pkg/controller/user/index.go index d25674923..f8f7922e1 100644 --- a/pkg/controller/user/index.go +++ b/pkg/controller/user/index.go @@ -81,7 +81,8 @@ func (c *Controller) HandleIndex() http.Handler { func (c *Controller) renderIndex( ctx context.Context, w http.ResponseWriter, - memberships []*database.Membership, paginator *pagination.Paginator, query string) { + memberships []*database.Membership, paginator *pagination.Paginator, query string, +) { m := controller.TemplateMapFromContext(ctx) m.Title("Users") m["memberships"] = memberships diff --git a/pkg/controller/userreport/send.go b/pkg/controller/userreport/send.go index 2b396b001..2043097da 100644 --- a/pkg/controller/userreport/send.go +++ b/pkg/controller/userreport/send.go @@ -22,7 +22,7 @@ import ( "encoding/hex" "encoding/json" "fmt" - "io/ioutil" + "io" "net/http" "github.com/google/exposure-notifications-server/pkg/base64util" @@ -235,7 +235,7 @@ func sendWebhookRequest(ctx context.Context, client *http.Client, realm *databas defer resp.Body.Close() if code := resp.StatusCode; code != 200 { - body, _ := ioutil.ReadAll(resp.Body) + body, _ := io.ReadAll(resp.Body) logger.Errorw("unsuccessful response from webhook", "code", code, "headers", resp.Header, diff --git a/pkg/database/authorized_app.go b/pkg/database/authorized_app.go index 335cbfcd2..2efce4d95 100644 --- a/pkg/database/authorized_app.go +++ b/pkg/database/authorized_app.go @@ -358,8 +358,7 @@ func (db *Database) generateAPIKeyHMACs(apiKey string) ([]string, error) { // GenerateAPIKey generates a new API key that is bound to the given realm. This // API key is NOT stored in the database. API keys are of the format: // -// key:realmID:hex(hmac) -// +// key:realmID:hex(hmac) func (db *Database) GenerateAPIKey(realmID uint) (string, error) { // Create the "key" parts. buf := make([]byte, apiKeyBytes) diff --git a/pkg/database/token_test.go b/pkg/database/token_test.go index e718aba23..9f4a40e8c 100644 --- a/pkg/database/token_test.go +++ b/pkg/database/token_test.go @@ -170,7 +170,6 @@ func TestIssueToken(t *testing.T) { Subject *Subject ClaimError string }{ - { Name: "normal_token_issue", Verification: func() *VerificationCode { diff --git a/pkg/email/config.go b/pkg/email/config.go index 855e68b03..8d24c733c 100644 --- a/pkg/email/config.go +++ b/pkg/email/config.go @@ -32,13 +32,15 @@ const ( ProviderTypeSMTP ProviderType = "SIMPLE_SMTP" ) -// Config represents the env var based configuration for email SMTP server connection. +// Config represents the env var based configuration for email SMTP server +// connection. // -// Note: This will only work with email providers that accept external connections. -// The provider must accept TLS, and users should independently consider the security -// of the email provider / account. -// Gmail or Google Workspace accounts can be used with an app-password, but will -// not work with security features such as Advanced Protection enabled. +// This will only work with email providers that accept external connections. +// +// The provider must accept TLS, and users should independently consider the +// security of the email provider / account. Gmail or Google Workspace accounts +// can be used with an app-password, but will not work with security features +// such as Advanced Protection enabled. type Config struct { ProviderType ProviderType