From 7b4377ad9d8a7205416df8d6217ef2b010f89481 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Wed, 22 Jan 2025 16:07:17 +0100 Subject: vendor: delete --- vendor/github.com/vektra/mockery/v2/.gitignore | 9 - vendor/github.com/vektra/mockery/v2/.golangci.yml | 28 - .../github.com/vektra/mockery/v2/.goreleaser.yml | 86 -- vendor/github.com/vektra/mockery/v2/.mockery.yaml | 72 -- .../vektra/mockery/v2/CODE_OF_CONDUCT.md | 128 --- .../github.com/vektra/mockery/v2/CONTRIBUTING.md | 22 - vendor/github.com/vektra/mockery/v2/Dockerfile | 11 - vendor/github.com/vektra/mockery/v2/LICENSE | 28 - vendor/github.com/vektra/mockery/v2/README.md | 32 - vendor/github.com/vektra/mockery/v2/Taskfile.yml | 83 -- vendor/github.com/vektra/mockery/v2/cmd/mockery.go | 415 ------- .../github.com/vektra/mockery/v2/cmd/showconfig.go | 61 - vendor/github.com/vektra/mockery/v2/codecov.yml | 11 - vendor/github.com/vektra/mockery/v2/go.work | 9 - vendor/github.com/vektra/mockery/v2/go.work.sum | 789 ------------- vendor/github.com/vektra/mockery/v2/main.go | 9 - vendor/github.com/vektra/mockery/v2/mkdocs.yml | 94 -- .../vektra/mockery/v2/pkg/config/config.go | 932 ---------------- .../github.com/vektra/mockery/v2/pkg/generator.go | 1180 -------------------- .../vektra/mockery/v2/pkg/logging/logging.go | 88 -- .../github.com/vektra/mockery/v2/pkg/outputter.go | 379 ------- vendor/github.com/vektra/mockery/v2/pkg/parse.go | 384 ------- .../vektra/mockery/v2/pkg/stackerr/stackerr.go | 47 - vendor/github.com/vektra/mockery/v2/pkg/walker.go | 210 ---- 24 files changed, 5107 deletions(-) delete mode 100644 vendor/github.com/vektra/mockery/v2/.gitignore delete mode 100644 vendor/github.com/vektra/mockery/v2/.golangci.yml delete mode 100644 vendor/github.com/vektra/mockery/v2/.goreleaser.yml delete mode 100644 vendor/github.com/vektra/mockery/v2/.mockery.yaml delete mode 100644 vendor/github.com/vektra/mockery/v2/CODE_OF_CONDUCT.md delete mode 100644 vendor/github.com/vektra/mockery/v2/CONTRIBUTING.md delete mode 100644 vendor/github.com/vektra/mockery/v2/Dockerfile delete mode 100644 vendor/github.com/vektra/mockery/v2/LICENSE delete mode 100644 vendor/github.com/vektra/mockery/v2/README.md delete mode 100644 vendor/github.com/vektra/mockery/v2/Taskfile.yml delete mode 100644 vendor/github.com/vektra/mockery/v2/cmd/mockery.go delete mode 100644 vendor/github.com/vektra/mockery/v2/cmd/showconfig.go delete mode 100644 vendor/github.com/vektra/mockery/v2/codecov.yml delete mode 100644 vendor/github.com/vektra/mockery/v2/go.work delete mode 100644 vendor/github.com/vektra/mockery/v2/go.work.sum delete mode 100644 vendor/github.com/vektra/mockery/v2/main.go delete mode 100644 vendor/github.com/vektra/mockery/v2/mkdocs.yml delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/config/config.go delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/generator.go delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/logging/logging.go delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/outputter.go delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/parse.go delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/stackerr/stackerr.go delete mode 100644 vendor/github.com/vektra/mockery/v2/pkg/walker.go (limited to 'vendor/github.com/vektra') diff --git a/vendor/github.com/vektra/mockery/v2/.gitignore b/vendor/github.com/vektra/mockery/v2/.gitignore deleted file mode 100644 index 118bda4dc..000000000 --- a/vendor/github.com/vektra/mockery/v2/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -mockery.prof -dist -.idea -docs/ve -ve -.cache -coverage.txt -site/ -.task/ \ No newline at end of file diff --git a/vendor/github.com/vektra/mockery/v2/.golangci.yml b/vendor/github.com/vektra/mockery/v2/.golangci.yml deleted file mode 100644 index d9991322d..000000000 --- a/vendor/github.com/vektra/mockery/v2/.golangci.yml +++ /dev/null @@ -1,28 +0,0 @@ -linters: - # Disable all linters. - # Default: false - disable-all: true - # Enable specific linter - # https://golangci-lint.run/usage/linters/#enabled-by-default - enable: - - errcheck - - gosimple - - govet - - ineffassign - - staticcheck - - typecheck - - contextcheck - - durationcheck - - exportloopref - - gocheckcompilerdirectives - - gosec - - loggercheck - - nilerr - - prealloc - - predeclared - - reassign -linters-settings: - staticcheck: - checks: - - all - - '-SA1024' diff --git a/vendor/github.com/vektra/mockery/v2/.goreleaser.yml b/vendor/github.com/vektra/mockery/v2/.goreleaser.yml deleted file mode 100644 index ae3a85965..000000000 --- a/vendor/github.com/vektra/mockery/v2/.goreleaser.yml +++ /dev/null @@ -1,86 +0,0 @@ ---- -project_name: mockery -before: - hooks: - - go mod download -builds: - - main: ./main.go - binary: mockery - ldflags: - - -s -w -X github.com/vektra/mockery/v2/pkg/logging.SemVer=v{{.Version}} - env: - - CGO_ENABLED=0 - goos: - - darwin - - linux - - windows - goarch: - - amd64 - - arm64 -archives: - - name_template: >- - {{ .ProjectName }}_{{ .Version }}_{{- title .Os }}_ - {{- if eq .Arch "amd64" }}x86_64 - {{- else if eq .Arch "386" }}i386 - {{- else }}{{ .Arch }}{{ end }} - files: - - README.md - - LICENSE -checksum: - name_template: "checksum.txt" -snapshot: - name_template: "{{ .Tag }}-next" -changelog: - sort: asc -dockers: - - image_templates: ["vektra/mockery:{{ .Tag }}-amd64"] - goarch: amd64 - dockerfile: Dockerfile - use: buildx - build_flag_templates: - - "--pull" - - "--label=org.opencontainers.image.created={{.Date}}" - - "--label=org.opencontainers.image.name={{.ProjectName}}" - - "--label=org.opencontainers.image.revision={{.FullCommit}}" - - "--label=org.opencontainers.image.version={{.Version}}" - - "--label=org.opencontainers.image.source={{.GitURL}}" - - "--platform=linux/amd64" - - image_templates: ["vektra/mockery:{{ .Tag }}-arm64"] - goarch: arm64 - dockerfile: Dockerfile - use: buildx - build_flag_templates: - - "--pull" - - "--label=org.opencontainers.image.created={{.Date}}" - - "--label=org.opencontainers.image.name={{.ProjectName}}" - - "--label=org.opencontainers.image.revision={{.FullCommit}}" - - "--label=org.opencontainers.image.version={{.Version}}" - - "--label=org.opencontainers.image.source={{.GitURL}}" - - "--platform=linux/arm64" -docker_manifests: - - name_template: vektra/mockery:{{ .Tag }} - image_templates: - - vektra/mockery:{{ .Tag }}-amd64 - - vektra/mockery:{{ .Tag }}-arm64 - - name_template: vektra/mockery:v{{ .Major }} - image_templates: - - vektra/mockery:{{ .Tag }}-amd64 - - vektra/mockery:{{ .Tag }}-arm64 - - name_template: vektra/mockery:v{{ .Major }}.{{ .Minor }} - image_templates: - - vektra/mockery:{{ .Tag }}-amd64 - - vektra/mockery:{{ .Tag }}-arm64 - - name_template: vektra/mockery:latest - image_templates: - - vektra/mockery:{{ .Tag }}-amd64 - - vektra/mockery:{{ .Tag }}-arm64 -brews: - - homepage: https://github.com/vektra/mockery - description: "A mock code autogenerator for Go" - tap: - owner: vektra - name: homebrew-tap - token: "{{ .Env.HOMEBREW_TAP_TOKEN }}" - folder: Formula - test: | - system "#{bin}mockery --version" diff --git a/vendor/github.com/vektra/mockery/v2/.mockery.yaml b/vendor/github.com/vektra/mockery/v2/.mockery.yaml deleted file mode 100644 index ffeed52b2..000000000 --- a/vendor/github.com/vektra/mockery/v2/.mockery.yaml +++ /dev/null @@ -1,72 +0,0 @@ -quiet: False -disable-version-string: True -with-expecter: True -mockname: "{{.InterfaceName}}" -filename: "{{.MockName}}.go" -outpkg: mocks -tags: "custom2" -packages: - github.com/vektra/mockery/v2/pkg/fixtures/buildtag/comment: - config: - mock-build-tags: "custom3 && (!windows || !darwin || !freebsd)" - disable-version-string: true - interfaces: - IfaceWithCustomBuildTagInComment: - github.com/vektra/mockery/v2/pkg: - interfaces: - TypesPackage: - github.com/vektra/mockery/v2/pkg/fixtures: - config: - all: True - interfaces: - RequesterArgSameAsNamedImport: - RequesterVariadic: - config: - with-expecter: False - configs: - - mockname: RequesterVariadicOneArgument - unroll-variadic: False - - mockname: RequesterVariadic - unroll-variadic: True - Expecter: - config: - with-expecter: True - configs: - - mockname: ExpecterAndRolledVariadic - unroll-variadic: False - - mockname: Expecter - unroll-variadic: True - RequesterReturnElided: - VariadicNoReturnInterface: - config: - with-expecter: True - unroll-variadic: False - # Replace generic params with a new constraint and a new fixed value - ReplaceGeneric: - config: - replace-type: - - github.com/vektra/mockery/v2/pkg/fixtures.ReplaceGeneric[-TImport]=github.com/vektra/mockery/v2/pkg/fixtures/redefined_type_b.B - - github.com/vektra/mockery/v2/pkg/fixtures.ReplaceGeneric[TConstraint]=github.com/vektra/mockery/v2/pkg/fixtures/constraints.String - # Replace a generic param with the parent type - ReplaceGenericSelf: - config: - replace-type: - - github.com/vektra/mockery/v2/pkg/fixtures.ReplaceGenericSelf[-T]=github.com/vektra/mockery/v2/pkg/fixtures.*ReplaceGenericSelf - github.com/vektra/mockery/v2/pkg/fixtures/recursive_generation: - config: - recursive: True - all: True - dir: "{{.InterfaceDir}}" - filename: "{{.InterfaceName}}_mock.go" - mockname: "Mock{{.InterfaceName}}" - outpkg: "{{.PackageName}}" - inpackage: True - github.com/vektra/mockery/v2/pkg/fixtures/method_args/same_name_arg_and_type: - config: - all: True - dir: "{{.InterfaceDir}}" - mockname: "{{.InterfaceName}}Mock" - outpkg: "{{.PackageName}}" - filename: "mock_{{.InterfaceName}}_test.go" - inpackage: True - keeptree: False diff --git a/vendor/github.com/vektra/mockery/v2/CODE_OF_CONDUCT.md b/vendor/github.com/vektra/mockery/v2/CODE_OF_CONDUCT.md deleted file mode 100644 index c6ce7ac0d..000000000 --- a/vendor/github.com/vektra/mockery/v2/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,128 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, religion, or sexual identity -and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the - overall community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or - advances of any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email - address, without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official e-mail address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -landonclipp@gmail.com. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series -of actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or -permanent ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within -the community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.0, available at -https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. - -Community Impact Guidelines were inspired by [Mozilla's code of conduct -enforcement ladder](https://github.com/mozilla/diversity). - -[homepage]: https://www.contributor-covenant.org - -For answers to common questions about this code of conduct, see the FAQ at -https://www.contributor-covenant.org/faq. Translations are available at -https://www.contributor-covenant.org/translations. diff --git a/vendor/github.com/vektra/mockery/v2/CONTRIBUTING.md b/vendor/github.com/vektra/mockery/v2/CONTRIBUTING.md deleted file mode 100644 index 91a478037..000000000 --- a/vendor/github.com/vektra/mockery/v2/CONTRIBUTING.md +++ /dev/null @@ -1,22 +0,0 @@ -# Contributing - -Thank you for investing your time in contributing to our project! - -Read our [Code of Conduct](https://github.com/vektra/mockery/blob/master/CODE_OF_CONDUCT.md) to keep our community approachable and respectable. - -## Local development setup - -All of the local development tools are go-based and are versioned in our go.mod file. Simply call `go download -x` to initialize and download all of our tooling. - -This project uses Taskfile, a better alternative to Makefile. Run `task -l` for list of valid targets. - -## Working with documentation - -We use [mkdocs](https://www.mkdocs.org/) with the [mkdocs-material theme](https://squidfunk.github.io/mkdocs-material/). - -To preview the documentation locally, run `task mkdocs.serve`. The task will install the required mkdocs plugins and theme -and run the mkdocs server with real-time updating/refreshing. - -## Submitting PRs - -Before submitting PRs, it's strongly recommended you create an issue to discuss the problem, and possible solutions. PRs added without any discussion run the risk of not being accepted, which is a waste of your time. Issues marked with `approved feature` are features that the maintainers are willing to accept into the code, and are approved for development. PRs that implement an `approved feature` have a high likelihood of being accepted. diff --git a/vendor/github.com/vektra/mockery/v2/Dockerfile b/vendor/github.com/vektra/mockery/v2/Dockerfile deleted file mode 100644 index ee64734bc..000000000 --- a/vendor/github.com/vektra/mockery/v2/Dockerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM golang:1.23-alpine as builder - -RUN apk --update add --no-cache gcc musl-dev - -COPY mockery /usr/local/bin - -# Explicitly set a writable cache path when running --user=$(id -u):$(id -g) -# see: https://github.com/golang/go/issues/26280#issuecomment-445294378 -ENV GOCACHE /tmp/.cache - -ENTRYPOINT ["/usr/local/bin/mockery"] diff --git a/vendor/github.com/vektra/mockery/v2/LICENSE b/vendor/github.com/vektra/mockery/v2/LICENSE deleted file mode 100644 index 873b122fe..000000000 --- a/vendor/github.com/vektra/mockery/v2/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright (c) 2014, Opinionated Architecture -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the {organization} nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - diff --git a/vendor/github.com/vektra/mockery/v2/README.md b/vendor/github.com/vektra/mockery/v2/README.md deleted file mode 100644 index bf62b714b..000000000 --- a/vendor/github.com/vektra/mockery/v2/README.md +++ /dev/null @@ -1,32 +0,0 @@ - -mockery -======= -[![Release](https://github.com/vektra/mockery/actions/workflows/release.yml/badge.svg)](https://github.com/vektra/mockery/actions/workflows/release.yml) [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat-square)](https://pkg.go.dev/github.com/vektra/mockery/v2?tab=overview) ![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/vektra/mockery) ![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/vektra/mockery) [![Go Report Card](https://goreportcard.com/badge/github.com/vektra/mockery)](https://goreportcard.com/report/github.com/vektra/mockery) [![codecov](https://codecov.io/gh/vektra/mockery/branch/master/graph/badge.svg)](https://codecov.io/gh/vektra/mockery) - -mockery provides the ability to easily generate mocks for Golang interfaces using the [stretchr/testify/mock](https://pkg.go.dev/github.com/stretchr/testify/mock?tab=doc) package. It removes the boilerplate coding required to use mocks. - -Documentation --------------- - -Documentation is found at out [GitHub Pages site](https://vektra.github.io/mockery/). - -Development ------------- - -taskfile.dev is used for build tasks. Initialize all go build tools: - -``` -go mod download -x -``` - -You can run any of the steps listed in `Taskfile.yml`: - -``` -$ task test -task: [test] go test -v -coverprofile=coverage.txt ./... -``` - -Stargazers ----------- - -[![Stargazers over time](https://starchart.cc/vektra/mockery.svg)](https://starchart.cc/vektra/mockery) diff --git a/vendor/github.com/vektra/mockery/v2/Taskfile.yml b/vendor/github.com/vektra/mockery/v2/Taskfile.yml deleted file mode 100644 index 8c6ff4c0c..000000000 --- a/vendor/github.com/vektra/mockery/v2/Taskfile.yml +++ /dev/null @@ -1,83 +0,0 @@ -version: "3" - -tasks: - coverage: - deps: [test] - desc: run unit tests and create HTML coverage file - cmds: - - go tool cover -html=coverage.txt - - fmt: - desc: auto-format all go files - sources: - - "**/*.go" - cmds: - - go fmt ./... - - mocks: - desc: generate new mocks from scratch - deps: [mocks.remove, mocks.generate] - - mocks.remove: - desc: remove all mock files - cmds: - - find . -name '*_mock.go' | xargs -r rm - - rm -rf mocks/ - - mocks.generate: - desc: generate mockery mocks - cmds: - - go run . - - docker: - desc: build the mockery docker image - cmds: - - docker build -t vektra/mockery . - - mkdocs.install: - desc: install mkdocs and plugins - sources: - - "docs/requirements.txt" - cmds: - - pip install -r docs/requirements.txt - - mkdocs.serve: - desc: serve mkdocs locally - deps: [mkdocs.install] - cmds: - - mkdocs serve - - lint: - desc: run all the defined linters - sources: - - "**/*.go" - cmds: - - go run github.com/golangci/golangci-lint/cmd/golangci-lint run - - test: - cmds: - - go run gotest.tools/gotestsum --format testname -- -v -coverprofile=coverage.txt ./... - desc: run unit tests - sources: - - "**/*.go" - generates: - - coverage.txt - - test.e2e: - desc: run end-to-end tests - sources: - - "**/*.go" - - "./.mockery.yaml" - cmds: - - ./e2e/run_all.sh - - test.ci: - deps: [fmt, lint] - cmds: - - task: mocks.remove - - task: mocks.generate - - task: test - - task: test.e2e - - default: - deps: [test.ci] diff --git a/vendor/github.com/vektra/mockery/v2/cmd/mockery.go b/vendor/github.com/vektra/mockery/v2/cmd/mockery.go deleted file mode 100644 index 360dea68d..000000000 --- a/vendor/github.com/vektra/mockery/v2/cmd/mockery.go +++ /dev/null @@ -1,415 +0,0 @@ -package cmd - -import ( - "context" - "errors" - "fmt" - "os" - "path/filepath" - "regexp" - "runtime/pprof" - "strings" - - "github.com/chigopher/pathlib" - "github.com/mitchellh/go-homedir" - "github.com/rs/zerolog" - "github.com/rs/zerolog/log" - "github.com/spf13/cobra" - "github.com/spf13/viper" - "github.com/vektra/mockery/v2/pkg" - "github.com/vektra/mockery/v2/pkg/config" - "github.com/vektra/mockery/v2/pkg/logging" - "github.com/vektra/mockery/v2/pkg/stackerr" - "golang.org/x/tools/go/packages" -) - -var ( - cfgFile = "" - viperCfg *viper.Viper -) - -func init() { - cobra.OnInitialize(func() { initConfig(nil, viperCfg, nil) }) -} - -func NewRootCmd() *cobra.Command { - viperCfg = viper.NewWithOptions(viper.KeyDelimiter("::")) - cmd := &cobra.Command{ - Use: "mockery", - Short: "Generate mock objects for your Golang interfaces", - Run: func(cmd *cobra.Command, args []string) { - r, err := GetRootAppFromViper(viperCfg) - if err != nil { - printStackTrace(err) - os.Exit(1) - } - if err := r.Run(); err != nil { - printStackTrace(err) - os.Exit(1) - } - }, - } - - pFlags := cmd.PersistentFlags() - pFlags.StringVar(&cfgFile, "config", "", "config file to use") - pFlags.String("name", "", "name or matching regular expression of interface to generate mock for") - pFlags.Bool("print", false, "print the generated mock to stdout") - pFlags.String("output", "", "directory to write mocks to") - pFlags.String("outpkg", "mocks", "name of generated package") - pFlags.String("packageprefix", "", "prefix for the generated package name, it is ignored if outpkg is also specified.") - pFlags.String("dir", "", "directory to search for interfaces") - pFlags.BoolP("recursive", "r", false, "recurse search into sub-directories") - pFlags.StringArray("exclude", nil, "prefixes of subdirectories and files to exclude from search") - pFlags.Bool("all", false, "generates mocks for all found interfaces in all sub-directories") - pFlags.Bool("inpackage", false, "generate a mock that goes inside the original package") - pFlags.Bool("inpackage-suffix", false, "use filename '_mock' suffix instead of 'mock_' prefix for InPackage mocks") - pFlags.Bool("testonly", false, "generate a mock in a _test.go file") - pFlags.String("case", "", "name the mocked file using casing convention [camel, snake, underscore]") - pFlags.String("note", "", "comment to insert into prologue of each generated file") - pFlags.String("cpuprofile", "", "write cpu profile to file") - pFlags.Bool("version", false, "prints the installed version of mockery") - pFlags.Bool("quiet", false, `suppresses logger output (equivalent to --log-level="")`) - pFlags.Bool("keeptree", false, "keep the tree structure of the original interface files into a different repository. Must be used with XX") - pFlags.String("tags", "", "space-separated list of additional build tags to load packages") - pFlags.String("mock-build-tags", "", "set the build tags of the generated mocks. Read more about the format: https://pkg.go.dev/cmd/go#hdr-Build_constraints") - pFlags.String("filename", "", "name of generated file (only works with -name and no regex)") - pFlags.String("structname", "", "name of generated struct (only works with -name and no regex)") - pFlags.String("log-level", "info", "Level of logging") - pFlags.String("srcpkg", "", "source pkg to search for interfaces") - pFlags.BoolP("dry-run", "d", false, "Do a dry run, don't modify any files") - pFlags.Bool("disable-version-string", false, "Do not insert the version string into the generated mock file.") - pFlags.String("boilerplate-file", "", "File to read a boilerplate text from. Text should be a go block comment, i.e. /* ... */") - pFlags.Bool("unroll-variadic", true, "For functions with variadic arguments, do not unroll the arguments into the underlying testify call. Instead, pass variadic slice as-is.") - pFlags.Bool("exported", false, "Generates public mocks for private interfaces.") - pFlags.Bool("with-expecter", false, "Generate expecter utility around mock's On, Run and Return methods with explicit types. This option is NOT compatible with -unroll-variadic=false") - pFlags.StringArray("replace-type", nil, "Replace types") - pFlags.Bool("disable-func-mocks", false, "Disable generation of function mocks.") - - if err := viperCfg.BindPFlags(pFlags); err != nil { - panic(fmt.Sprintf("failed to bind PFlags: %v", err)) - } - - cmd.AddCommand(NewShowConfigCmd()) - return cmd -} - -func printStackTrace(e error) { - fmt.Printf("%v\n", e) - - if stack, ok := stackerr.GetStack(e); ok { - fmt.Printf("%+s\n", stack) - } -} - -// Execute executes the cobra CLI workflow -func Execute() { - if err := NewRootCmd().Execute(); err != nil { - os.Exit(1) - } -} - -func initConfig( - baseSearchPath *pathlib.Path, - viperObj *viper.Viper, - configPath *pathlib.Path, -) *viper.Viper { - - if baseSearchPath == nil { - currentWorkingDir, err := os.Getwd() - if err != nil { - panic(err) - } - baseSearchPath = pathlib.NewPath(currentWorkingDir) - } - if viperObj == nil { - viperObj = viper.NewWithOptions(viper.KeyDelimiter("::")) - } - - viperObj.SetEnvPrefix("MOCKERY") - viperObj.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) - viperObj.AutomaticEnv() - - if !viperObj.GetBool("disable-config-search") { - if configPath == nil && cfgFile != "" { - // Use config file from the flag. - viperObj.SetConfigFile(cfgFile) - } else if configPath != nil { - viperObj.SetConfigFile(configPath.String()) - } else if viperObj.IsSet("config") { - viperObj.SetConfigFile(viperObj.GetString("config")) - } else { - // Find home directory. - home, err := homedir.Dir() - if err != nil { - log.Fatal().Err(err).Msgf("Failed to find homedir") - } - - currentDir := baseSearchPath - - for { - viperObj.AddConfigPath(currentDir.String()) - if len(currentDir.Parts()) <= 1 { - break - } - currentDir = currentDir.Parent() - } - - viperObj.AddConfigPath(home) - viperObj.SetConfigName(".mockery") - } - if err := viperObj.ReadInConfig(); err != nil { - log, _ := logging.GetLogger("debug") - log.Info().Msg("couldn't read any config file") - } - } - - viperObj.Set("config", viperObj.ConfigFileUsed()) - return viperObj -} - -const regexMetadataChars = "\\.+*?()|[]{}^$" - -type RootApp struct { - config.Config -} - -func GetRootAppFromViper(v *viper.Viper) (*RootApp, error) { - r := &RootApp{} - config, err := config.NewConfigFromViper(v) - if err != nil { - return nil, stackerr.NewStackErrf(err, "failed to get config") - } - r.Config = *config - return r, nil -} - -func (r *RootApp) Run() error { - var recursive bool - var filter *regexp.Regexp - var err error - var limitOne bool - - if r.Quiet { - // if "quiet" flag is set, disable logging - r.Config.LogLevel = "" - } - - log, err := logging.GetLogger(r.Config.LogLevel) - if err != nil { - fmt.Fprintf(os.Stderr, "Failed to initialize logger: %v\n", err) - return err - } - log = log.With().Bool(logging.LogKeyDryRun, r.Config.DryRun).Logger() - log.Info().Msgf("Starting mockery") - log.Info().Msgf("Using config: %s", r.Config.Config) - ctx := log.WithContext(context.Background()) - - if err := r.Config.Initialize(ctx); err != nil { - return err - } - - if r.Config.Version { - fmt.Println(logging.GetSemverInfo()) - return nil - } - - var osp pkg.OutputStreamProvider - if r.Config.Print { - osp = &pkg.StdoutStreamProvider{} - } - buildTags := strings.Split(r.Config.BuildTags, " ") - - var boilerplate string - if r.Config.BoilerplateFile != "" { - data, err := os.ReadFile(r.Config.BoilerplateFile) - if err != nil { - log.Fatal().Msgf("Failed to read boilerplate file %s: %v", r.Config.BoilerplateFile, err) - } - boilerplate = string(data) - } - - configuredPackages, err := r.Config.GetPackages(ctx) - if err != nil && !errors.Is(err, os.ErrNotExist) { - return fmt.Errorf("failed to determine configured packages: %w", err) - } - if len(configuredPackages) != 0 { - r.Config.LogUnsupportedPackagesConfig(ctx) - - configuredPackages, err := r.Config.GetPackages(ctx) - if err != nil { - return fmt.Errorf("failed to get package from config: %w", err) - } - parser := pkg.NewParser(buildTags, pkg.ParserDisableFuncMocks(r.Config.DisableFuncMocks)) - - if err := parser.ParsePackages(ctx, configuredPackages); err != nil { - log.Error().Err(err).Msg("unable to parse packages") - return err - } - log.Info().Msg("done loading, visiting interface nodes") - for _, iface := range parser.Interfaces() { - ifaceLog := log. - With(). - Str(logging.LogKeyInterface, iface.Name). - Str(logging.LogKeyQualifiedName, iface.QualifiedName). - Logger() - - ifaceCtx := ifaceLog.WithContext(ctx) - - shouldGenerate, err := r.Config.ShouldGenerateInterface(ifaceCtx, iface.QualifiedName, iface.Name) - if err != nil { - return err - } - if !shouldGenerate { - ifaceLog.Debug().Msg("config doesn't specify to generate this interface, skipping.") - continue - } - ifaceLog.Debug().Msg("config specifies to generate this interface") - - outputter := pkg.NewOutputter(&r.Config, boilerplate, r.Config.DryRun) - if err := outputter.Generate(ifaceCtx, iface); err != nil { - return err - } - } - - return nil - } - - if r.Config.Name != "" && r.Config.All { - log.Fatal().Msgf("Specify --name or --all, but not both") - } else if (r.Config.FileName != "" || r.Config.StructName != "") && r.Config.All { - log.Fatal().Msgf("Cannot specify --filename or --structname with --all") - } else if r.Config.Dir != "" && r.Config.Dir != "." && r.Config.SrcPkg != "" { - log.Fatal().Msgf("Specify --dir or --srcpkg, but not both") - } else if r.Config.Name != "" { - recursive = r.Config.Recursive - if strings.ContainsAny(r.Config.Name, regexMetadataChars) { - if filter, err = regexp.Compile(r.Config.Name); err != nil { - log.Fatal().Err(err).Msgf("Invalid regular expression provided to -name") - } else if r.Config.FileName != "" || r.Config.StructName != "" { - log.Fatal().Msgf("Cannot specify --filename or --structname with regex in --name") - } - } else { - filter = regexp.MustCompile(fmt.Sprintf("^%s$", r.Config.Name)) - limitOne = true - } - } else if r.Config.All { - recursive = true - filter = regexp.MustCompile(".*") - } else { - log.Fatal().Msgf("Use --name to specify the name of the interface or --all for all interfaces found") - } - - warnDeprecated( - ctx, - "use of the packages config will be the only way to generate mocks in v3. Please migrate your config to use the packages feature.", - map[string]any{ - "url": logging.DocsURL("/features/#packages-configuration"), - "migration": logging.DocsURL("/migrating_to_packages/"), - }) - - if r.Config.Profile != "" { - f, err := os.Create(r.Config.Profile) - if err != nil { - return stackerr.NewStackErrf(err, "Failed to create profile file") - } - defer f.Close() - if err := pprof.StartCPUProfile(f); err != nil { - return fmt.Errorf("failed to start CPU profile: %w", err) - } - defer pprof.StopCPUProfile() - } - - baseDir := r.Config.Dir - - if osp == nil { - osp = &pkg.FileOutputStreamProvider{ - Config: r.Config, - BaseDir: r.Config.Output, - InPackage: r.Config.InPackage, - InPackageSuffix: r.Config.InPackageSuffix, - TestOnly: r.Config.TestOnly, - Case: r.Config.Case, - KeepTree: r.Config.KeepTree, - KeepTreeOriginalDirectory: r.Config.Dir, - FileName: r.Config.FileName, - } - } - - if r.Config.SrcPkg != "" { - pkgs, err := packages.Load(&packages.Config{ - Mode: packages.NeedFiles, - }, r.Config.SrcPkg) - if err != nil || len(pkgs) == 0 { - log.Fatal().Err(err).Msgf("Failed to load package %s", r.Config.SrcPkg) - } - - // NOTE: we only pass one package name (config.SrcPkg) to packages.Load - // it should return one package at most - pkg := pkgs[0] - - if pkg.Errors != nil { - log.Fatal().Err(pkg.Errors[0]).Msgf("Failed to load package %s", r.Config.SrcPkg) - } - - if len(pkg.GoFiles) == 0 { - log.Fatal().Msgf("No go files in package %s", r.Config.SrcPkg) - } - baseDir = filepath.Dir(pkg.GoFiles[0]) - } - - walker := pkg.Walker{ - Config: r.Config, - BaseDir: baseDir, - Recursive: recursive, - Filter: filter, - LimitOne: limitOne, - BuildTags: buildTags, - } - - visitor := pkg.NewGeneratorVisitor(pkg.GeneratorVisitorConfig{ - Boilerplate: boilerplate, - DisableVersionString: r.Config.DisableVersionString, - Exported: r.Config.Exported, - InPackage: r.Config.InPackage, - KeepTree: r.Config.KeepTree, - Note: r.Config.Note, - MockBuildTags: r.Config.MockBuildTags, - PackageName: r.Config.Outpkg, - PackageNamePrefix: r.Config.Packageprefix, - StructName: r.Config.StructName, - UnrollVariadic: r.Config.UnrollVariadic, - WithExpecter: r.Config.WithExpecter, - ReplaceType: r.Config.ReplaceType, - }, osp, r.Config.DryRun) - - generated := walker.Walk(ctx, visitor) - - if r.Config.Name != "" && !generated { - log.Error().Msgf("Unable to find '%s' in any go files under this path", r.Config.Name) - return fmt.Errorf("unable to find interface") - } - - return nil -} - -func warn(ctx context.Context, prefix string, message string, fields map[string]any) { - log := zerolog.Ctx(ctx) - event := log.Warn() - if fields != nil { - event = event.Fields(fields) - } - event.Msgf("%s: %s", prefix, message) -} - -func info(ctx context.Context, prefix string, message string, fields map[string]any) { - log := zerolog.Ctx(ctx) - event := log.Info() - if fields != nil { - event = event.Fields(fields) - } - event.Msgf("%s: %s", prefix, message) -} - -func warnDeprecated(ctx context.Context, message string, fields map[string]any) { - warn(ctx, "DEPRECATION", message, fields) -} diff --git a/vendor/github.com/vektra/mockery/v2/cmd/showconfig.go b/vendor/github.com/vektra/mockery/v2/cmd/showconfig.go deleted file mode 100644 index d87844b20..000000000 --- a/vendor/github.com/vektra/mockery/v2/cmd/showconfig.go +++ /dev/null @@ -1,61 +0,0 @@ -package cmd - -import ( - "context" - "fmt" - "io" - "os" - - "github.com/spf13/cobra" - "github.com/spf13/viper" - "github.com/vektra/mockery/v2/pkg/config" - "github.com/vektra/mockery/v2/pkg/logging" - "github.com/vektra/mockery/v2/pkg/stackerr" - "gopkg.in/yaml.v2" -) - -func NewShowConfigCmd() *cobra.Command { - return &cobra.Command{ - Use: "showconfig", - Short: "Show the yaml config", - Long: `Print out a yaml representation of the yaml config file. This does not show config from exterior sources like CLI, environment etc.`, - RunE: func(cmd *cobra.Command, args []string) error { return showConfig(cmd, args, viperCfg, os.Stdout) }, - } -} - -func showConfig( - cmd *cobra.Command, - args []string, - v *viper.Viper, - outputter io.Writer, -) error { - if v == nil { - v = viperCfg - } - ctx := context.Background() - config, err := config.NewConfigFromViper(v) - if err != nil { - return stackerr.NewStackErrf(err, "failed to unmarshal config") - } - log, err := logging.GetLogger(config.LogLevel) - if err != nil { - return fmt.Errorf("getting logger: %w", err) - } - ctx = log.WithContext(ctx) - if err := config.Initialize(ctx); err != nil { - return err - } - cfgMap, err := config.CfgAsMap(ctx) - if err != nil { - panic(err) - } - out, err := yaml.Marshal(cfgMap) - if err != nil { - return stackerr.NewStackErrf(err, "failed to marshal yaml") - } - - log.Info().Msgf("Using config: %s", config.Config) - - fmt.Fprintf(outputter, "%s", string(out)) - return nil -} diff --git a/vendor/github.com/vektra/mockery/v2/codecov.yml b/vendor/github.com/vektra/mockery/v2/codecov.yml deleted file mode 100644 index 77f5dee69..000000000 --- a/vendor/github.com/vektra/mockery/v2/codecov.yml +++ /dev/null @@ -1,11 +0,0 @@ -coverage: - precision: 5 - round: down - range: "00...100" - status: - patch: - default: - target: 40% - threshold: 35% - base: auto - diff --git a/vendor/github.com/vektra/mockery/v2/go.work b/vendor/github.com/vektra/mockery/v2/go.work deleted file mode 100644 index baf732d14..000000000 --- a/vendor/github.com/vektra/mockery/v2/go.work +++ /dev/null @@ -1,9 +0,0 @@ -go 1.22 - -toolchain go1.22.0 - -use ( - . - ./pkg/fixtures/example_project/pkg_with_submodules - ./tools -) diff --git a/vendor/github.com/vektra/mockery/v2/go.work.sum b/vendor/github.com/vektra/mockery/v2/go.work.sum deleted file mode 100644 index 858e33015..000000000 --- a/vendor/github.com/vektra/mockery/v2/go.work.sum +++ /dev/null @@ -1,789 +0,0 @@ -cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= -cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= -cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= -cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= -cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= -cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= -cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= -cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= -cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= -cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= -cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= -cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= -cloud.google.com/go/accessapproval v1.5.0 h1:/nTivgnV/n1CaAeo+ekGexTYUsKEU9jUVkoY5359+3Q= -cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw= -cloud.google.com/go/accesscontextmanager v1.4.0 h1:CFhNhU7pcD11cuDkQdrE6PQJgv0EXNKNv06jIzbLlCU= -cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE= -cloud.google.com/go/aiplatform v1.27.0 h1:DBi3Jk9XjCJ4pkkLM4NqKgj3ozUL1wq4l+d3/jTGXAI= -cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg= -cloud.google.com/go/analytics v0.12.0 h1:NKw6PpQi6V1O+KsjuTd+bhip9d0REYu4NevC45vtGp8= -cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4= -cloud.google.com/go/apigateway v1.4.0 h1:IIoXKR7FKrEAQhMTz5hK2wiDz2WNFHS7eVr/L1lE/rM= -cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc= -cloud.google.com/go/apigeeconnect v1.4.0 h1:AONoTYJviyv1vS4IkvWzq69gEVdvHx35wKXc+e6wjZQ= -cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04= -cloud.google.com/go/appengine v1.5.0 h1:lmG+O5oaR9xNwaRBwE2XoMhwQHsHql5IoiGr1ptdDwU= -cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak= -cloud.google.com/go/area120 v0.6.0 h1:TCMhwWEWhCn8d44/Zs7UCICTWje9j3HuV6nVGMjdpYw= -cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0= -cloud.google.com/go/artifactregistry v1.9.0 h1:3d0LRAU1K6vfqCahhl9fx2oGHcq+s5gftdix4v8Ibrc= -cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc= -cloud.google.com/go/asset v1.10.0 h1:aCrlaLGJWTODJX4G56ZYzJefITKEWNfbjjtHSzWpxW0= -cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY= -cloud.google.com/go/assuredworkloads v1.9.0 h1:hhIdCOowsT1GG5eMCIA0OwK6USRuYTou/1ZeNxCSRtA= -cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= -cloud.google.com/go/automl v1.8.0 h1:BMioyXSbg7d7xLibn47cs0elW6RT780IUWr42W8rp2Q= -cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM= -cloud.google.com/go/baremetalsolution v0.4.0 h1:g9KO6SkakcYPcc/XjAzeuUrEOXlYPnMpuiaywYaGrmQ= -cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI= -cloud.google.com/go/batch v0.4.0 h1:1jvEBY55OH4Sd2FxEXQfxGExFWov1A/IaRe+Z5Z71Fw= -cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE= -cloud.google.com/go/beyondcorp v0.3.0 h1:w+4kThysgl0JiKshi2MKDCg2NZgOyqOI0wq2eBZyrzA= -cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8= -cloud.google.com/go/bigquery v1.44.0 h1:Wi4dITi+cf9VYp4VH2T9O41w0kCW0uQTELq2Z6tukN0= -cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc= -cloud.google.com/go/billing v1.7.0 h1:Xkii76HWELHwBtkQVZvqmSo9GTr0O+tIbRNnMcGdlg4= -cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y= -cloud.google.com/go/binaryauthorization v1.4.0 h1:pL70vXWn9TitQYXBWTK2abHl2JHLwkFRjYw6VflRqEA= -cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk= -cloud.google.com/go/certificatemanager v1.4.0 h1:tzbR4UHBbgsewMWUD93JHi8EBi/gHBoSAcY1/sThFGk= -cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590= -cloud.google.com/go/channel v1.9.0 h1:pNuUlZx0Jb0Ts9P312bmNMuH5IiFWIR4RUtLb70Ke5s= -cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk= -cloud.google.com/go/cloudbuild v1.4.0 h1:TAAmCmAlOJ4uNBu6zwAjwhyl/7fLHHxIEazVhr3QBbQ= -cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA= -cloud.google.com/go/clouddms v1.4.0 h1:UhzHIlgFfMr6luVYVNydw/pl9/U5kgtjCMJHnSvoVws= -cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk= -cloud.google.com/go/cloudtasks v1.8.0 h1:faUiUgXjW8yVZ7XMnKHKm1WE4OldPBUWWfIRN/3z1dc= -cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI= -cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= -cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= -cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= -cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= -cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= -cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE= -cloud.google.com/go/compute v1.14.0 h1:hfm2+FfxVmnRlh6LpB7cg1ZNU+5edAHmW679JePztk0= -cloud.google.com/go/compute v1.14.0/go.mod h1:YfLtxrj9sU4Yxv+sXzZkyPjEyPBZfXHUvjxega5vAdo= -cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/contactcenterinsights v1.4.0 h1:tTQLI/ZvguUf9Hv+36BkG2+/PeC8Ol1q4pBW+tgCx0A= -cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= -cloud.google.com/go/container v1.7.0 h1:nbEK/59GyDRKKlo1SqpohY1TK8LmJ2XNcvS9Gyom2A0= -cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo= -cloud.google.com/go/containeranalysis v0.6.0 h1:2824iym832ljKdVpCBnpqm5K94YT/uHTVhNF+dRTXPI= -cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= -cloud.google.com/go/datacatalog v1.8.0 h1:6kZ4RIOW/uT7QWC5SfPfq/G8sYzr/v+UOmOAxy4Z1TE= -cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM= -cloud.google.com/go/dataflow v0.7.0 h1:CW3541Fm7KPTyZjJdnX6NtaGXYFn5XbFC5UcjgALKvU= -cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ= -cloud.google.com/go/dataform v0.5.0 h1:vLwowLF2ZB5J5gqiZCzv076lDI/Rd7zYQQFu5XO1PSg= -cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0= -cloud.google.com/go/datafusion v1.5.0 h1:j5m2hjWovTZDTQak4MJeXAR9yN7O+zMfULnjGw/OOLg= -cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w= -cloud.google.com/go/datalabeling v0.6.0 h1:dp8jOF21n/7jwgo/uuA0RN8hvLcKO4q6s/yvwevs2ZM= -cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ= -cloud.google.com/go/dataplex v1.4.0 h1:cNxeA2DiWliQGi21kPRqnVeQ5xFhNoEjPRt1400Pm8Y= -cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A= -cloud.google.com/go/dataproc v1.8.0 h1:gVOqNmElfa6n/ccG/QDlfurMWwrK3ezvy2b2eDoCmS0= -cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI= -cloud.google.com/go/dataqna v0.6.0 h1:gx9jr41ytcA3dXkbbd409euEaWtofCVXYBvJz3iYm18= -cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA= -cloud.google.com/go/datastore v1.10.0 h1:4siQRf4zTiAVt/oeH4GureGkApgb2vtPQAtOmhpqQwE= -cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM= -cloud.google.com/go/datastream v1.5.0 h1:PgIgbhedBtYBU6POGXFMn2uSl9vpqubc3ewTNdcU8Mk= -cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4= -cloud.google.com/go/deploy v1.5.0 h1:kI6dxt8Ml0is/x7YZjLveTvR7YPzXAUD/8wQZ2nH5zA= -cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s= -cloud.google.com/go/dialogflow v1.19.0 h1:HYHVOkoxQ9bSfNIelSZYNAtUi4CeSrCnROyOsbOqPq8= -cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0= -cloud.google.com/go/dlp v1.7.0 h1:9I4BYeJSVKoSKgjr70fLdRDumqcUeVmHV4fd5f9LR6Y= -cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q= -cloud.google.com/go/documentai v1.10.0 h1:jfq09Fdjtnpnmt/MLyf6A3DM3ynb8B2na0K+vSXvpFM= -cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4= -cloud.google.com/go/domains v0.7.0 h1:pu3JIgC1rswIqi5romW0JgNO6CTUydLYX8zyjiAvO1c= -cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg= -cloud.google.com/go/edgecontainer v0.2.0 h1:hd6J2n5dBBRuAqnNUEsKWrp6XNPKsaxwwIyzOPZTokk= -cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w= -cloud.google.com/go/errorreporting v0.3.0 h1:kj1XEWMu8P0qlLhm3FwcaFsUvXChV/OraZwA70trRR0= -cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= -cloud.google.com/go/essentialcontacts v1.4.0 h1:b6csrQXCHKQmfo9h3dG/pHyoEh+fQG1Yg78a53LAviY= -cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8= -cloud.google.com/go/eventarc v1.8.0 h1:AgCqrmMMIcel5WWKkzz5EkCUKC3Rl5LNMMYsS+LvsI0= -cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw= -cloud.google.com/go/filestore v1.4.0 h1:yjKOpzvqtDmL5AXbKttLc8j0hL20kuC1qPdy5HPcxp0= -cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI= -cloud.google.com/go/firestore v1.9.0 h1:IBlRyxgGySXu5VuW0RgGFlTtLukSnNkpDiEOMkQkmpA= -cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE= -cloud.google.com/go/functions v1.9.0 h1:35tgv1fQOtvKqH/uxJMzX3w6usneJ0zXpsFr9KAVhNE= -cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08= -cloud.google.com/go/gaming v1.8.0 h1:97OAEQtDazAJD7yh/kvQdSCQuTKdR0O+qWAJBZJ4xiA= -cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM= -cloud.google.com/go/gkebackup v0.3.0 h1:4K+jiv4ocqt1niN8q5Imd8imRoXBHTrdnJVt/uFFxF4= -cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo= -cloud.google.com/go/gkeconnect v0.6.0 h1:zAcvDa04tTnGdu6TEZewaLN2tdMtUOJJ7fEceULjguA= -cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A= -cloud.google.com/go/gkehub v0.10.0 h1:JTcTaYQRGsVm+qkah7WzHb6e9sf1C0laYdRPn9aN+vg= -cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0= -cloud.google.com/go/gkemulticloud v0.4.0 h1:8F1NhJj8ucNj7lK51UZMtAjSWTgP1zO18XF6vkfiPPU= -cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI= -cloud.google.com/go/grafeas v0.2.0 h1:CYjC+xzdPvbV65gi6Dr4YowKcmLo045pm18L0DhdELM= -cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= -cloud.google.com/go/gsuiteaddons v1.4.0 h1:TGT2oGmO5q3VH6SjcrlgPUWI0njhYv4kywLm6jag0to= -cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o= -cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= -cloud.google.com/go/iam v0.8.0 h1:E2osAkZzxI/+8pZcxVLcDtAQx/u+hZXVryUaYQ5O0Kk= -cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE= -cloud.google.com/go/iap v1.5.0 h1:BGEXovwejOCt1zDk8hXq0bOhhRu9haXKWXXXp2B4wBM= -cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= -cloud.google.com/go/ids v1.2.0 h1:LncHK4HHucb5Du310X8XH9/ICtMwZ2PCfK0ScjWiJoY= -cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY= -cloud.google.com/go/iot v1.4.0 h1:Y9+oZT9jD4GUZzORXTU45XsnQrhxmDT+TFbPil6pRVQ= -cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g= -cloud.google.com/go/kms v1.6.0 h1:OWRZzrPmOZUzurjI2FBGtgY2mB1WaJkqhw6oIwSj0Yg= -cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0= -cloud.google.com/go/language v1.8.0 h1:3Wa+IUMamL4JH3Zd3cDZUHpwyqplTACt6UZKRD2eCL4= -cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8= -cloud.google.com/go/lifesciences v0.6.0 h1:tIqhivE2LMVYkX0BLgG7xL64oNpDaFFI7teunglt1tI= -cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08= -cloud.google.com/go/logging v1.6.1 h1:ZBsZK+JG+oCDT+vaxwqF2egKNRjz8soXiS6Xv79benI= -cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw= -cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs= -cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= -cloud.google.com/go/managedidentities v1.4.0 h1:3Kdajn6X25yWQFhFCErmKSYTSvkEd3chJROny//F1A0= -cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= -cloud.google.com/go/maps v0.1.0 h1:kLReRbclTgJefw2fcCbdLPLhPj0U6UUWN10ldG8sdOU= -cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI= -cloud.google.com/go/mediatranslation v0.6.0 h1:qAJzpxmEX+SeND10Y/4868L5wfZpo4Y3BIEnIieP4dk= -cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w= -cloud.google.com/go/memcache v1.7.0 h1:yLxUzJkZVSH2kPaHut7k+7sbIBFpvSh1LW9qjM2JDjA= -cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY= -cloud.google.com/go/metastore v1.8.0 h1:3KcShzqWdqxrDEXIBWpYJpOOrgpDj+HlBi07Grot49Y= -cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI= -cloud.google.com/go/monitoring v1.8.0 h1:c9riaGSPQ4dUKWB+M1Fl0N+iLxstMbCktdEwYSPGDvA= -cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= -cloud.google.com/go/networkconnectivity v1.7.0 h1:BVdIKaI68bihnXGdCVL89Jsg9kq2kg+II30fjVqo62E= -cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8= -cloud.google.com/go/networkmanagement v1.5.0 h1:mDHA3CDW00imTvC5RW6aMGsD1bH+FtKwZm/52BxaiMg= -cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4= -cloud.google.com/go/networksecurity v0.6.0 h1:qDEX/3sipg9dS5JYsAY+YvgTjPR63cozzAWop8oZS94= -cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU= -cloud.google.com/go/notebooks v1.5.0 h1:AC8RPjNvel3ExgXjO1YOAz+teg9+j+89TNxa7pIZfww= -cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0= -cloud.google.com/go/optimization v1.2.0 h1:7PxOq9VTT7TMib/6dMoWpMvWS2E4dJEvtYzjvBreaec= -cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs= -cloud.google.com/go/orchestration v1.4.0 h1:39d6tqvNjd/wsSub1Bn4cEmrYcet5Ur6xpaN+SxOxtY= -cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk= -cloud.google.com/go/orgpolicy v1.5.0 h1:erF5PHqDZb6FeFrUHiYj2JK2BMhsk8CyAg4V4amJ3rE= -cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc= -cloud.google.com/go/osconfig v1.10.0 h1:NO0RouqCOM7M2S85Eal6urMSSipWwHU8evzwS+siqUI= -cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw= -cloud.google.com/go/oslogin v1.7.0 h1:pKGDPfeZHDybtw48WsnVLjoIPMi9Kw62kUE5TXCLCN4= -cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo= -cloud.google.com/go/phishingprotection v0.6.0 h1:OrwHLSRSZyaiOt3tnY33dsKSedxbMzsXvqB21okItNQ= -cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA= -cloud.google.com/go/policytroubleshooter v1.4.0 h1:NQklJuOUoz1BPP+Epjw81COx7IISWslkZubz/1i0UN8= -cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE= -cloud.google.com/go/privatecatalog v0.6.0 h1:Vz86uiHCtNGm1DeC32HeG2VXmOq5JRYA3VRPf8ZEcSg= -cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI= -cloud.google.com/go/pubsub v1.27.1 h1:q+J/Nfr6Qx4RQeu3rJcnN48SNC0qzlYzSeqkPq93VHs= -cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0= -cloud.google.com/go/pubsublite v1.5.0 h1:iqrD8vp3giTb7hI1q4TQQGj77cj8zzgmMPsTZtLnprM= -cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg= -cloud.google.com/go/recaptchaenterprise v1.3.1 h1:u6EznTGzIdsyOsvm+Xkw0aSuKFXQlyjGE9a4exk6iNQ= -cloud.google.com/go/recaptchaenterprise v1.3.1/go.mod h1:OdD+q+y4XGeAlxRaMn1Y7/GveP6zmq76byL6tjPE7d4= -cloud.google.com/go/recaptchaenterprise/v2 v2.5.0 h1:UqzFfb/WvhwXGDF1eQtdHLrmni+iByZXY4h3w9Kdyv8= -cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U= -cloud.google.com/go/recommendationengine v0.6.0 h1:6w+WxPf2LmUEqX0YyvfCoYb8aBYOcbIV25Vg6R0FLGw= -cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4= -cloud.google.com/go/recommender v1.8.0 h1:9kMZQGeYfcOD/RtZfcNKGKtoex3DdoB4zRgYU/WaIwE= -cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70= -cloud.google.com/go/redis v1.10.0 h1:/zTwwBKIAD2DEWTrXZp8WD9yD/gntReF/HkPssVYd0U= -cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM= -cloud.google.com/go/resourcemanager v1.4.0 h1:NDao6CHMwEZIaNsdWy+tuvHaavNeGP06o1tgrR0kLvU= -cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0= -cloud.google.com/go/resourcesettings v1.4.0 h1:eTzOwB13WrfF0kuzG2ZXCfB3TLunSHBur4s+HFU6uSM= -cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg= -cloud.google.com/go/retail v1.11.0 h1:N9fa//ecFUOEPsW/6mJHfcapPV0wBSwIUwpVZB7MQ3o= -cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y= -cloud.google.com/go/run v0.3.0 h1:AWPuzU7Xtaj3Jf+QarDWIs6AJ5hM1VFQ+F6Q+VZ6OT4= -cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo= -cloud.google.com/go/scheduler v1.7.0 h1:K/mxOewgHGeKuATUJNGylT75Mhtjmx1TOkKukATqMT8= -cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44= -cloud.google.com/go/secretmanager v1.9.0 h1:xE6uXljAC1kCR8iadt9+/blg1fvSbmenlsDN4fT9gqw= -cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4= -cloud.google.com/go/security v1.10.0 h1:KSKzzJMyUoMRQzcz7azIgqAUqxo7rmQ5rYvimMhikqg= -cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA= -cloud.google.com/go/securitycenter v1.16.0 h1:QTVtk/Reqnx2bVIZtJKm1+mpfmwRwymmNvlaFez7fQY= -cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk= -cloud.google.com/go/servicecontrol v1.5.0 h1:ImIzbOu6y4jL6ob65I++QzvqgFaoAKgHOG+RU9/c4y8= -cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s= -cloud.google.com/go/servicedirectory v1.7.0 h1:f7M8IMcVzO3T425AqlZbP3yLzeipsBHtRza8vVFYMhQ= -cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U= -cloud.google.com/go/servicemanagement v1.5.0 h1:TpkCO5M7dhKSy1bKUD9o/sSEW/U1Gtx7opA1fsiMx0c= -cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo= -cloud.google.com/go/serviceusage v1.4.0 h1:b0EwJxPJLpavSljMQh0RcdHsUrr5DQ+Nelt/3BAs5ro= -cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU= -cloud.google.com/go/shell v1.4.0 h1:b1LFhFBgKsG252inyhtmsUUZwchqSz3WTvAIf3JFo4g= -cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw= -cloud.google.com/go/spanner v1.41.0 h1:NvdTpRwf7DTegbfFdPjAWyD7bOVu0VeMqcvR9aCQCAc= -cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= -cloud.google.com/go/speech v1.9.0 h1:yK0ocnFH4Wsf0cMdUyndJQ/hPv02oTJOxzi6AgpBy4s= -cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco= -cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= -cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= -cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/storagetransfer v1.6.0 h1:fUe3OydbbvHcAYp07xY+2UpH4AermGbmnm7qdEj3tGE= -cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I= -cloud.google.com/go/talent v1.4.0 h1:MrekAGxLqAeAol4Sc0allOVqUGO8j+Iim8NMvpiD7tM= -cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA= -cloud.google.com/go/texttospeech v1.5.0 h1:ccPiHgTewxgyAeCWgQWvZvrLmbfQSFABTMAfrSPLPyY= -cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4= -cloud.google.com/go/tpu v1.4.0 h1:ztIdKoma1Xob2qm6QwNh4Xi9/e7N3IfvtwG5AcNsj1g= -cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg= -cloud.google.com/go/trace v1.4.0 h1:qO9eLn2esajC9sxpqp1YKX37nXC3L4BfGnPS0Cx9dYo= -cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y= -cloud.google.com/go/translate v1.4.0 h1:AOYOH3MspzJ/bH1YXzB+xTE8fMpn3mwhLjugwGXvMPI= -cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg= -cloud.google.com/go/video v1.9.0 h1:ttlvO4J5c1VGq6FkHqWPD/aH6PfdxujHt+muTJlW1Zk= -cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw= -cloud.google.com/go/videointelligence v1.9.0 h1:RPFgVVXbI2b5vnrciZjtsUgpNKVtHO/WIyXUhEfuMhA= -cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU= -cloud.google.com/go/vision v1.2.0 h1:/CsSTkbmO9HC8iQpxbK8ATms3OQaX3YQUeTMGCxlaK4= -cloud.google.com/go/vision v1.2.0/go.mod h1:SmNwgObm5DpFBme2xpyOyasvBc1aPdjvMk2bBk0tKD0= -cloud.google.com/go/vision/v2 v2.5.0 h1:TQHxRqvLMi19azwm3qYuDbEzZWmiKJNTpGbkNsfRCik= -cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E= -cloud.google.com/go/vmmigration v1.3.0 h1:A2Tl2ZmwMRpvEmhV2ibISY85fmQR+Y5w9a0PlRz5P3s= -cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g= -cloud.google.com/go/vmwareengine v0.1.0 h1:JMPZaOT/gIUxVlTqSl/QQ32Y2k+r0stNeM1NSqhVP9o= -cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208= -cloud.google.com/go/vpcaccess v1.5.0 h1:woHXXtnW8b9gLFdWO9HLPalAddBQ9V4LT+1vjKwR3W8= -cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8= -cloud.google.com/go/webrisk v1.7.0 h1:ypSnpGlJnZSXbN9a13PDmAYvVekBLnGKxQ3Q9SMwnYY= -cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A= -cloud.google.com/go/websecurityscanner v1.4.0 h1:y7yIFg/h/mO+5Y5aCOtVAnpGUOgqCH5rXQ2Oc8Oq2+g= -cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ= -cloud.google.com/go/workflows v1.9.0 h1:7Chpin9p50NTU8Tb7qk+I11U/IwVXmDhEoSsdccvInE= -cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= -github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= -github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E= -github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= -github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= -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 h1:F4z6KzEeeQIMeLFa97iZU6vupzoecKdU5TX24SNppXI= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= -github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= -github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= -github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= -github.com/chigopher/pathlib v1.0.0 h1:SbsCrFX4vDf4M2d8mT/RTzuVlKOjTKoPHK0HidsQFak= -github.com/chigopher/pathlib v1.0.0/go.mod h1:3+YPPV21mU9vyw8Mjp+F33CyCfE6iOzinpiqBcccv7I= -github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4 h1:hzAQntlaYRkVSFEfj9OTWlVV1H155FMD8BTKktLv0QI= -github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1 h1:zH8ljVhhq7yC0MIeUL/IviMtY8hx2mK8cN9wEYb8ggw= -github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/go-systemd/v22 v22.3.3-0.20220203105225-a9a7ef127534 h1:rtAn27wIbmOGUs7RIbVgPEjb31ehTVniDwPGXyMxm5U= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/cristalhq/acmd v0.11.1 h1:DJ4fh2Pv0nPKmqT646IU/0Vh5FNdGblxvF+3/W3NAUI= -github.com/cristalhq/acmd v0.11.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= -github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 h1:xvqufLtNVwAhN8NMyWklVgxnWohi+wtMGQMhtxexlm0= -github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= -github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= -github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= -github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= -github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-sql-driver/mysql v1.7.0 h1:ueSltNNllEqE3qcWBTD0iQd3IpL/6U+mJxLkazJ7YPc= -github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= -github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= -github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= -github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc= -github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= -github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA= -github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= -github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= -github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ= -github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= -github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= -github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= -github.com/google/renameio/v2 v2.0.0 h1:UifI23ZTGY8Tt29JbYFiuyIU3eX+RNFtUwefq9qAhxg= -github.com/google/renameio/v2 v2.0.0/go.mod h1:BtmJXm5YlszgC+TD4HOEEUFgkJP3nLxehU6hfe7jRt4= -github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= -github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= -github.com/googleapis/enterprise-certificate-proxy v0.2.1 h1:RY7tHKZcRlk788d5WSo/e83gOyyy742E8GSs771ySpg= -github.com/googleapis/enterprise-certificate-proxy v0.2.1/go.mod h1:AwSRAtLfXpU5Nm3pW+v7rGDHp09LsPtGY9MduiEsR9k= -github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= -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/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= -github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= -github.com/googleapis/gax-go/v2 v2.7.0 h1:IcsPKeInNvYi7eqSaDjiZqDDKu5rsmunY0Y1YupQSSQ= -github.com/googleapis/gax-go/v2 v2.7.0/go.mod h1:TEop28CZZQ2y+c0VxMUmu1lV+fQx57QpBWsYpwqHJx8= -github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= -github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4= -github.com/gookit/color v1.5.2 h1:uLnfXcaFjlrDnQDT+NCBcfhrXqYTx/rcCa6xn01Y8yI= -github.com/gookit/color v1.5.2/go.mod h1:w8h4bGiHeeBpvQVePTutdbERIUf3oJE5lZ8HM0UgXyg= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= -github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.18.0 h1:R7PPNzTCeN6VuQNDwwhZWJvzCtGSrNpJqfb22h3yH9g= -github.com/hashicorp/consul/api v1.18.0/go.mod h1:owRRGJ9M5xReDC5nfT8FTJrNAPbT4NM6p/k+d03q2v4= -github.com/hashicorp/consul/sdk v0.13.0 h1:lce3nFlpv8humJL8rNrrGHYSKc3q+Kxfeg3Ii1m6ZWU= -github.com/hashicorp/consul/sdk v0.13.0/go.mod h1:0hs/l5fOVhJy/VdcoaNqUSi2AUs95eF5WKtv+EYIQqE= -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 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= -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 v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= -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.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 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= -github.com/hashicorp/go-msgpack v0.5.3/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-retryablehttp v0.5.3 h1:QlWt0KvWT0lq8MFppF9tsJGF+ynG7ztc2KIPhzRGk7s= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= -github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= -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/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/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/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.4 h1:sY0CMhFmjIPDMlTB+HfymFHCaYLhgifZ0QhjaYKD/UQ= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= -github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= -github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= -github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI= -github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= -github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= -github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= -github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= -github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= -github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= -github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo= -github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= -github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 h1:zpIH83+oKzcpryru8ceC6BxnoG8TBrhgAvRg8obzup0= -github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0 h1:tEElEatulEHDeedTxwckzyYMA5c86fbmNIUL1hBIiTg= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= -github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5 h1:0KqC6/sLy7fDpBdybhVkkv4Yz+PmB7c9Dz9z3dLW804= -github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU= -github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI= -github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= -github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= -github.com/pkg/sftp v1.13.1 h1:I2qBYMChEhIjOgazfJmV3/mZM256btk6wkCDRmW7JYs= -github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= -github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71 h1:CNooiryw5aisadVfzneSZPswRWvnVW8hF1bS/vo8ReI= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= -github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5 h1:CvqZS4QYHBRvx7AeFdimd16HCbLlYsvQMcKDACpJW/c= -github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls= -github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96 h1:J8J/cgLDRuqXJnwIrRDBvtl+LLsdg7De74znW/BRRq4= -github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96/go.mod h1:90HvCY7+oHHUKkbeMCiHt1WuFR2/hPJ9QrljDG+v6ls= -github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e h1:eTWZyPUnHcuGRDiryS/l2I7FfKjbU3IBx3IjqHPxuKU= -github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e/go.mod h1:80FQABjoFzZ2M5uEa6FUaJYEmqU2UOKojlFVak1UAwI= -github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= -github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/ryanuber/columnize v2.1.0+incompatible h1:j1Wcmh8OrK4Q7GXY+V7SVSY8nUWQxHW5TkBe7YUl+2s= -github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sagikazarmark/crypt v0.9.0 h1:fipzMFW34hFUEc4D7fsLQFtE7yElkpgyS2zruedRdZk= -github.com/sagikazarmark/crypt v0.9.0/go.mod h1:RnH7sEhxfdnPm1z+XMgSLjWTEIjyK4z2dw6+4vHTMuo= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shirou/gopsutil/v3 v3.23.2 h1:PAWSuiAszn7IhPMBtXsbSCafej7PqUOvY6YywlQUExU= -github.com/shirou/gopsutil/v3 v3.23.2/go.mod h1:gv0aQw33GLo3pG8SiWKiQrbDzbRY1K80RyZJ7V4Th1M= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ= -github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/tklauser/go-sysconf v0.3.11 h1:89WgdJhk5SNwJfu+GKyYveZ4IaJ7xAkecBo+KdJV0CM= -github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= -github.com/tklauser/numcpus v0.6.0 h1:kebhY2Qt+3U6RNK7UqpYNA+tJ23IBEGKkB7JQBfDYms= -github.com/tklauser/numcpus v0.6.0/go.mod h1:FEZLMke0lhOUG6w2JadTzp0a+Nl8PF/GFkQ5UVIcaL4= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/quicktemplate v1.7.0 h1:LUPTJmlVcb46OOUY3IeD9DojFpAVbsG+5WFTcjMJzCM= -github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= -github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= -github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.etcd.io/etcd/api/v3 v3.5.6 h1:Cy2qx3npLcYqTKqGJzMypnMv2tiRyifZJ17BlWIWA7A= -go.etcd.io/etcd/api/v3 v3.5.6/go.mod h1:KFtNaxGDw4Yx/BA4iPPwevUTAuqcsPxzyX8PHydchN8= -go.etcd.io/etcd/client/pkg/v3 v3.5.6 h1:TXQWYceBKqLp4sa87rcPs11SXxUA/mHwH975v+BDvLU= -go.etcd.io/etcd/client/pkg/v3 v3.5.6/go.mod h1:ggrwbk069qxpKPq8/FKkQ3Xq9y39kbFR4LnKszpRXeQ= -go.etcd.io/etcd/client/v2 v2.305.6 h1:fIDR0p4KMjw01MJMfUIDWdQbjo06PD6CeYM5z4EHLi0= -go.etcd.io/etcd/client/v2 v2.305.6/go.mod h1:BHha8XJGe8vCIBfWBpbBLVZ4QjOIlfoouvOwydu63E0= -go.etcd.io/etcd/client/v3 v3.5.6 h1:coLs69PWCXE9G4FKquzNaSHrRyMCAXwF+IX1tAPVO8E= -go.etcd.io/etcd/client/v3 v3.5.6/go.mod h1:f6GRinRMCsFVv9Ht42EyY7nfsVGwrNO0WEoS2pRKzQk= -go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= -go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= -go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= -go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -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= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE= -golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= -golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= -golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/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-20220607020251-c690dde0001d/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-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= -golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= -golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -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-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= -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-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783 h1:nt+Q6cXKz4MosCSpnbMtqiQ8Oz0pxTef2B4Vca2lvfk= -golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-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-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= -golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= -golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= -golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= -golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= -golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= -google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= -google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= -google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= -google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= -google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= -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.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= -google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= -google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= -google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= -google.golang.org/api v0.75.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.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= -google.golang.org/api v0.100.0/go.mod h1:ZE3Z2+ZOr87Rx7dqFsdRQkRBk36kDtp/h+QpHbB7a70= -google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= -google.golang.org/api v0.103.0/go.mod h1:hGtW6nK1AC+d9si/UBhw8Xli+QMOf6xyNAyJw4qU9w0= -google.golang.org/api v0.107.0 h1:I2SlFjD8ZWabaIFOfeEDg3pf0BHJDh6iYQ1ic3Yu/UU= -google.golang.org/api v0.107.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/O9MY= -google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= -google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= -google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= -google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= -google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= -google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= -google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= -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-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= -google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= -google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= -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-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= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= -google.golang.org/genproto v0.0.0-20221024183307-1bc688fe9f3e/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20221118155620-16455021b5e6/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221201164419-0e50fba7f41c/go.mod h1:rZS5c/ZVYMaOGBfO68GWtjOw/eLaZM1X6iVtgjZ+EWg= -google.golang.org/genproto v0.0.0-20221202195650-67e5cbc046fd/go.mod h1:cTsE614GARnxrLsqKREzmNYJACSWWpAWdNMwnD7c2BE= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= -google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= -google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= -google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.41.0/go.mod h1:U3l9uK9J0sini8mHphKoXyaqDA/8VyGnDee1zzIUK6k= -google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= -google.golang.org/grpc v1.52.0 h1:kd48UiU7EHsV4rnLyOJRuP/Il/UHE7gdDAQ+SZI7nZk= -google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= -google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= -gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= -gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -mvdan.cc/editorconfig v0.2.0 h1:XL+7ys6ls/RKrkUNFQvEwIvNHh+JKx8Mj1pUV5wQxQE= -mvdan.cc/editorconfig v0.2.0/go.mod h1:lvnnD3BNdBYkhq+B4uBuFFKatfp02eB6HixDvEz91C0= -rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= -rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= -rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= -sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/vendor/github.com/vektra/mockery/v2/main.go b/vendor/github.com/vektra/mockery/v2/main.go deleted file mode 100644 index 62d9f745f..000000000 --- a/vendor/github.com/vektra/mockery/v2/main.go +++ /dev/null @@ -1,9 +0,0 @@ -package main - -import ( - "github.com/vektra/mockery/v2/cmd" -) - -func main() { - cmd.Execute() -} diff --git a/vendor/github.com/vektra/mockery/v2/mkdocs.yml b/vendor/github.com/vektra/mockery/v2/mkdocs.yml deleted file mode 100644 index 4959ac1de..000000000 --- a/vendor/github.com/vektra/mockery/v2/mkdocs.yml +++ /dev/null @@ -1,94 +0,0 @@ -site_name: mockery -site_url: https://vektra.github.io/mockery/ -site_description: >- - Create mock implementations of your Golang interfaces using mockery and testify. - -repo_name: vektra/mockery -repo_url: https://github.com/vektra/mockery - -theme: - name: material - custom_dir: overrides - icon: - logo: fontawesome/brands/golang - palette: - # Palette toggle for light mode - - media: "(prefers-color-scheme: light)" - scheme: default - primary: light blue - toggle: - icon: material/brightness-7 - name: Switch to dark mode - # Palette toggle for dark mode - - media: "(prefers-color-scheme: dark)" - scheme: slate - primary: light blue - toggle: - icon: material/brightness-4 - name: Switch to light mode - features: - - content.code.annotate - - content.code.copy - - content.action.edit - - content.action.view - - navigation.indexes - - navigation.sections - - navigation.tracking - - toc.follow -markdown_extensions: - - admonition - - attr_list - - md_in_html - - pymdownx.emoji: - emoji_index: !!python/name:material.extensions.emoji.twemoji - emoji_generator: !!python/name:material.extensions.emoji.to_svg - - pymdownx.details - - pymdownx.highlight: - anchor_linenums: true - auto_title: true - - pymdownx.inlinehilite - - pymdownx.magiclink - - pymdownx.superfences - - pymdownx.tabbed: - alternate_style: true - - toc: - permalink: true - - -nav: - - Home: index.md - - Getting Started: - - Installation: installation.md - - Configuration: configuration.md - - Running: running.md - - Examples: examples.md - - Features: features.md - - Notes: - - FAQ: notes.md - - Changelog: changelog.md - - Migrating to Packages: migrating_to_packages.md - -extra_css: - - stylesheets/extra.css - -extra_javascript: - - https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js - - javascripts/tablesort.js - -extra: - version: - provider: mike - analytics: - provider: google - property: G-0ZGMQGZGRN - -plugins: -- glightbox -- mike: - alias_type: symlink - canonical_version: latest -- open-in-new-tab -- search -- social -- typeset: - enabled: true diff --git a/vendor/github.com/vektra/mockery/v2/pkg/config/config.go b/vendor/github.com/vektra/mockery/v2/pkg/config/config.go deleted file mode 100644 index dee932c75..000000000 --- a/vendor/github.com/vektra/mockery/v2/pkg/config/config.go +++ /dev/null @@ -1,932 +0,0 @@ -package config - -import ( - "bufio" - "context" - "errors" - "fmt" - "os" - "path/filepath" - "reflect" - "regexp" - "strings" - - "github.com/chigopher/pathlib" - "github.com/jinzhu/copier" - "github.com/mitchellh/mapstructure" - "github.com/rs/zerolog" - "github.com/spf13/viper" - "github.com/vektra/mockery/v2/pkg/logging" - "github.com/vektra/mockery/v2/pkg/stackerr" - "golang.org/x/tools/go/packages" - "gopkg.in/yaml.v3" -) - -var ( - ErrNoConfigFile = fmt.Errorf("no config file exists") - ErrNoGoFilesFoundInRoot = fmt.Errorf("no go files found in root search path") - ErrPkgNotFound = fmt.Errorf("package not found in config") -) - -type Interface struct { - Config Config `mapstructure:"config"` -} - -type Config struct { - All bool `mapstructure:"all"` - MockBuildTags string `mapstructure:"mock-build-tags"` - BuildTags string `mapstructure:"tags"` - Case string `mapstructure:"case"` - Config string `mapstructure:"config"` - Cpuprofile string `mapstructure:"cpuprofile"` - Dir string `mapstructure:"dir"` - DisableConfigSearch bool `mapstructure:"disable-config-search"` - DisableFuncMocks bool `mapstructure:"disable-func-mocks"` - DisableVersionString bool `mapstructure:"disable-version-string"` - DryRun bool `mapstructure:"dry-run"` - ExcludeRegex string `mapstructure:"exclude-regex"` - Exported bool `mapstructure:"exported"` - FileName string `mapstructure:"filename"` - IncludeAutoGenerated bool `mapstructure:"include-auto-generated"` - IncludeRegex string `mapstructure:"include-regex"` - InPackage bool `mapstructure:"inpackage"` - InPackageSuffix bool `mapstructure:"inpackage-suffix"` - KeepTree bool `mapstructure:"keeptree"` - LogLevel string `mapstructure:"log-level"` - MockName string `mapstructure:"mockname"` - Name string `mapstructure:"name"` - Note string `mapstructure:"note"` - Outpkg string `mapstructure:"outpkg"` - Output string `mapstructure:"output"` - Packages map[string]interface{} `mapstructure:"packages"` - Packageprefix string `mapstructure:"packageprefix"` - Print bool `mapstructure:"print"` - Profile string `mapstructure:"profile"` - Quiet bool `mapstructure:"quiet"` - Recursive bool `mapstructure:"recursive"` - Exclude []string `mapstructure:"exclude"` - SrcPkg string `mapstructure:"srcpkg"` - BoilerplateFile string `mapstructure:"boilerplate-file"` - // StructName overrides the name given to the mock struct and should only be nonempty - // when generating for an exact match (non regex expression in -name). - StructName string `mapstructure:"structname"` - TestOnly bool `mapstructure:"testonly"` - UnrollVariadic bool `mapstructure:"unroll-variadic"` - Version bool `mapstructure:"version"` - WithExpecter bool `mapstructure:"with-expecter"` - ReplaceType []string `mapstructure:"replace-type"` - - // Viper throws away case-sensitivity when it marshals into this struct. This - // destroys necessary information we need, specifically around interface names. - // So, we re-read the config into this map outside of viper. - // https://github.com/spf13/viper/issues/1014 - _cfgAsMap map[string]any - pkgConfigCache map[string]*Config -} - -func NewConfigFromViper(v *viper.Viper) (*Config, error) { - c := &Config{ - Config: v.ConfigFileUsed(), - } - - packageList, err := c.GetPackages(context.Background()) - if err != nil { - return c, fmt.Errorf("failed to get packages: %w", err) - } - - // Set defaults - if len(packageList) == 0 { - v.SetDefault("case", "camel") - v.SetDefault("dir", ".") - v.SetDefault("output", "./mocks") - } else { - v.SetDefault("dir", "mocks/{{.PackagePath}}") - v.SetDefault("filename", "mock_{{.InterfaceName}}.go") - v.SetDefault("include-auto-generated", true) - v.SetDefault("mockname", "Mock{{.InterfaceName}}") - v.SetDefault("outpkg", "{{.PackageName}}") - v.SetDefault("with-expecter", true) - v.SetDefault("dry-run", false) - v.SetDefault("log-level", "info") - } - - if err := v.UnmarshalExact(c); err != nil { - return nil, fmt.Errorf("failed to unmarshal config: %w", err) - } - - return c, nil -} - -func (c *Config) Initialize(ctx context.Context) error { - log := zerolog.Ctx(ctx) - if err := c.discoverRecursivePackages(ctx); err != nil { - return fmt.Errorf("failed to discover recursive packages: %w", err) - } - - log.Trace().Msg("merging in config") - if err := c.mergeInConfig(ctx); err != nil { - return err - } - return nil -} - -// CfgAsMap reads in the config file and returns a map representation, instead of a -// struct representation. This is mainly needed because viper throws away case-sensitivity -// in the `packages` section, which won't work when defining interface names 😞 -func (c *Config) CfgAsMap(ctx context.Context) (map[string]any, error) { - log := zerolog.Ctx(ctx) - - configPath := pathlib.NewPath(c.Config) - - if c._cfgAsMap == nil { - log.Debug().Msgf("config map is nil, reading: %v", configPath) - newCfg := make(map[string]any) - - fileBytes, err := os.ReadFile(configPath.String()) - if err != nil { - if os.IsNotExist(err) { - log.Debug().Msg("config file doesn't exist, returning empty config map") - return map[string]any{}, nil - } - return nil, stackerr.NewStackErrf(err, "failed to read file: %v", configPath) - } - - if err := yaml.Unmarshal(fileBytes, newCfg); err != nil { - return nil, stackerr.NewStackErrf(err, "failed to unmarshal yaml") - } - c._cfgAsMap = newCfg - } - return c._cfgAsMap, nil -} - -func (c *Config) getDecoder(result any) (*mapstructure.Decoder, error) { - return mapstructure.NewDecoder(&mapstructure.DecoderConfig{ - ErrorUnused: true, - Result: result, - IgnoreUntaggedFields: true, - }) -} - -// GetPackages returns a list of the packages that are defined in -// the `packages` config section. -func (c *Config) GetPackages(ctx context.Context) ([]string, error) { - // NOTE: The reason why we can't rely on viper to get the - // values in the `packages` section is because viper throws - // away maps with no values. Our config allows empty maps, - // so this breaks our logic. We need to manually parse this section - // instead. See: https://github.com/spf13/viper/issues/819 - log := zerolog.Ctx(ctx) - cfgMap, err := c.CfgAsMap(ctx) - if err != nil { - return nil, err - } - packagesSection, ok := cfgMap["packages"] - if !ok { - log.Debug().Msg("packages section is not defined") - return []string{}, nil - } - packageSection, ok := packagesSection.(map[string]any) - if !ok { - msg := "packages section is of the wrong type" - log.Error().Msg(msg) - return []string{}, fmt.Errorf(msg) - } - packageList := []string{} - for key := range packageSection { - packageList = append(packageList, key) - } - return packageList, nil -} - -// getPackageConfigMap returns the map for the particular package, which includes -// (but is not limited to) both the `configs` section and the `interfaces` section. -// Note this does NOT return the `configs` section for the package. It returns the -// entire mapping for the package. -func (c *Config) getPackageConfigMap(ctx context.Context, packageName string) (map[string]any, error) { - log := zerolog.Ctx(ctx) - log.Trace().Msg("getting package config map") - - cfgMap, err := c.CfgAsMap(ctx) - if err != nil { - return nil, err - } - packageSection := cfgMap["packages"].(map[string]any) - configUnmerged, ok := packageSection[packageName] - if !ok { - return nil, ErrPkgNotFound - } - configAsMap, isMap := configUnmerged.(map[string]any) - if isMap { - log.Trace().Msg("package's value is a map, returning") - return configAsMap, nil - } - log.Trace().Msg("package's value is not a map") - - // Package is something other than map, so set its value to an - // empty map. - emptyMap := map[string]any{} - packageSection[packageName] = emptyMap - return emptyMap, nil - -} - -// GetPackageConfig returns a struct representation of the package's config -// as provided in yaml. If the package did not specify a config section, -// this method will inject the top-level config into the package's config. -// This is especially useful as it allows us to lazily evaluate a package's -// config. If the package does specify config, this method takes care to merge -// the top-level config with the values specified for this package. -func (c *Config) GetPackageConfig(ctx context.Context, packageName string) (*Config, error) { - log := zerolog.Ctx(ctx).With().Str("package-path", packageName).Logger() - - if c.pkgConfigCache == nil { - log.Debug().Msg("package cache is nil") - c.pkgConfigCache = make(map[string]*Config) - } else if pkgConf, ok := c.pkgConfigCache[packageName]; ok { - log.Debug().Msgf("package cache is not nil, returning cached result") - return pkgConf, nil - } - - pkgConfig := &Config{} - if err := copier.Copy(pkgConfig, c); err != nil { - return nil, fmt.Errorf("failed to copy config: %w", err) - } - - configMap, err := c.getPackageConfigMap(ctx, packageName) - if err != nil { - return nil, stackerr.NewStackErrf(err, "unable to get map config for package") - } - - configSection, ok := configMap["config"] - if !ok { - log.Debug().Msg("config section not provided for package") - configMap["config"] = map[string]any{} - c.pkgConfigCache[packageName] = pkgConfig - return pkgConfig, nil - } - - // We know that the package specified config that is overriding the top-level - // config. We use a mapstructure decoder to decode the values in the yaml - // into the pkgConfig struct. This has the effect of merging top-level - // config with package-level config. - decoder, err := c.getDecoder(pkgConfig) - if err != nil { - return nil, stackerr.NewStackErrf(err, "failed to get decoder") - } - if err := decoder.Decode(configSection); err != nil { - return nil, err - } - c.pkgConfigCache[packageName] = pkgConfig - return pkgConfig, nil -} - -func (c *Config) ExcludePath(path string) bool { - for _, ex := range c.Exclude { - if strings.HasPrefix(path, ex) { - return true - } - } - return false -} - -func (c *Config) ShouldGenerateInterface(ctx context.Context, packageName, interfaceName string) (bool, error) { - pkgConfig, err := c.GetPackageConfig(ctx, packageName) - if err != nil { - return false, fmt.Errorf("getting package config: %w", err) - } - - log := zerolog.Ctx(ctx) - if pkgConfig.All { - if pkgConfig.IncludeRegex != "" { - log.Warn().Msg("interface config has both `all` and `include-regex` set: `include-regex` will be ignored") - } - if pkgConfig.ExcludeRegex != "" { - log.Warn().Msg("interface config has both `all` and `exclude-regex` set: `exclude-regex` will be ignored") - } - return true, nil - } - - interfacesSection, err := c.getInterfacesSection(ctx, packageName) - if err != nil { - return false, fmt.Errorf("getting interfaces section: %w", err) - } - _, interfaceExists := interfacesSection[interfaceName] - if interfaceExists { - return true, nil - } - - includeRegex := pkgConfig.IncludeRegex - excludeRegex := pkgConfig.ExcludeRegex - if includeRegex == "" { - if excludeRegex != "" { - log.Warn().Msg("interface config has `exclude-regex` set but not `include-regex`: `exclude-regex` will be ignored") - } - return false, nil - } - includedByRegex, err := regexp.MatchString(includeRegex, interfaceName) - if err != nil { - return false, fmt.Errorf("evaluating `include-regex`: %w", err) - } - if !includedByRegex { - return false, nil - } - if excludeRegex == "" { - return true, nil - } - excludedByRegex, err := regexp.MatchString(excludeRegex, interfaceName) - if err != nil { - return false, fmt.Errorf("evaluating `exclude-regex`: %w", err) - } - return !excludedByRegex, nil -} - -func (c *Config) getInterfacesSection(ctx context.Context, packageName string) (map[string]any, error) { - pkgMap, err := c.getPackageConfigMap(ctx, packageName) - if err != nil { - return nil, err - } - interfaceSection, exists := pkgMap["interfaces"] - if !exists { - return make(map[string]any), nil - } - mapConfig, ok := interfaceSection.(map[string]any) - if !ok { - return nil, fmt.Errorf("interfaces section has type %T, expected map[string]any", interfaceSection) - } - return mapConfig, nil -} - -func (c *Config) GetInterfaceConfig(ctx context.Context, packageName string, interfaceName string) ([]*Config, error) { - log := zerolog. - Ctx(ctx). - With(). - Str(logging.LogKeyQualifiedName, packageName). - Str(logging.LogKeyInterface, interfaceName). - Logger() - ctx = log.WithContext(ctx) - configs := []*Config{} - - pkgConfig, err := c.GetPackageConfig(ctx, packageName) - if err != nil { - return nil, stackerr.NewStackErrf(err, "failed to get config for package when iterating over interface") - } - interfacesSection, err := c.getInterfacesSection(ctx, packageName) - if err != nil { - return nil, err - } - - // Copy the package-level config to our interface-level config - pkgConfigCopy := &Config{} - if err := copier.Copy(pkgConfigCopy, pkgConfig); err != nil { - return nil, stackerr.NewStackErrf(err, "failed to create a copy of package config") - } - - interfaceSection, ok := interfacesSection[interfaceName] - if !ok { - log.Debug().Msg("interface not defined in package configuration") - return []*Config{pkgConfigCopy}, nil - } - - interfaceSectionTyped, ok := interfaceSection.(map[string]any) - if !ok { - // check if it's an empty map... sometimes we just want to "enable" - // the interface but not provide any additional config beyond what - // is provided at the package level - if reflect.ValueOf(&interfaceSection).Elem().IsZero() { - return []*Config{pkgConfigCopy}, nil - } - msgString := "bad type provided for interface config" - log.Error().Msgf(msgString) - return nil, stackerr.NewStackErr(errors.New(msgString)) - } - - configSection, ok := interfaceSectionTyped["config"] - if ok { - log.Debug().Msg("config section exists for interface") - // if `config` is provided, we'll overwrite the values in our - // pkgConfigCopy struct to act as the "new" base config. - // This will allow us to set the default values for the interface - // but override them further for each mock defined in the - // `configs` section. - decoder, err := c.getDecoder(pkgConfigCopy) - if err != nil { - return nil, stackerr.NewStackErrf(err, "unable to create mapstructure decoder") - } - if err := decoder.Decode(configSection); err != nil { - return nil, stackerr.NewStackErrf(err, "unable to decode interface config") - } - } else { - log.Debug().Msg("config section for interface doesn't exist") - } - - configsSection, ok := interfaceSectionTyped["configs"] - if ok { - log.Debug().Msg("configs section exists for interface") - configsSectionTyped := configsSection.([]any) - for _, configMap := range configsSectionTyped { - // Create a copy of the package-level config - currentInterfaceConfig := reflect.New(reflect.ValueOf(pkgConfigCopy).Elem().Type()).Interface() - if err := copier.Copy(currentInterfaceConfig, pkgConfigCopy); err != nil { - return nil, stackerr.NewStackErrf(err, "failed to copy package config") - } - - // decode the new values into the struct - decoder, err := c.getDecoder(currentInterfaceConfig) - if err != nil { - return nil, stackerr.NewStackErrf(err, "unable to create mapstructure decoder") - } - if err := decoder.Decode(configMap); err != nil { - return nil, stackerr.NewStackErrf(err, "unable to decode interface config") - } - - configs = append(configs, currentInterfaceConfig.(*Config)) - } - return configs, nil - } - log.Debug().Msg("configs section doesn't exist for interface") - - if len(configs) == 0 { - configs = append(configs, pkgConfigCopy) - } - return configs, nil -} - -// addSubPkgConfig injects the given pkgPath into the `packages` config section. -// You specify a parentPkgPath to inherit the config from. -func (c *Config) addSubPkgConfig(ctx context.Context, subPkgPath string, parentPkgPath string) error { - log := zerolog.Ctx(ctx).With(). - Str("parent-package", parentPkgPath). - Str("sub-package", subPkgPath).Logger() - ctx = log.WithContext(ctx) - - log.Debug().Msg("adding sub-package to config map") - parentPkgConfig, err := c.getPackageConfigMap(ctx, parentPkgPath) - if err != nil { - log.Err(err). - Msg("failed to get package config for parent package") - return fmt.Errorf("failed to get package config: %w", err) - } - - log.Debug().Msg("getting config") - topLevelConfig, err := c.CfgAsMap(ctx) - if err != nil { - return fmt.Errorf("failed to get configuration map: %w", err) - } - - log.Debug().Msg("getting packages section") - packagesSection := topLevelConfig["packages"].(map[string]any) - - _, pkgExists := packagesSection[subPkgPath] - if !pkgExists { - log.Trace().Msg("sub-package doesn't exist in config") - - // Copy the parent package directly into the subpackage config section - packagesSection[subPkgPath] = map[string]any{} - newPkgSection := packagesSection[subPkgPath].(map[string]any) - newPkgSection["config"] = deepCopyConfigMap(parentPkgConfig["config"].(map[string]any)) - } else { - log.Trace().Msg("sub-package exists in config") - // The sub-package exists in config. Check if it has its - // own `config` section and merge with the parent package - // if so. - subPkgConfig, err := c.getPackageConfigMap(ctx, subPkgPath) - - if err != nil { - log.Err(err).Msg("could not get child package config") - return fmt.Errorf("failed to get sub-package config: %w", err) - } - log.Trace().Msgf("sub-package config: %v", subPkgConfig) - log.Trace().Msgf("parent-package config: %v", parentPkgConfig) - - // Merge the parent config with the sub-package config. - parentConfigSection := parentPkgConfig["config"].(map[string]any) - subPkgConfigSection := subPkgConfig["config"].(map[string]any) - for key, val := range parentConfigSection { - if _, keyInSubPkg := subPkgConfigSection[key]; !keyInSubPkg { - subPkgConfigSection[key] = val - } - - } - } - - return nil -} - -func isAutoGenerated(path *pathlib.Path) (bool, error) { - file, err := path.OpenFile(os.O_RDONLY) - if err != nil { - return false, stackerr.NewStackErr(err) - } - defer file.Close() - scanner := bufio.NewScanner(file) - for scanner.Scan() { - text := scanner.Text() - if strings.Contains(text, "DO NOT EDIT") { - return true, nil - } else if strings.HasPrefix(text, "package ") { - break - } - } - return false, nil -} - -func shouldExcludeModule(ctx context.Context, root *pathlib.Path, goModPath *pathlib.Path) (bool, error) { - log := zerolog.Ctx(ctx) - relative, err := goModPath.RelativeTo(root) - if err != nil { - return false, stackerr.NewStackErrf(err, "determining distance from search root") - } - - if len(relative.Parts()) != 1 { - log.Debug().Msg("skipping sub-module") - return true, nil - } - log.Debug().Int("parts_len", len(relative.Parts())).Str("parts", fmt.Sprintf("%v", relative.Parts())).Msg("not skipping module as this is the root path") - return false, nil -} - -func (c *Config) subPackages( - ctx context.Context, - pkgPath string, - pkgConfig *Config, - currentDepth int, -) ([]string, error) { - log := zerolog.Ctx(ctx) - - pkgs, err := packages.Load(&packages.Config{ - Mode: packages.NeedName | packages.NeedFiles, - }, pkgPath) - if err != nil { - return nil, fmt.Errorf("failed to load packages: %w", err) - } - pkg := pkgs[0] - - if currentDepth == 0 && len(pkg.GoFiles) == 0 { - log.Error(). - Err(ErrNoGoFilesFoundInRoot). - Str("documentation", logging.DocsURL("/notes/#error-no-go-files-found-in-root-search-path")). - Msg("package contains no go files") - return nil, ErrNoGoFilesFoundInRoot - } - representativeFile := pathlib.NewPath(pkg.GoFiles[0]) - searchRoot := representativeFile.Parent() - packageRootName := pathlib.NewPath(pkg.PkgPath) - packageRootPath := searchRoot - subPackages := []string{} - - walker, err := pathlib.NewWalk( - searchRoot, - pathlib.WalkAlgorithm(pathlib.AlgorithmPreOrderDepthFirst), - pathlib.WalkFollowSymlinks(false), - pathlib.WalkVisitDirs(false), - pathlib.WalkVisitFiles(true), - ) - if err != nil { - return nil, fmt.Errorf("failed to create filesystem walker: %w", err) - } - - visitedDirs := map[string]any{} - subdirectoriesWithGoFiles := []*pathlib.Path{} - - // We consider the searchRoot to already be visited because - // we know it's already in the configuration. - visitedDirs[searchRoot.String()] = nil - - // Walk the filesystem path, starting at the root of the package we've - // been given. Note that this will always work because Go downloads - // the package when we call `packages.Load` - walkErr := walker.Walk(func(path *pathlib.Path, info os.FileInfo, err error) error { - pathLog := log.With().Stringer("path", path).Logger() - if err != nil { - return err - } - if path.Name() == "go.mod" { - pathLog.Debug().Msg("path contains go.mod file") - // Check if our current depth is 0. We do this to skip sub-modules, but not - // the root module. - shouldExclude, err := shouldExcludeModule(ctx, searchRoot, path) - if err != nil { - return err - } - - if shouldExclude { - return pathlib.ErrWalkSkipSubtree - } - } - - _, haveVisitedDir := visitedDirs[path.Parent().String()] - if !haveVisitedDir && strings.HasSuffix(path.Name(), ".go") { - - if !c.IncludeAutoGenerated { - autoGenerated, err := isAutoGenerated(path) - if err != nil { - pathLog.Err(err).Msg("failed to determine if file is auto-generated") - return err - } - if autoGenerated { - pathLog.Debug().Msg("skipping file as auto-generated") - return nil - } - } - - pathLog.Debug().Msg("subdirectory has a .go file") - goModPath := path.Parent().Join("go.mod") - goModExists, err := goModPath.Exists() - if err != nil { - pathLog.Err(err).Msg("failed to determine if go.mod exists") - return err - } - if goModExists { - shouldExclude, err := shouldExcludeModule(ctx, searchRoot, goModPath) - if err != nil { - return err - } - if shouldExclude { - return pathlib.ErrWalkSkipSubtree - } - } - subdirectoriesWithGoFiles = append(subdirectoriesWithGoFiles, path.Parent()) - visitedDirs[path.Parent().String()] = nil - } - return nil - }) - if walkErr != nil { - return nil, fmt.Errorf("error occurred during filesystem walk: %w", walkErr) - } - - // Parse the subdirectories we found into their respective fully qualified - // package paths - for _, d := range subdirectoriesWithGoFiles { - relativeFilesystemPath, err := d.RelativeTo(packageRootPath) - if err != nil { - log.Err(err).Stringer("root", packageRootPath).Stringer("subRoot", d).Msg("failed to make subroot relative to root") - return nil, fmt.Errorf("failed to make subroot relative to root: %w", err) - } - absolutePackageName := packageRootName.Join(relativeFilesystemPath.Parts()...) - subPackages = append(subPackages, filepath.ToSlash(absolutePackageName.String())) - } - - return subPackages, nil -} - -// discoverRecursivePackages parses the provided config for packages marked as -// recursive and recurses the file tree to find all sub-packages. -func (c *Config) discoverRecursivePackages(ctx context.Context) error { - log := zerolog.Ctx(ctx) - log.Trace().Msg("discovering recursive packages") - recursivePackages := map[string]*Config{} - packageList, err := c.GetPackages(ctx) - if err != nil { - return fmt.Errorf("failed to get packages: %w", err) - } - for _, pkg := range packageList { - pkgConfig, err := c.GetPackageConfig(ctx, pkg) - pkgLog := log.With().Str("package", pkg).Logger() - pkgLog.Trace().Msg("iterating over package") - if err != nil { - return fmt.Errorf("failed to get package config: %w", err) - } - if pkgConfig.Recursive { - pkgLog.Trace().Msg("package marked as recursive") - recursivePackages[pkg] = pkgConfig - } else { - pkgLog.Trace().Msg("package not marked as recursive") - } - } - if len(recursivePackages) == 0 { - return nil - } - for pkgPath, conf := range recursivePackages { - pkgLog := log.With().Str("package-path", pkgPath).Logger() - pkgCtx := pkgLog.WithContext(ctx) - pkgLog.Debug().Msg("discovering sub-packages") - subPkgs, err := c.subPackages(pkgCtx, pkgPath, conf, 0) - if err != nil { - return fmt.Errorf("failed to get subpackages: %w", err) - } - for _, subPkg := range subPkgs { - subPkgLog := pkgLog.With().Str("sub-package", subPkg).Logger() - subPkgCtx := subPkgLog.WithContext(pkgCtx) - - if len(conf.Exclude) > 0 { - // pass in the forward-slash as this is a package and the os.PathSeparator - // cannot be used here as it fails on windows. - p := pathlib.NewPath(subPkg, pathlib.PathWithSeperator("/")) - relativePath, err := p.RelativeTo( - pathlib.NewPath( - pkgPath, pathlib.PathWithAfero(p.Fs()), - pathlib.PathWithSeperator("/"), - ), - ) - if err != nil { - return stackerr.NewStackErrf(err, "failed to get path for %s relative to %s", subPkg, pkgPath) - } - if conf.ExcludePath(relativePath.String()) { - subPkgLog.Info().Msg("subpackage is excluded") - continue - } - } - - subPkgLog.Debug().Msg("adding sub-package config") - if err := c.addSubPkgConfig(subPkgCtx, subPkg, pkgPath); err != nil { - subPkgLog.Err(err).Msg("failed to add sub-package config") - return fmt.Errorf("failed to add sub-package config: %w", err) - } - } - } - log.Trace().Msg("done discovering recursive packages") - - return nil - -} - -func contains[T comparable](slice []T, elem T) bool { - for _, element := range slice { - if elem == element { - return true - } - } - return false -} - -func deepCopyConfigMap(src map[string]any) map[string]any { - newMap := map[string]any{} - for key, val := range src { - if contains([]string{"packages", "config", "interfaces"}, key) { - continue - } - newMap[key] = val - } - return newMap -} - -// mergeInConfig takes care of merging inheritable configuration -// in the config map. For example, it merges default config, then -// package-level config, then interface-level config. -func (c *Config) mergeInConfig(ctx context.Context) error { - log := zerolog.Ctx(ctx) - - log.Trace().Msg("getting packages") - pkgs, err := c.GetPackages(ctx) - if err != nil { - return err - } - - log.Trace().Msg("getting default config") - defaultCfg, err := c.CfgAsMap(ctx) - if err != nil { - return err - } - for _, pkgPath := range pkgs { - pkgLog := log.With().Str("package-path", pkgPath).Logger() - pkgCtx := pkgLog.WithContext(ctx) - - pkgLog.Trace().Msg("merging for package") - packageConfig, err := c.getPackageConfigMap(pkgCtx, pkgPath) - if err != nil { - pkgLog.Err(err).Msg("failed to get package config") - return fmt.Errorf("failed to get package config: %w", err) - } - pkgLog.Trace().Msgf("got package config map: %v", packageConfig) - - configSectionUntyped, configExists := packageConfig["config"] - if !configExists { - // The reason why this should never happen is because getPackageConfigMap - // should be populating the config section with the top-level config if it - // wasn't defined in the yaml. - msg := "config section does not exist for package, this should never happen" - pkgLog.Error().Msg(msg) - return fmt.Errorf(msg) - } - - pkgLog.Trace().Msg("got config section for package") - // Sometimes the config section may be provided, but it's nil. - // We need to account for this fact. - if configSectionUntyped == nil { - pkgLog.Trace().Msg("config section is nil, converting to empty map") - emptyMap := map[string]any{} - - // We need to add this to the "global" config mapping so the change - // gets persisted, and also into configSectionUntyped for the logic - // further down. - packageConfig["config"] = emptyMap - configSectionUntyped = emptyMap - } else { - pkgLog.Trace().Msg("config section is not nil") - } - - configSectionTyped := configSectionUntyped.(map[string]any) - - for key, value := range defaultCfg { - if contains([]string{"packages", "config"}, key) { - continue - } - keyValLog := pkgLog.With().Str("key", key).Str("value", fmt.Sprintf("%v", value)).Logger() - - _, keyExists := configSectionTyped[key] - if !keyExists { - keyValLog.Trace().Msg("setting key to value") - configSectionTyped[key] = value - } - } - interfaces, err := c.getInterfacesForPackage(pkgCtx, pkgPath) - if err != nil { - return fmt.Errorf("failed to get interfaces for package: %w", err) - } - for _, interfaceName := range interfaces { - interfacesSection, err := c.getInterfacesSection(pkgCtx, pkgPath) - if err != nil { - return err - } - interfaceSectionUntyped, exists := interfacesSection[interfaceName] - if !exists { - continue - } - interfaceSection, ok := interfaceSectionUntyped.(map[string]any) - if !ok { - // assume interfaceSection value is nil - continue - } - - interfaceConfigSectionUntyped, exists := interfaceSection["config"] - if !exists { - interfaceSection["config"] = map[string]any{} - } - - interfaceConfigSection, ok := interfaceConfigSectionUntyped.(map[string]any) - if !ok { - // Assume this interface's value in the map is nil. Just skip it. - continue - } - for key, value := range configSectionTyped { - if key == "packages" { - continue - } - if _, keyExists := interfaceConfigSection[key]; !keyExists { - interfaceConfigSection[key] = value - } - } - } - } - - return nil - -} - -func (c *Config) getInterfacesForPackage(ctx context.Context, pkgPath string) ([]string, error) { - interfaces := []string{} - packageMap, err := c.getPackageConfigMap(ctx, pkgPath) - if err != nil { - return nil, err - } - interfacesUntyped, exists := packageMap["interfaces"] - if !exists { - return interfaces, nil - } - - interfacesMap := interfacesUntyped.(map[string]any) - for key := range interfacesMap { - interfaces = append(interfaces, key) - } - return interfaces, nil -} - -func (c *Config) TagName(name string) string { - field, ok := reflect.TypeOf(c).Elem().FieldByName(name) - if !ok { - panic(fmt.Sprintf("unknown config field: %s", name)) - } - return string(field.Tag.Get("mapstructure")) -} - -// LogUnsupportedPackagesConfig is a method that will help aid migrations to the -// packages config feature. This is intended to be a temporary measure until v3 -// when we can remove all legacy config options. -func (c *Config) LogUnsupportedPackagesConfig(ctx context.Context) { - log := zerolog.Ctx(ctx) - unsupportedOptions := make(map[string]any) - for _, name := range []string{"Name", "KeepTree", "Case", "Output", "TestOnly"} { - value := reflect.ValueOf(c).Elem().FieldByName(name) - var valueAsString string - if value.Kind().String() == "bool" { - valueAsString = fmt.Sprintf("%v", value.Bool()) - } - if value.Kind().String() == "string" { - valueAsString = value.String() - } - - if !value.IsZero() { - unsupportedOptions[c.TagName(name)] = valueAsString - } - } - if len(unsupportedOptions) == 0 { - return - } - - l := log.With(). - Dict("unsupported-fields", zerolog.Dict().Fields(unsupportedOptions)). - Str("url", logging.DocsURL("/configuration/#parameter-descriptions")). - Logger() - l.Error().Msg("use of unsupported options detected. mockery behavior is undefined.") - -} diff --git a/vendor/github.com/vektra/mockery/v2/pkg/generator.go b/vendor/github.com/vektra/mockery/v2/pkg/generator.go deleted file mode 100644 index 2941b48b7..000000000 --- a/vendor/github.com/vektra/mockery/v2/pkg/generator.go +++ /dev/null @@ -1,1180 +0,0 @@ -package pkg - -import ( - "bytes" - "context" - "errors" - "fmt" - "go/ast" - "go/types" - "io" - "os" - "path/filepath" - "regexp" - "sort" - "strings" - "text/template" - "unicode" - "unicode/utf8" - - "github.com/rs/zerolog" - "golang.org/x/tools/imports" - - "github.com/vektra/mockery/v2/pkg/logging" -) - -const mockConstructorParamTypeNamePrefix = "mockConstructorTestingT" - -var invalidIdentifierChar = regexp.MustCompile("^[[:digit:]]|[^[:digit:][:alpha:]_]") - -func DetermineOutputPackageName( - interfaceFileName string, - interfacePackageName string, - packageNamePrefix string, - packageName string, - keepTree bool, - inPackage bool, -) string { - var pkg string - - if keepTree && inPackage { - pkg = filepath.Dir(interfaceFileName) - } else if inPackage { - pkg = filepath.Dir(interfaceFileName) - } else if (packageName == "" || packageName == "mocks") && packageNamePrefix != "" { - // go with package name prefix only when package name is empty or default and package name prefix is specified - pkg = fmt.Sprintf("%s%s", packageNamePrefix, interfacePackageName) - } else { - pkg = packageName - } - return pkg -} - -type GeneratorConfig struct { - Boilerplate string - DisableVersionString bool - Exported bool - InPackage bool - KeepTree bool - Note string - MockBuildTags string - PackageName string - PackageNamePrefix string - StructName string - UnrollVariadic bool - WithExpecter bool - ReplaceType []string -} - -// Generator is responsible for generating the string containing -// imports and the mock struct that will later be written out as file. -type Generator struct { - config GeneratorConfig - - buf bytes.Buffer - - iface *Interface - pkg string - - localizationCache map[string]string - packagePathToName map[string]string - nameToPackagePath map[string]string - replaceTypeCache []*replaceTypeItem -} - -// NewGenerator builds a Generator. -func NewGenerator(ctx context.Context, c GeneratorConfig, iface *Interface, pkg string) *Generator { - if pkg == "" { - pkg = DetermineOutputPackageName( - iface.FileName, - iface.Pkg.Name(), - c.PackageNamePrefix, - c.PackageName, - c.KeepTree, - c.InPackage, - ) - } - g := &Generator{ - config: c, - iface: iface, - pkg: pkg, - localizationCache: make(map[string]string), - packagePathToName: make(map[string]string), - nameToPackagePath: make(map[string]string), - } - - g.parseReplaceTypes(ctx) - g.addPackageImportWithName(ctx, "github.com/stretchr/testify/mock", "mock", nil) - - return g -} - -func (g *Generator) GenerateAll(ctx context.Context) error { - g.GenerateBoilerplate(g.config.Boilerplate) - g.GeneratePrologueNote(g.config.Note) - g.GenerateBuildTags(g.config.MockBuildTags) - g.GeneratePrologue(ctx, g.pkg) - return g.Generate(ctx) -} - -func (g *Generator) populateImports(ctx context.Context) { - log := zerolog.Ctx(ctx) - - log.Debug().Msgf("populating imports") - - // imports from generic type constraints - if tParams := g.iface.NamedType.TypeParams(); tParams != nil && tParams.Len() > 0 { - for i := 0; i < tParams.Len(); i++ { - g.renderType(ctx, tParams.At(i).Constraint()) - } - } - - // imports from type arguments - if tArgs := g.iface.NamedType.TypeArgs(); tArgs != nil && tArgs.Len() > 0 { - for i := 0; i < tArgs.Len(); i++ { - g.renderType(ctx, tArgs.At(i)) - } - } - - for _, method := range g.iface.Methods() { - ftype := method.Signature - g.addImportsFromTuple(ctx, ftype.Params()) - g.addImportsFromTuple(ctx, ftype.Results()) - g.renderType(ctx, g.iface.NamedType) - } -} - -func (g *Generator) addImportsFromTuple(ctx context.Context, list *types.Tuple) { - for i := 0; i < list.Len(); i++ { - // We use renderType here because we need to recursively - // resolve any types to make sure that all named types that - // will appear in the interface file are known - g.renderType(ctx, list.At(i).Type()) - } -} - -// getPackageScopedType returns the appropriate string representation for the -// object TypeName. The string may either be the unqualified name (in the case -// the mock will live in the same package as the interface being mocked, e.g. -// `Foo`) or the package pathname (in the case the type lives in a package -// external to the mock, e.g. `packagename.Foo`). -func (g *Generator) getPackageScopedType(ctx context.Context, o *types.TypeName) string { - if o.Pkg() == nil || o.Pkg().Name() == "main" || - (!g.config.KeepTree && g.config.InPackage && o.Pkg() == g.iface.Pkg) { - return o.Name() - } - pkg := g.addPackageImport(ctx, o.Pkg(), o) - name := o.Name() - g.checkReplaceType(ctx, func(from *replaceType, to *replaceType) bool { - if o.Pkg().Path() == from.pkg && name == from.typ { - name = to.typ - return false - } - return true - }) - return pkg + "." + name -} - -func (g *Generator) addPackageImport(ctx context.Context, pkg *types.Package, o *types.TypeName) string { - return g.addPackageImportWithName(ctx, pkg.Path(), pkg.Name(), o) -} - -func (g *Generator) checkReplaceType(ctx context.Context, f func(from *replaceType, to *replaceType) bool) { - // check most specific first - for _, hasType := range []bool{true, false} { - for _, item := range g.replaceTypeCache { - if (item.from.typ != "") == hasType { - if !f(item.from, item.to) { - break - } - } - } - } -} - -func (g *Generator) addPackageImportWithName(ctx context.Context, path, name string, o *types.TypeName) string { - log := zerolog.Ctx(ctx) - replaced := false - g.checkReplaceType(ctx, func(from *replaceType, to *replaceType) bool { - if o != nil && path == from.pkg && (from.typ == "" || o.Name() == from.typ || o.Name() == from.param) { - log.Debug().Str("from", path).Str("to", to.pkg).Msg("changing package path") - replaced = true - path = to.pkg - if to.alias != "" { - log.Debug().Str("from", name).Str("to", to.alias).Msg("changing alias name") - name = to.alias - } - return false - } - return true - }) - if replaced { - log.Debug().Str("to-path", path).Str("to-name", name).Msg("successfully replaced type") - } - - if existingName, pathExists := g.packagePathToName[path]; pathExists { - return existingName - } - - nonConflictingName := g.getNonConflictingName(path, name) - g.packagePathToName[path] = nonConflictingName - g.nameToPackagePath[nonConflictingName] = path - return nonConflictingName -} - -func (g *Generator) parseReplaceTypes(ctx context.Context) { - for _, replace := range g.config.ReplaceType { - r := strings.SplitN(replace, "=", 2) - if len(r) != 2 { - log := zerolog.Ctx(ctx) - log.Error().Msgf("invalid replace type value: %s", replace) - continue - } - - g.replaceTypeCache = append(g.replaceTypeCache, &replaceTypeItem{ - from: parseReplaceType(r[0]), - to: parseReplaceType(r[1]), - }) - } -} - -func (g *Generator) getNonConflictingName(path, name string) string { - if !g.importNameExists(name) && (!g.config.InPackage || g.iface.Pkg.Name() != name) { - // do not allow imports with the same name as the package when inPackage - return name - } - - // The path will always contain '/' because it is enforced by Go import system - directories := strings.Split(path, "/") - - cleanedDirectories := make([]string, 0, len(directories)) - for _, directory := range directories { - cleaned := invalidIdentifierChar.ReplaceAllString(directory, "_") - cleanedDirectories = append(cleanedDirectories, cleaned) - } - numDirectories := len(cleanedDirectories) - var prospectiveName string - for i := 1; i <= numDirectories; i++ { - prospectiveName = strings.Join(cleanedDirectories[numDirectories-i:], "") - if !g.importNameExists(prospectiveName) && (!g.config.InPackage || g.iface.Pkg.Name() != prospectiveName) { - // do not allow imports with the same name as the package when inPackage - return prospectiveName - } - } - // Try adding numbers to the given name - i := 2 - for { - prospectiveName = fmt.Sprintf("%v%d", name, i) - if !g.importNameExists(prospectiveName) { - return prospectiveName - } - i++ - } -} - -func (g *Generator) importNameExists(name string) bool { - _, nameExists := g.nameToPackagePath[name] - return nameExists -} - -func (g *Generator) maybeMakeNameExported(name string, export bool) string { - if export && !ast.IsExported(name) { - return g.makeNameExported(name) - } - - return name -} - -func (g *Generator) makeNameExported(name string) string { - r, n := utf8.DecodeRuneInString(name) - - if unicode.IsUpper(r) { - return name - } - - return string(unicode.ToUpper(r)) + name[n:] -} - -func (g *Generator) mockName() string { - if g.config.StructName != "" { - return g.config.StructName - } - - if !g.config.KeepTree && g.config.InPackage { - if g.config.Exported || ast.IsExported(g.iface.Name) { - return "Mock" + g.iface.Name - } - - return "mock" + g.makeNameExported(g.iface.Name) - } - - return g.maybeMakeNameExported(g.iface.Name, g.config.Exported) -} - -// getTypeConstraintString returns type constraint string for a given interface. -// -// For instance, a method using this constraint: -// func Foo[T Stringer](s []T) (ret []string) { -// } -// -// The constraint returned will be "[T Stringer]" -// -// https://go.googlesource.com/proposal/+/refs/heads/master/design/43651-type-parameters.md#type-parameters -func (g *Generator) getTypeConstraintString(ctx context.Context) string { - tp := g.iface.NamedType.TypeParams() - if tp == nil || tp.Len() == 0 { - return "" - } - qualifiedParams := make([]string, 0, tp.Len()) -param: - for i := 0; i < tp.Len(); i++ { - param := tp.At(i) - str := param.String() - typ := g.renderType(ctx, param.Constraint()) - - for _, t := range g.replaceTypeCache { - if str == t.from.param { - // Skip removed generic constraints - if t.from.rmvParam { - continue param - } - - // Import replaced generic constraints - pkg := g.addPackageImportWithName(ctx, t.to.pkg, t.to.alias, param.Obj()) - typ = pkg + "." + t.to.typ - } - } - - qualifiedParams = append(qualifiedParams, fmt.Sprintf("%s %s", str, typ)) - } - - if len(qualifiedParams) == 0 { - return "" - } - - return fmt.Sprintf("[%s]", strings.Join(qualifiedParams, ", ")) -} - -// getInstantiatedTypeString returns the "instantiated" type names for a given -// constraint list. For instance, if your interface has the constraints -// `[S Stringer, I int, C Comparable]`, this method would return: `[S, I, C]` -func (g *Generator) getInstantiatedTypeString() string { - tp := g.iface.NamedType.TypeParams() - if tp == nil || tp.Len() == 0 { - return "" - } - params := make([]string, 0, tp.Len()) -param: - for i := 0; i < tp.Len(); i++ { - str := tp.At(i).String() - - // Skip replaced generic types - for _, t := range g.replaceTypeCache { - if str == t.from.param && t.from.rmvParam { - continue param - } - } - - params = append(params, str) - } - if len(params) == 0 { - return "" - } - return fmt.Sprintf("[%s]", strings.Join(params, ", ")) -} - -func (g *Generator) expecterName() string { - return g.mockName() + "_Expecter" -} - -func (g *Generator) sortedImportNames() (importNames []string) { - for name := range g.nameToPackagePath { - importNames = append(importNames, name) - } - sort.Strings(importNames) - return -} - -func (g *Generator) generateImports(ctx context.Context) { - log := zerolog.Ctx(ctx) - - log.Debug().Msgf("generating imports") - - pkgPath := g.nameToPackagePath[g.iface.Pkg.Name()] - // Sort by import name so that we get a deterministic order - for _, name := range g.sortedImportNames() { - logImport := log.With().Str(logging.LogKeyImport, g.nameToPackagePath[name]).Logger() - logImport.Debug().Msgf("found import") - - path := g.nameToPackagePath[name] - if !g.config.KeepTree && g.config.InPackage && path == pkgPath { - logImport.Debug().Msgf("import (%s) equals interface's package path (%s), skipping", path, pkgPath) - continue - } - g.printf("import %s \"%s\"\n", name, path) - } -} - -// GeneratePrologue generates the prologue of the mock. -func (g *Generator) GeneratePrologue(ctx context.Context, pkg string) { - g.populateImports(ctx) - if g.config.InPackage { - g.printf("package %s\n\n", g.iface.Pkg.Name()) - } else { - g.printf("package %v\n\n", pkg) - } - - g.generateImports(ctx) - g.printf("\n") -} - -// GeneratePrologueNote adds a note after the prologue to the output -// string. -func (g *Generator) GeneratePrologueNote(note string) { - prologue := "// Code generated by mockery" - if !g.config.DisableVersionString { - prologue += fmt.Sprintf(" %s", logging.GetSemverInfo()) - } - prologue += ". DO NOT EDIT.\n" - - g.printf(prologue) - if note != "" { - g.printf("\n") - for _, n := range strings.Split(note, "\\n") { - g.printf("// %s\n", n) - } - } - g.printf("\n") -} - -// GenerateBoilerplate adds a boilerplate text. It should be called -// before any other generator methods to ensure the text is on top. -func (g *Generator) GenerateBoilerplate(boilerplate string) { - if boilerplate != "" { - g.printf("%s\n", boilerplate) - } -} - -func (g *Generator) GenerateBuildTags(buildTags string) { - if buildTags != "" { - g.printf("//go:build %s\n\n", buildTags) - } -} - -// ErrNotInterface is returned when the given type is not an interface -// type. -var ErrNotInterface = errors.New("expression not an interface") - -func (g *Generator) printf(s string, vals ...interface{}) { - fmt.Fprintf(&g.buf, s, vals...) -} - -var templates = template.New("base template") - -func (g *Generator) printTemplateBytes(data interface{}, templateString string) *bytes.Buffer { - tmpl, err := templates.New(templateString).Funcs(templateFuncMap).Parse(templateString) - if err != nil { - panic(err) - } - - var buf bytes.Buffer - - err = tmpl.Execute(&buf, data) - if err != nil { - panic(err) - } - - return &buf -} - -func (g *Generator) printTemplate(data interface{}, templateString string) { - g.buf.Write(g.printTemplateBytes(data, templateString).Bytes()) -} - -type namer interface { - Name() string -} - -func (g *Generator) renderType(ctx context.Context, typ types.Type) string { - switch t := typ.(type) { - case *types.Named: - name := g.getPackageScopedType(ctx, t.Obj()) - if t.TypeArgs() == nil || t.TypeArgs().Len() == 0 { - return name - } - args := make([]string, 0, t.TypeArgs().Len()) - for i := 0; i < t.TypeArgs().Len(); i++ { - arg := t.TypeArgs().At(i) - args = append(args, g.renderType(ctx, arg)) - } - return fmt.Sprintf("%s[%s]", name, strings.Join(args, ",")) - case *types.TypeParam: - if t.Constraint() != nil { - name := t.Obj().Name() - pkg := "" - - g.checkReplaceType(ctx, func(from *replaceType, to *replaceType) bool { - // Replace with the new type if it is being removed as a constraint - if t.Obj().Pkg().Path() == from.pkg && name == from.param && from.rmvParam { - name = to.typ - if to.pkg != from.pkg { - pkg = g.addPackageImport(ctx, t.Obj().Pkg(), t.Obj()) - } - return false - } - return true - }) - - if pkg != "" { - return pkg + "." + name - } - return name - } - return g.getPackageScopedType(ctx, t.Obj()) - case *types.Basic: - if t.Kind() == types.UnsafePointer { - return "unsafe.Pointer" - } - return t.Name() - case *types.Pointer: - return "*" + g.renderType(ctx, t.Elem()) - case *types.Slice: - return "[]" + g.renderType(ctx, t.Elem()) - case *types.Array: - return fmt.Sprintf("[%d]%s", t.Len(), g.renderType(ctx, t.Elem())) - case *types.Signature: - switch t.Results().Len() { - case 0: - return fmt.Sprintf( - "func(%s)", - g.renderTypeTuple(ctx, t.Params(), t.Variadic()), - ) - case 1: - return fmt.Sprintf( - "func(%s) %s", - g.renderTypeTuple(ctx, t.Params(), t.Variadic()), - g.renderType(ctx, t.Results().At(0).Type()), - ) - default: - return fmt.Sprintf( - "func(%s)(%s)", - g.renderTypeTuple(ctx, t.Params(), t.Variadic()), - g.renderTypeTuple(ctx, t.Results(), false), - ) - } - case *types.Map: - kt := g.renderType(ctx, t.Key()) - vt := g.renderType(ctx, t.Elem()) - - return fmt.Sprintf("map[%s]%s", kt, vt) - case *types.Chan: - switch t.Dir() { - case types.SendRecv: - return "chan " + g.renderType(ctx, t.Elem()) - case types.RecvOnly: - return "<-chan " + g.renderType(ctx, t.Elem()) - default: - return "chan<- " + g.renderType(ctx, t.Elem()) - } - case *types.Struct: - var fields []string - - for i := 0; i < t.NumFields(); i++ { - f := t.Field(i) - - if f.Anonymous() { - fields = append(fields, g.renderType(ctx, f.Type())) - } else { - field := fmt.Sprintf("%s %s", f.Name(), g.renderType(ctx, f.Type())) - tag := t.Tag(i) - if tag != "" { - field += " `" + tag + "`" - } - fields = append(fields, field) - } - } - - return fmt.Sprintf("struct{%s}", strings.Join(fields, ";")) - case *types.Interface: - if t.NumMethods() != 0 { - panic("Unable to mock inline interfaces with methods") - } - - rv := []string{"interface{"} - for i := 0; i < t.NumEmbeddeds(); i++ { - rv = append(rv, g.renderType(ctx, t.EmbeddedType(i))) - } - rv = append(rv, "}") - sep := "" - if t.NumEmbeddeds() > 1 { - sep = "\n" - } - return strings.Join(rv, sep) - case *types.Union: - rv := make([]string, 0, t.Len()) - for i := 0; i < t.Len(); i++ { - term := t.Term(i) - if term.Tilde() { - rv = append(rv, "~"+g.renderType(ctx, term.Type())) - } else { - rv = append(rv, g.renderType(ctx, term.Type())) - } - } - return strings.Join(rv, "|") - case namer: - return t.Name() - default: - panic(fmt.Sprintf("un-namable type: %#v (%T)", t, t)) - } -} - -func (g *Generator) renderTypeTuple(ctx context.Context, tup *types.Tuple, variadic bool) string { - var parts []string - - for i := 0; i < tup.Len(); i++ { - v := tup.At(i) - - if variadic && i == tup.Len()-1 { - t := v.Type() - elem := t.(*types.Slice).Elem() - - parts = append(parts, "..."+g.renderType(ctx, elem)) - } else { - parts = append(parts, g.renderType(ctx, v.Type())) - } - } - - return strings.Join(parts, " , ") -} - -func isNillable(typ types.Type) bool { - switch t := typ.(type) { - case *types.Pointer, *types.Array, *types.Map, *types.Interface, *types.Signature, *types.Chan, *types.Slice: - return true - case *types.Named: - return isNillable(t.Underlying()) - } - return false -} - -type paramList struct { - Names []string - Types []string - Params []string - ParamsIntf []string - Nilable []bool - Variadic bool -} - -func (p *paramList) FormattedParamNames() string { - formattedParamNames := "" - for i, name := range p.Names { - if i > 0 { - formattedParamNames += ", " - } - - paramType := p.Types[i] - // for variable args, move the ... to the end. - if strings.Index(paramType, "...") == 0 { - name += "..." - } - formattedParamNames += name - } - - return formattedParamNames -} - -func (p *paramList) ReturnNames() []string { - names := make([]string, 0, len(p.Names)) - for i := 0; i < len(p.Names); i++ { - names = append(names, fmt.Sprintf("r%d", i)) - } - return names -} - -func (g *Generator) genList(ctx context.Context, list *types.Tuple, variadic bool) *paramList { - var params paramList - - if list == nil { - return ¶ms - } - - for i := 0; i < list.Len(); i++ { - v := list.At(i) - - ts := g.renderType(ctx, v.Type()) - - if variadic && i == list.Len()-1 { - t := v.Type() - switch t := t.(type) { - case *types.Slice: - params.Variadic = true - ts = "..." + g.renderType(ctx, t.Elem()) - default: - panic("bad variadic type!") - } - } - - pname := v.Name() - if ts == pname { - pname = fmt.Sprintf("%s%d", pname, i) - } - - if g.nameCollides(pname) || pname == "" { - pname = fmt.Sprintf("_a%d", i) - } - - params.Names = append(params.Names, pname) - params.Types = append(params.Types, ts) - - params.Params = append(params.Params, fmt.Sprintf("%s %s", pname, ts)) - params.Nilable = append(params.Nilable, isNillable(v.Type())) - - if variadic && i == list.Len()-1 { - params.ParamsIntf = append(params.ParamsIntf, fmt.Sprintf("%s ...interface{}", pname)) - } else { - params.ParamsIntf = append(params.ParamsIntf, fmt.Sprintf("%s interface{}", pname)) - } - } - - return ¶ms -} - -func (g *Generator) nameCollides(pname string) bool { - if pname == "_" { - return true - } - if pname == g.pkg { - return true - } - return g.importNameExists(pname) -} - -// ErrNotSetup is returned when the generator is not configured. -var ErrNotSetup = errors.New("not setup") - -// Generate builds a string that constitutes a valid go source file -// containing the mock of the relevant interface. -func (g *Generator) Generate(ctx context.Context) error { - g.populateImports(ctx) - if g.iface == nil { - return ErrNotSetup - } - - g.printf( - "// %s is an autogenerated mock type for the %s type\n", - g.mockName(), g.iface.Name, - ) - - g.printf( - "type %s%s struct {\n\tmock.Mock\n}\n\n", g.mockName(), g.getTypeConstraintString(ctx), - ) - - if g.config.WithExpecter { - g.generateExpecterStruct(ctx) - } - - for _, method := range g.iface.Methods() { - g.generateMethod(ctx, method) - } - - g.generateConstructor(ctx) - - return nil -} - -func (g *Generator) generateMethod(ctx context.Context, method *Method) { - ftype := method.Signature - fname := method.Name - - params := g.genList(ctx, ftype.Params(), ftype.Variadic()) - returns := g.genList(ctx, ftype.Results(), false) - preamble, called := g.generateCalled(params, returns) - - data := struct { - FunctionName string - Params *paramList - Returns *paramList - MockName string - InstantiatedTypeString string - RetVariableName string - Preamble string - Called string - }{ - FunctionName: fname, - Params: params, - Returns: returns, - MockName: g.mockName(), - InstantiatedTypeString: g.getInstantiatedTypeString(), - RetVariableName: resolveCollision(params.Names, "ret"), - Preamble: preamble, - Called: called, - } - - g.printTemplate(data, ` -// {{.FunctionName}} provides a mock function with given fields: {{join .Params.Names ", "}} -func (_m *{{.MockName}}{{.InstantiatedTypeString}}) {{.FunctionName}}({{join .Params.Params ", "}}) {{if (gt (len .Returns.Types) 1)}}({{end}}{{join .Returns.Types ", "}}{{if (gt (len .Returns.Types) 1)}}){{end}} { -{{- .Preamble -}} -{{- if not .Returns.Types}} - {{- .Called}} -{{- else}} - {{- .RetVariableName}} := {{.Called}} - - if len({{.RetVariableName}}) == 0 { - panic("no return value specified for {{.FunctionName}}") - } - - {{range $idx, $name := .Returns.ReturnNames}} - var {{$name}} {{index $.Returns.Types $idx -}} - {{end}} - {{if gt (len .Returns.Types) 1 -}} - if rf, ok := {{.RetVariableName}}.Get(0).(func({{join .Params.Types ", "}}) ({{join .Returns.Types ", "}})); ok { - return rf({{.Params.FormattedParamNames}}) - } - {{end}} - {{- range $idx, $name := .Returns.ReturnNames}} - {{- if $idx}} - - {{end}} - {{- $typ := index $.Returns.Types $idx -}} - if rf, ok := {{$.RetVariableName}}.Get({{$idx}}).(func({{join $.Params.Types ", "}}) {{$typ}}); ok { - r{{$idx}} = rf({{$.Params.FormattedParamNames}}) - } else { - {{- if eq "error" $typ -}} - r{{$idx}} = {{$.RetVariableName}}.Error({{$idx}}) - {{- else if (index $.Returns.Nilable $idx) -}} - if {{$.RetVariableName}}.Get({{$idx}}) != nil { - r{{$idx}} = {{$.RetVariableName}}.Get({{$idx}}).({{$typ}}) - } - {{- else -}} - r{{$idx}} = {{$.RetVariableName}}.Get({{$idx}}).({{$typ}}) - {{- end -}} - } - {{- end}} - - return {{join .Returns.ReturnNames ", "}} -{{- end}} -} -`) - - // Construct expecter helper functions - if g.config.WithExpecter { - g.generateExpecterMethodCall(ctx, method, params, returns) - } -} - -func (g *Generator) generateExpecterStruct(ctx context.Context) { - data := struct { - MockName, ExpecterName string - InstantiatedTypeString string - TypeConstraint string - }{ - MockName: g.mockName(), - ExpecterName: g.expecterName(), - InstantiatedTypeString: g.getInstantiatedTypeString(), - TypeConstraint: g.getTypeConstraintString(ctx), - } - g.printTemplate(data, ` -type {{.ExpecterName}}{{ .TypeConstraint }} struct { - mock *mock.Mock -} - -func (_m *{{.MockName}}{{ .InstantiatedTypeString }}) EXPECT() *{{.ExpecterName}}{{ .InstantiatedTypeString }} { - return &{{.ExpecterName}}{{ .InstantiatedTypeString }}{mock: &_m.Mock} -} -`) -} - -func (g *Generator) generateExpecterMethodCall(ctx context.Context, method *Method, params, returns *paramList) { - data := struct { - MockName, ExpecterName string - CallStruct string - MethodName string - Params, Returns *paramList - LastParamName string - LastParamType string - NbNonVariadic int - InstantiatedTypeString string - TypeConstraint string - }{ - MockName: g.mockName(), - ExpecterName: g.expecterName(), - CallStruct: fmt.Sprintf("%s_%s_Call", g.mockName(), method.Name), - MethodName: method.Name, - Params: params, - Returns: returns, - InstantiatedTypeString: g.getInstantiatedTypeString(), - TypeConstraint: g.getTypeConstraintString(ctx), - } - - // Get some info about parameters for variadic methods, way easier than doing it in golang template directly - if data.Params.Variadic { - data.LastParamName = data.Params.Names[len(data.Params.Names)-1] - data.LastParamType = strings.TrimLeft(data.Params.Types[len(data.Params.Types)-1], "...") - data.NbNonVariadic = len(data.Params.Types) - 1 - } - - g.printTemplate(data, ` -// {{.CallStruct}} is a *mock.Call that shadows Run/Return methods with type explicit version for method '{{.MethodName}}' -type {{.CallStruct}}{{ .TypeConstraint }} struct { - *mock.Call -} - -// {{.MethodName}} is a helper method to define mock.On call -{{- range .Params.Params}} -// - {{.}} -{{- end}} -func (_e *{{.ExpecterName}}{{ .InstantiatedTypeString }}) {{.MethodName}}({{range .Params.ParamsIntf}}{{.}},{{end}}) *{{.CallStruct}}{{ .InstantiatedTypeString }} { - return &{{.CallStruct}}{{ .InstantiatedTypeString }}{Call: _e.mock.On("{{.MethodName}}", - {{- if not .Params.Variadic }} - {{- range .Params.Names}}{{.}},{{end}} - {{- else }} - append([]interface{}{ - {{- range $i, $name := .Params.Names }} - {{- if (lt $i $.NbNonVariadic)}} {{$name}}, - {{- else}} }, {{$name}}... - {{- end}} - {{- end}} )... - {{- end }} )} -} - -func (_c *{{.CallStruct}}{{ .InstantiatedTypeString }}) Run(run func({{range .Params.Params}}{{.}},{{end}})) *{{.CallStruct}}{{ .InstantiatedTypeString }} { - _c.Call.Run(func(args mock.Arguments) { - {{- if not .Params.Variadic }} - run({{range $i, $type := .Params.Types }}args[{{$i}}].({{$type}}),{{end}}) - {{- else}} - variadicArgs := make([]{{.LastParamType}}, len(args) - {{.NbNonVariadic}}) - for i, a := range args[{{.NbNonVariadic}}:] { - if a != nil { - variadicArgs[i] = a.({{.LastParamType}}) - } - } - run( - {{- range $i, $type := .Params.Types }} - {{- if (lt $i $.NbNonVariadic)}}args[{{$i}}].({{$type}}), - {{- else}}variadicArgs...) - {{- end}} - {{- end}} - {{- end}} - }) - return _c -} - -func (_c *{{.CallStruct}}{{ .InstantiatedTypeString }}) Return({{range .Returns.Params}}{{.}},{{end}}) *{{.CallStruct}}{{ .InstantiatedTypeString }} { - _c.Call.Return({{range .Returns.Names}}{{.}},{{end}}) - return _c -} - -func (_c *{{.CallStruct}}{{ .InstantiatedTypeString }}) RunAndReturn(run func({{range .Params.Types}}{{.}},{{end}})({{range .Returns.Types}}{{.}},{{end}})) *{{.CallStruct}}{{ .InstantiatedTypeString }} { - _c.Call.Return(run) - return _c -} -`) -} - -func (g *Generator) generateConstructor(ctx context.Context) { - const constructorTemplate = ` -// {{ .ConstructorName }} creates a new instance of {{ .MockName }}. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. -// The first argument is typically a *testing.T value. -func {{ .ConstructorName }}{{ .TypeConstraint }}(t interface { - mock.TestingT - Cleanup(func()) -}) *{{ .MockName }}{{ .InstantiatedTypeString }} { - mock := &{{ .MockName }}{{ .InstantiatedTypeString }}{} - mock.Mock.Test(t) - - t.Cleanup(func() { mock.AssertExpectations(t) }) - - return mock -} -` - mockName := g.mockName() - constructorName := g.maybeMakeNameExported("new"+g.makeNameExported(mockName), ast.IsExported(mockName)) - - data := struct { - ConstructorName string - ConstructorTestingInterfaceName string - InstantiatedTypeString string - MockName string - TypeConstraint string - }{ - ConstructorName: constructorName, - ConstructorTestingInterfaceName: mockConstructorParamTypeNamePrefix + constructorName, - InstantiatedTypeString: g.getInstantiatedTypeString(), - MockName: mockName, - TypeConstraint: g.getTypeConstraintString(ctx), - } - g.printTemplate(data, constructorTemplate) -} - -// generateCalled returns the Mock.Called invocation string and, if necessary, a preamble with the -// steps to prepare its argument list. -// -// It is separate from Generate to avoid cyclomatic complexity through early return statements. -func (g *Generator) generateCalled(list *paramList, returnList *paramList) (preamble string, called string) { - namesLen := len(list.Names) - if namesLen == 0 || !list.Variadic || !g.config.UnrollVariadic { - if list.Variadic && !g.config.UnrollVariadic && g.config.WithExpecter { - isFuncReturns := len(returnList.Names) > 0 - - var tmpRet, tmpRetWithAssignment string - if isFuncReturns { - tmpRet = resolveCollision(list.Names, "tmpRet") - tmpRetWithAssignment = fmt.Sprintf("%s = ", tmpRet) - } - - calledBytes := g.printTemplateBytes( - struct { - ParamList *paramList - ParamNamesWithoutVariadic []string - VariadicName string - IsFuncReturns bool - TmpRet string - TmpRetWithAssignment string - }{ - ParamList: list, - ParamNamesWithoutVariadic: list.Names[:len(list.Names)-1], - VariadicName: list.Names[namesLen-1], - IsFuncReturns: isFuncReturns, - TmpRet: tmpRet, - TmpRetWithAssignment: tmpRetWithAssignment, - }, - `{{ if .IsFuncReturns }}var {{ .TmpRet }} mock.Arguments {{ end }} - if len({{ .VariadicName }}) > 0 { - {{ .TmpRetWithAssignment }}_m.Called({{ join .ParamList.Names ", " }}) - } else { - {{ .TmpRetWithAssignment }}_m.Called({{ join .ParamNamesWithoutVariadic ", " }}) - } -`, - ) - - return calledBytes.String(), tmpRet - } - - called = "_m.Called(" + strings.Join(list.Names, ", ") + ")" - return - } - - var variadicArgsName string - variadicName := list.Names[namesLen-1] - - // list.Types[] will contain a leading '...'. Strip this from the string to - // do easier comparison. - strippedIfaceType := strings.Trim(list.Types[namesLen-1], "...") - variadicIface := strippedIfaceType == "interface{}" || strippedIfaceType == "any" - - if variadicIface { - // Variadic is already of the interface{} type, so we don't need special handling. - variadicArgsName = variadicName - } else { - // Define _va to avoid "cannot use t (type T) as type []interface {} in append" error - // whenever the variadic type is non-interface{}. - preamble += fmt.Sprintf("\t_va := make([]interface{}, len(%s))\n", variadicName) - preamble += fmt.Sprintf("\tfor _i := range %s {\n\t\t_va[_i] = %s[_i]\n\t}\n", variadicName, variadicName) - variadicArgsName = "_va" - } - - // _ca will hold all arguments we'll mirror into Called, one argument per distinct value - // passed to the method. - // - // For example, if the second argument is variadic and consists of three values, - // a total of 4 arguments will be passed to Called. The alternative is to - // pass a total of 2 arguments where the second is a slice with those 3 values from - // the variadic argument. But the alternative is less accessible because it requires - // building a []interface{} before calling Mock methods like On and AssertCalled for - // the variadic argument, and creates incompatibility issues with the diff algorithm - // in github.com/stretchr/testify/mock. - // - // This mirroring will allow argument lists for methods like On and AssertCalled to - // always resemble the expected calls they describe and retain compatibility. - // - // It's okay for us to use the interface{} type, regardless of the actual types, because - // Called receives only interface{} anyway. - preamble += ("\tvar _ca []interface{}\n") - - if namesLen > 1 { - formattedParamNames := list.FormattedParamNames() - nonVariadicParamNames := formattedParamNames[0:strings.LastIndex(formattedParamNames, ",")] - preamble += fmt.Sprintf("\t_ca = append(_ca, %s)\n", nonVariadicParamNames) - } - preamble += fmt.Sprintf("\t_ca = append(_ca, %s...)\n", variadicArgsName) - - called = "_m.Called(_ca...)" - return -} - -func (g *Generator) Write(w io.Writer) error { - opt := &imports.Options{Comments: true} - theBytes := g.buf.Bytes() - - res, err := imports.Process("mock.go", theBytes, opt) - if err != nil { - line := "--------------------------------------------------------------------------------------------" - fmt.Fprintf(os.Stderr, "Between the lines is the file (mock.go) mockery generated in-memory but detected as invalid:\n%s\n%s\n%s\n", line, g.buf.String(), line) - return err - } - - _, err = w.Write(res) - if err != nil { - return fmt.Errorf("failed to write generator: %w", err) - } - return nil -} - -func resolveCollision(names []string, variable string) string { - ret := variable - set := make(map[string]struct{}) - for _, n := range names { - set[n] = struct{}{} - } - - for i := len(names); true; i++ { - _, ok := set[ret] - if !ok { - break - } - - ret = fmt.Sprintf("%s_%d", variable, i) - } - - return ret -} - -type replaceType struct { - alias string - pkg string - typ string - param string - rmvParam bool -} - -type replaceTypeItem struct { - from *replaceType - to *replaceType -} - -func parseReplaceType(t string) *replaceType { - ret := &replaceType{} - r := strings.SplitN(t, ":", 2) - if len(r) > 1 { - ret.alias = r[0] - t = r[1] - } - - // Match type parameter substitution - match := regexp.MustCompile(`\[(.*?)\]$`).FindStringSubmatch(t) - if len(match) >= 2 { - ret.param, ret.rmvParam = strings.CutPrefix(match[1], "-") - t = strings.ReplaceAll(t, match[0], "") - } - - lastDot := strings.LastIndex(t, ".") - lastSlash := strings.LastIndex(t, "/") - if lastDot == -1 || (lastSlash > -1 && lastDot < lastSlash) { - ret.pkg = t - } else { - ret.pkg = t[:lastDot] - ret.typ = t[lastDot+1:] - } - return ret -} diff --git a/vendor/github.com/vektra/mockery/v2/pkg/logging/logging.go b/vendor/github.com/vektra/mockery/v2/pkg/logging/logging.go deleted file mode 100644 index b6694ef38..000000000 --- a/vendor/github.com/vektra/mockery/v2/pkg/logging/logging.go +++ /dev/null @@ -1,88 +0,0 @@ -package logging - -import ( - "errors" - "fmt" - "os" - "runtime/debug" - "strings" - "time" - - "github.com/rs/zerolog" - "github.com/vektra/mockery/v2/pkg/stackerr" - "golang.org/x/term" -) - -const ( - LogKeyBaseDir = "base-dir" - LogKeyDir = "dir" - LogKeyDryRun = "dry-run" - LogKeyFile = "file" - LogKeyInterface = "interface" - LogKeyImport = "import" - LogKeyPath = "path" - LogKeyQualifiedName = "qualified-name" - LogKeyPackageName = "package-name" - _defaultSemVer = "v0.0.0-dev" -) - -// SemVer is the version of mockery at build time. -var SemVer = "" -var ErrPkgNotExist = errors.New("package does not exist") - -func GetSemverInfo() string { - if SemVer != "" { - return SemVer - } - version, ok := debug.ReadBuildInfo() - if ok && version.Main.Version != "(devel)" && version.Main.Version != "" { - return version.Main.Version - } - return _defaultSemVer -} - -func getMinorSemver(semver string) string { - split := strings.Split(semver, ".") - return strings.Join(split[0:2], ".") -} - -// GetMinorSemver returns the semantic version up to and including the minor version. -func GetMinorSemver() string { - return getMinorSemver(GetSemverInfo()) -} - -func DocsURL(relativePath string) string { - if string(relativePath[0]) != "/" { - relativePath = "/" + relativePath - } - return fmt.Sprintf("https://vektra.github.io/mockery/%s%s", GetMinorSemver(), relativePath) -} - -type timeHook struct{} - -func (t timeHook) Run(e *zerolog.Event, level zerolog.Level, msg string) { - e.Time("time", time.Now()) -} - -func GetLogger(levelStr string) (zerolog.Logger, error) { - level, err := zerolog.ParseLevel(levelStr) - if err != nil { - return zerolog.Logger{}, stackerr.NewStackErrf(err, "Couldn't parse log level") - } - out := os.Stderr - writer := zerolog.ConsoleWriter{ - Out: out, - TimeFormat: time.RFC822, - } - if !term.IsTerminal(int(out.Fd())) || os.Getenv("TERM") == "dumb" { - writer.NoColor = true - } - log := zerolog.New(writer). - Hook(timeHook{}). - Level(level). - With(). - Str("version", GetSemverInfo()). - Logger() - - return log, nil -} diff --git a/vendor/github.com/vektra/mockery/v2/pkg/outputter.go b/vendor/github.com/vektra/mockery/v2/pkg/outputter.go deleted file mode 100644 index e3f916fc1..000000000 --- a/vendor/github.com/vektra/mockery/v2/pkg/outputter.go +++ /dev/null @@ -1,379 +0,0 @@ -package pkg - -import ( - "bytes" - "context" - "errors" - "fmt" - "go/ast" - "io" - "os" - "path/filepath" - "regexp" - "strings" - "text/template" - - "github.com/chigopher/pathlib" - "github.com/huandu/xstrings" - "github.com/iancoleman/strcase" - "github.com/rs/zerolog" - - "github.com/vektra/mockery/v2/pkg/config" - "github.com/vektra/mockery/v2/pkg/logging" - "github.com/vektra/mockery/v2/pkg/stackerr" -) - -var ErrInfiniteLoop = fmt.Errorf("infinite loop in template variables detected") - -// Functions available in the template for manipulating -// -// Since the map and its functions are stateless, it exists as -// a package var rather than being initialized on every call -// in [parseConfigTemplates] and [generator.printTemplate] -var templateFuncMap = template.FuncMap{ - // String inspection and manipulation - "contains": strings.Contains, - "hasPrefix": strings.HasPrefix, - "hasSuffix": strings.HasSuffix, - "join": strings.Join, - "replace": strings.Replace, - "replaceAll": strings.ReplaceAll, - "split": strings.Split, - "splitAfter": strings.SplitAfter, - "splitAfterN": strings.SplitAfterN, - "trim": strings.Trim, - "trimLeft": strings.TrimLeft, - "trimPrefix": strings.TrimPrefix, - "trimRight": strings.TrimRight, - "trimSpace": strings.TrimSpace, - "trimSuffix": strings.TrimSuffix, - "lower": strings.ToLower, - "upper": strings.ToUpper, - "camelcase": xstrings.ToCamelCase, - "snakecase": xstrings.ToSnakeCase, - "kebabcase": xstrings.ToKebabCase, - "firstLower": xstrings.FirstRuneToLower, - "firstUpper": xstrings.FirstRuneToUpper, - - // Regular expression matching - "matchString": regexp.MatchString, - "quoteMeta": regexp.QuoteMeta, - - // Filepath manipulation - "base": filepath.Base, - "clean": filepath.Clean, - "dir": filepath.Dir, - - // Basic access to reading environment variables - "expandEnv": os.ExpandEnv, - "getenv": os.Getenv, -} - -type Cleanup func() error - -type OutputStreamProvider interface { - GetWriter(context.Context, *Interface) (io.Writer, error, Cleanup) -} - -type StdoutStreamProvider struct{} - -func (*StdoutStreamProvider) GetWriter(ctx context.Context, iface *Interface) (io.Writer, error, Cleanup) { - return os.Stdout, nil, func() error { return nil } -} - -type FileOutputStreamProvider struct { - Config config.Config - BaseDir string - InPackage bool - InPackageSuffix bool - TestOnly bool - Case string - KeepTree bool - KeepTreeOriginalDirectory string - FileName string -} - -func (p *FileOutputStreamProvider) GetWriter(ctx context.Context, iface *Interface) (io.Writer, error, Cleanup) { - log := zerolog.Ctx(ctx).With().Str(logging.LogKeyInterface, iface.Name).Logger() - // ctx = log.WithContext(ctx) - - var path string - - caseName := iface.Name - if p.Case == "underscore" || p.Case == "snake" { - caseName = p.underscoreCaseName(caseName) - } - - if p.KeepTree { - absOriginalDir, err := filepath.Abs(p.KeepTreeOriginalDirectory) - if err != nil { - return nil, err, func() error { return nil } - } - relativePath := strings.TrimPrefix( - filepath.Join(filepath.Dir(iface.FileName), p.filename(caseName)), - absOriginalDir) - - // as it's not possible to import from internal path, we have to replace it in mocks when KeepTree is used - relativePath = strings.Replace(relativePath, "/internal/", "/internal_/", -1) - - path = filepath.Join(p.BaseDir, relativePath) - if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { - return nil, err, func() error { return nil } - } - } else if p.InPackage { - path = filepath.Join(filepath.Dir(iface.FileName), p.filename(caseName)) - } else { - path = filepath.Join(p.BaseDir, p.filename(caseName)) - if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { - return nil, err, func() error { return nil } - } - } - - log = log.With().Str(logging.LogKeyPath, path).Logger() - - log.Debug().Msgf("creating writer to file") - f, err := os.Create(path) - if err != nil { - return nil, err, func() error { return nil } - } - - return f, nil, func() error { - return f.Close() - } -} - -func (p *FileOutputStreamProvider) filename(name string) string { - if p.FileName != "" { - return p.FileName - } - - if p.InPackage && p.TestOnly { - if p.InPackageSuffix { - return name + "_mock_test.go" - } - - return "mock_" + name + "_test.go" - } else if p.InPackage && !p.KeepTree { - if p.InPackageSuffix { - return name + "_mock.go" - } - - return "mock_" + name + ".go" - } else if p.TestOnly { - return name + "_test.go" - } - - return name + ".go" -} - -// shamelessly taken from http://stackoverflow.com/questions/1175208/elegant-python-function-to-convert-camelcase-to-camel-caseo -func (*FileOutputStreamProvider) underscoreCaseName(caseName string) string { - rxp1 := regexp.MustCompile("(.)([A-Z][a-z]+)") - s1 := rxp1.ReplaceAllString(caseName, "${1}_${2}") - rxp2 := regexp.MustCompile("([a-z0-9])([A-Z])") - return strings.ToLower(rxp2.ReplaceAllString(s1, "${1}_${2}")) -} - -// parseConfigTemplates parses various templated strings -// in the config struct into their fully defined values. This mutates -// the config object passed. -func parseConfigTemplates(ctx context.Context, c *config.Config, iface *Interface) error { - log := zerolog.Ctx(ctx) - - isExported := ast.IsExported(iface.Name) - var mock string - if isExported { - mock = "Mock" - } else { - mock = "mock" - } - - workingDir, err := os.Getwd() - if err != nil { - return fmt.Errorf("get working directory: %w", err) - } - var interfaceDirRelative string - interfaceDir := pathlib.NewPath(iface.FileName).Parent() - interfaceDirRelativePath, err := interfaceDir.RelativeToStr(workingDir) - if errors.Is(err, pathlib.ErrRelativeTo) { - log.Debug(). - Stringer("interface-dir", interfaceDir). - Str("working-dir", workingDir). - Msg("can't make interfaceDir relative to working dir. Setting InterfaceDirRelative to package path.") - - interfaceDirRelative = iface.Pkg.Path() - } else { - interfaceDirRelative = interfaceDirRelativePath.String() - } - - // data is the struct sent to the template parser - data := struct { - InterfaceDir string - InterfaceDirRelative string - InterfaceFile string - InterfaceName string - InterfaceNameCamel string - InterfaceNameLowerCamel string - InterfaceNameSnake string - InterfaceNameLower string - Mock string - MockName string - PackageName string - PackagePath string - }{ - InterfaceDir: filepath.Dir(iface.FileName), - InterfaceDirRelative: interfaceDirRelative, - InterfaceFile: iface.FileName, - InterfaceName: iface.Name, - // Deprecated: All custom case variables of InterfaceName will be removed in the next major version - // Use the template functions instead - InterfaceNameCamel: strcase.ToCamel(iface.Name), - InterfaceNameLowerCamel: strcase.ToLowerCamel(iface.Name), - InterfaceNameSnake: strcase.ToSnake(iface.Name), - InterfaceNameLower: strings.ToLower(iface.Name), - Mock: mock, - MockName: c.MockName, - PackageName: iface.Pkg.Name(), - PackagePath: iface.Pkg.Path(), - } - // These are the config options that we allow - // to be parsed by the templater. The keys are - // just labels we're using for logs/errors - templateMap := map[string]*string{ - "filename": &c.FileName, - "dir": &c.Dir, - "mockname": &c.MockName, - "outpkg": &c.Outpkg, - } - - numIterations := 0 - changesMade := true - for changesMade { - if numIterations >= 20 { - msg := "infinite loop in template variables detected" - log.Error().Msg(msg) - for key, val := range templateMap { - l := log.With().Str("variable-name", key).Str("variable-value", *val).Logger() - l.Error().Msg("config variable value") - } - return ErrInfiniteLoop - } - // Templated variables can refer to other templated variables, - // so we need to continue parsing the templates until it can't - // be parsed anymore. - changesMade = false - - for name, attributePointer := range templateMap { - oldVal := *attributePointer - - attributeTempl, err := template.New("interface-template").Funcs(templateFuncMap).Parse(*attributePointer) - if err != nil { - return fmt.Errorf("failed to parse %s template: %w", name, err) - } - var parsedBuffer bytes.Buffer - - if err := attributeTempl.Execute(&parsedBuffer, data); err != nil { - return fmt.Errorf("failed to execute %s template: %w", name, err) - } - *attributePointer = parsedBuffer.String() - if *attributePointer != oldVal { - changesMade = true - } - } - numIterations += 1 - } - - return nil -} - -// Outputter wraps the Generator struct. It calls the generator -// to create the mock implementations in-memory, then has additional -// logic to determine where the mock should be written to on disk. -type Outputter struct { - boilerplate string - config *config.Config - dryRun bool -} - -func NewOutputter( - config *config.Config, - boilerplate string, - dryRun bool, -) *Outputter { - return &Outputter{ - boilerplate: boilerplate, - config: config, - dryRun: dryRun, - } -} - -func (m *Outputter) Generate(ctx context.Context, iface *Interface) error { - log := zerolog.Ctx(ctx).With(). - Str(logging.LogKeyInterface, iface.Name). - Str(logging.LogKeyQualifiedName, iface.QualifiedName). - Logger() - ctx = log.WithContext(ctx) - - log.Info().Msg("generating mocks for interface") - - log.Debug().Msg("getting config for interface") - interfaceConfigs, err := m.config.GetInterfaceConfig(ctx, iface.QualifiedName, iface.Name) - if err != nil { - return err - } - - for _, interfaceConfig := range interfaceConfigs { - interfaceConfig.LogUnsupportedPackagesConfig(ctx) - - log.Debug().Msg("getting mock generator") - - if err := parseConfigTemplates(ctx, interfaceConfig, iface); err != nil { - return fmt.Errorf("failed to parse config template: %w", err) - } - - g := GeneratorConfig{ - Boilerplate: m.boilerplate, - DisableVersionString: interfaceConfig.DisableVersionString, - Exported: interfaceConfig.Exported, - InPackage: interfaceConfig.InPackage, - KeepTree: interfaceConfig.KeepTree, - Note: interfaceConfig.Note, - MockBuildTags: interfaceConfig.MockBuildTags, - PackageName: interfaceConfig.Outpkg, - PackageNamePrefix: interfaceConfig.Packageprefix, - StructName: interfaceConfig.MockName, - UnrollVariadic: interfaceConfig.UnrollVariadic, - WithExpecter: interfaceConfig.WithExpecter, - ReplaceType: interfaceConfig.ReplaceType, - } - generator := NewGenerator(ctx, g, iface, "") - - log.Debug().Msg("generating mock in-memory") - if err := generator.GenerateAll(ctx); err != nil { - return err - } - - // Log where the file would be written to before checking whether to create the directories and files - outputPath := pathlib.NewPath(interfaceConfig.Dir).Join(interfaceConfig.FileName) - fileLog := log.With().Stringer(logging.LogKeyFile, outputPath).Logger() - fileLog.Info().Msg("writing to file") - - if m.dryRun { - continue - } - - if err := outputPath.Parent().MkdirAll(); err != nil { - return stackerr.NewStackErrf(err, "failed to mkdir parents of: %v", outputPath) - } - - file, err := outputPath.OpenFile(os.O_RDWR | os.O_CREATE | os.O_TRUNC) - if err != nil { - return stackerr.NewStackErrf(err, "failed to open output file for mock: %v", outputPath) - } - defer file.Close() - if err := generator.Write(file); err != nil { - return stackerr.NewStackErrf(err, "failed to write to file") - } - } - return nil -} diff --git a/vendor/github.com/vektra/mockery/v2/pkg/parse.go b/vendor/github.com/vektra/mockery/v2/pkg/parse.go deleted file mode 100644 index 81b08de64..000000000 --- a/vendor/github.com/vektra/mockery/v2/pkg/parse.go +++ /dev/null @@ -1,384 +0,0 @@ -package pkg - -import ( - "context" - "errors" - "fmt" - "go/ast" - "go/types" - "os" - "path/filepath" - "sort" - "strings" - - "github.com/rs/zerolog" - "github.com/vektra/mockery/v2/pkg/logging" - "golang.org/x/tools/go/packages" -) - -type fileEntry struct { - fileName string - pkg *packages.Package - syntax *ast.File - interfaces []string - disableFuncMocks bool -} - -func (f *fileEntry) ParseInterfaces(ctx context.Context) { - nv := NewNodeVisitor(ctx, f.disableFuncMocks) - ast.Walk(nv, f.syntax) - f.interfaces = nv.DeclaredInterfaces() -} - -type packageLoadEntry struct { - pkgs []*packages.Package - err error -} - -type Parser struct { - files []*fileEntry - entriesByFileName map[string]*fileEntry - parserPackages []*types.Package - conf packages.Config - packageLoadCache map[string]packageLoadEntry - disableFuncMocks bool -} - -func ParserDisableFuncMocks(disable bool) func(*Parser) { - return func(p *Parser) { - p.disableFuncMocks = disable - } -} -func NewParser(buildTags []string, opts ...func(*Parser)) *Parser { - var conf packages.Config - conf.Mode = packages.NeedTypes | - packages.NeedTypesSizes | - packages.NeedSyntax | - packages.NeedTypesInfo | - packages.NeedImports | - packages.NeedName | - packages.NeedFiles | - packages.NeedCompiledGoFiles - - if len(buildTags) > 0 { - conf.BuildFlags = []string{"-tags", strings.Join(buildTags, ",")} - } - p := &Parser{ - parserPackages: make([]*types.Package, 0), - entriesByFileName: map[string]*fileEntry{}, - conf: conf, - packageLoadCache: map[string]packageLoadEntry{}, - } - for _, opt := range opts { - opt(p) - } - return p -} - -func (p *Parser) loadPackages(fpath string) ([]*packages.Package, error) { - if result, ok := p.packageLoadCache[filepath.Dir(fpath)]; ok { - return result.pkgs, result.err - } - pkgs, err := packages.Load(&p.conf, "file="+fpath) - p.packageLoadCache[fpath] = packageLoadEntry{pkgs, err} - return pkgs, err -} - -func (p *Parser) ParsePackages(ctx context.Context, packageNames []string) error { - log := zerolog.Ctx(ctx) - - packages, err := packages.Load(&p.conf, packageNames...) - if err != nil { - return err - } - for _, pkg := range packages { - for _, err := range pkg.Errors { - log.Err(err).Msg("encountered error when loading package") - } - if len(pkg.Errors) != 0 { - return errors.New("error occurred when loading packages") - } - for fileIdx, file := range pkg.GoFiles { - log.Debug(). - Str("package", pkg.PkgPath). - Str("file", file). - Msgf("found file") - entry := fileEntry{ - fileName: file, - pkg: pkg, - syntax: pkg.Syntax[fileIdx], - disableFuncMocks: p.disableFuncMocks, - } - entry.ParseInterfaces(ctx) - p.files = append(p.files, &entry) - p.entriesByFileName[file] = &entry - } - } - return nil -} - -// DEPRECATED: Parse is part of the deprecated, legacy mockery behavior. This is not -// used when the packages feature is enabled. -func (p *Parser) Parse(ctx context.Context, path string) error { - // To support relative paths to mock targets w/ vendor deps, we need to provide eventual - // calls to build.Context.Import with an absolute path. It needs to be absolute because - // Import will only find the vendor directory if our target path for parsing is under - // a "root" (GOROOT or a GOPATH). Only absolute paths will pass the prefix-based validation. - // - // For example, if our parse target is "./ifaces", Import will check if any "roots" are a - // prefix of "ifaces" and decide to skip the vendor search. - path, err := filepath.Abs(path) - if err != nil { - return err - } - - dir := filepath.Dir(path) - - files, err := os.ReadDir(dir) - if err != nil { - return err - } - - for _, fi := range files { - log := zerolog.Ctx(ctx).With(). - Str(logging.LogKeyDir, dir). - Str(logging.LogKeyFile, fi.Name()). - Logger() - ctx = log.WithContext(ctx) - - if filepath.Ext(fi.Name()) != ".go" || strings.HasSuffix(fi.Name(), "_test.go") || strings.HasPrefix(fi.Name(), "mock_") { - continue - } - - log.Debug().Msgf("parsing") - - fname := fi.Name() - fpath := filepath.Join(dir, fname) - if _, ok := p.entriesByFileName[fpath]; ok { - continue - } - - pkgs, err := p.loadPackages(fpath) - if err != nil { - return err - } - if len(pkgs) == 0 { - continue - } - if len(pkgs) > 1 { - names := make([]string, len(pkgs)) - for i, p := range pkgs { - names[i] = p.Name - } - panic(fmt.Sprintf("file %s resolves to multiple packages: %s", fpath, strings.Join(names, ", "))) - } - - pkg := pkgs[0] - if len(pkg.Errors) > 0 { - return pkg.Errors[0] - } - if len(pkg.GoFiles) == 0 { - continue - } - - for idx, f := range pkg.GoFiles { - if _, ok := p.entriesByFileName[f]; ok { - continue - } - entry := fileEntry{ - fileName: f, - pkg: pkg, - syntax: pkg.Syntax[idx], - } - p.files = append(p.files, &entry) - p.entriesByFileName[f] = &entry - } - } - - return nil -} - -func (p *Parser) Load(ctx context.Context) error { - for _, entry := range p.files { - entry.ParseInterfaces(ctx) - } - return nil -} - -func (p *Parser) Find(name string) (*Interface, error) { - for _, entry := range p.files { - for _, iface := range entry.interfaces { - if iface == name { - list := p.packageInterfaces(entry.pkg.Types, entry.fileName, []string{name}, nil) - if len(list) > 0 { - return list[0], nil - } - } - } - } - return nil, ErrNotInterface -} - -func (p *Parser) Interfaces() []*Interface { - ifaces := make(sortableIFaceList, 0) - for _, entry := range p.files { - declaredIfaces := entry.interfaces - ifaces = p.packageInterfaces(entry.pkg.Types, entry.fileName, declaredIfaces, ifaces) - } - - sort.Sort(ifaces) - return ifaces -} - -func (p *Parser) packageInterfaces( - pkg *types.Package, - fileName string, - declaredInterfaces []string, - ifaces []*Interface) []*Interface { - scope := pkg.Scope() - for _, name := range declaredInterfaces { - obj := scope.Lookup(name) - if obj == nil { - continue - } - - typ, ok := obj.Type().(*types.Named) - if !ok { - continue - } - - name = typ.Obj().Name() - - if typ.Obj().Pkg() == nil { - continue - } - - elem := &Interface{ - Name: name, - Pkg: pkg, - QualifiedName: pkg.Path(), - FileName: fileName, - NamedType: typ, - } - - iface, ok := typ.Underlying().(*types.Interface) - if ok { - elem.IsFunction = false - elem.ActualInterface = iface - } else { - sig, ok := typ.Underlying().(*types.Signature) - if !ok { - continue - } - elem.IsFunction = true - elem.SingleFunction = &Method{Name: "Execute", Signature: sig} - } - - ifaces = append(ifaces, elem) - } - - return ifaces -} - -type Method struct { - Name string - Signature *types.Signature -} - -type TypesPackage interface { - Name() string - Path() string -} - -// Interface type represents the target type that we will generate a mock for. -// It could be an interface, or a function type. -// Function type emulates: an interface it has 1 method with the function signature -// and a general name, e.g. "Execute". -type Interface struct { - Name string // Name of the type to be mocked. - QualifiedName string // Path to the package of the target type. - FileName string - File *ast.File - Pkg TypesPackage - NamedType *types.Named - IsFunction bool // If true, this instance represents a function, otherwise it's an interface. - ActualInterface *types.Interface // Holds the actual interface type, in case it's an interface. - SingleFunction *Method // Holds the function type information, in case it's a function type. -} - -func (iface *Interface) Methods() []*Method { - if iface.IsFunction { - return []*Method{iface.SingleFunction} - } - methods := make([]*Method, iface.ActualInterface.NumMethods()) - for i := 0; i < iface.ActualInterface.NumMethods(); i++ { - fn := iface.ActualInterface.Method(i) - methods[i] = &Method{Name: fn.Name(), Signature: fn.Type().(*types.Signature)} - } - return methods -} - -type sortableIFaceList []*Interface - -func (s sortableIFaceList) Len() int { - return len(s) -} - -func (s sortableIFaceList) Swap(i, j int) { - s[i], s[j] = s[j], s[i] -} - -func (s sortableIFaceList) Less(i, j int) bool { - return strings.Compare(s[i].Name, s[j].Name) == -1 -} - -type NodeVisitor struct { - declaredInterfaces []string - disableFuncMocks bool - ctx context.Context -} - -func NewNodeVisitor(ctx context.Context, disableFuncMocks bool) *NodeVisitor { - return &NodeVisitor{ - declaredInterfaces: make([]string, 0), - disableFuncMocks: disableFuncMocks, - ctx: ctx, - } -} - -func (nv *NodeVisitor) DeclaredInterfaces() []string { - return nv.declaredInterfaces -} - -func (nv *NodeVisitor) add(ctx context.Context, n *ast.TypeSpec) { - log := zerolog.Ctx(ctx) - log.Debug(). - Str("node-type", fmt.Sprintf("%T", n.Type)). - Msg("found node with acceptable type for mocking") - nv.declaredInterfaces = append(nv.declaredInterfaces, n.Name.Name) -} - -func (nv *NodeVisitor) Visit(node ast.Node) ast.Visitor { - log := zerolog.Ctx(nv.ctx) - - switch n := node.(type) { - case *ast.TypeSpec: - log := log.With(). - Str("node-name", n.Name.Name). - Str("node-type", fmt.Sprintf("%T", n.Type)). - Logger() - - switch n.Type.(type) { - case *ast.FuncType: - if nv.disableFuncMocks { - break - } - nv.add(nv.ctx, n) - case *ast.InterfaceType, *ast.IndexExpr: - nv.add(nv.ctx, n) - default: - log.Debug().Msg("Found node with unacceptable type for mocking. Rejecting.") - } - } - return nv -} diff --git a/vendor/github.com/vektra/mockery/v2/pkg/stackerr/stackerr.go b/vendor/github.com/vektra/mockery/v2/pkg/stackerr/stackerr.go deleted file mode 100644 index e8fc415f8..000000000 --- a/vendor/github.com/vektra/mockery/v2/pkg/stackerr/stackerr.go +++ /dev/null @@ -1,47 +0,0 @@ -package stackerr - -import ( - "errors" - "fmt" - "runtime/debug" -) - -type StackErr struct { - cause error - stack []byte -} - -func NewStackErr(cause error) error { - return StackErr{ - cause: cause, - stack: debug.Stack(), - } -} - -func NewStackErrf(cause error, f string, args ...any) error { - msg := fmt.Sprintf(f, args...) - cause = fmt.Errorf(msg+": %w", cause) - return NewStackErr(cause) -} - -func (se StackErr) Error() string { - return se.cause.Error() -} - -func (se StackErr) Unwrap() error { - return se.cause -} - -func (se StackErr) Stack() []byte { - return se.stack -} - -func GetStack(err error) ([]byte, bool) { - var s interface { - Stack() []byte - } - if errors.As(err, &s) { - return s.Stack(), true - } - return nil, false -} diff --git a/vendor/github.com/vektra/mockery/v2/pkg/walker.go b/vendor/github.com/vektra/mockery/v2/pkg/walker.go deleted file mode 100644 index bf051579d..000000000 --- a/vendor/github.com/vektra/mockery/v2/pkg/walker.go +++ /dev/null @@ -1,210 +0,0 @@ -package pkg - -import ( - "context" - "fmt" - "io" - "os" - "path/filepath" - "regexp" - "strings" - - "github.com/vektra/mockery/v2/pkg/config" - "github.com/vektra/mockery/v2/pkg/logging" - - "github.com/rs/zerolog" -) - -type Walker struct { - config.Config - BaseDir string - Recursive bool - Filter *regexp.Regexp - LimitOne bool - BuildTags []string -} - -type WalkerVisitor interface { - VisitWalk(context.Context, *Interface) error -} - -func (w *Walker) Walk(ctx context.Context, visitor WalkerVisitor) (generated bool) { - log := zerolog.Ctx(ctx) - ctx = log.WithContext(ctx) - - log.Info().Msgf("Walking") - log.Debug().Str("baseDir", w.BaseDir).Msg("starting walk at base dir") - - parser := NewParser(w.BuildTags) - w.doWalk(ctx, parser, w.BaseDir) - - err := parser.Load(ctx) - if err != nil { - fmt.Fprintf(os.Stderr, "Error walking: %v\n", err) - os.Exit(1) - } - - for _, iface := range parser.Interfaces() { - if strings.HasPrefix(iface.Name, mockConstructorParamTypeNamePrefix) { - continue - } - - if w.ExcludePath(iface.FileName) { - continue - } - - if !w.Filter.MatchString(iface.Name) { - continue - } - err := visitor.VisitWalk(ctx, iface) - if err != nil { - fmt.Fprintf(os.Stderr, "Error walking %s: %s\n", iface.Name, err) - os.Exit(1) - } - generated = true - if w.LimitOne { - return - } - } - - return -} - -func (w *Walker) doWalk(ctx context.Context, parser *Parser, dir string) (generated bool) { - log := zerolog.Ctx(ctx) - ctx = log.WithContext(ctx) - - files, err := os.ReadDir(dir) - if err != nil { - return - } - - for _, file := range files { - if strings.HasPrefix(file.Name(), ".") || strings.HasPrefix(file.Name(), "_") { - continue - } - - path := filepath.Join(dir, file.Name()) - if w.ExcludePath(path) { - continue - } - - if file.IsDir() { - if w.Recursive { - generated = w.doWalk(ctx, parser, path) || generated - if generated && w.LimitOne { - return - } - } - continue - } - - if !strings.HasSuffix(path, ".go") || strings.HasSuffix(path, "_test.go") { - continue - } - - err = parser.Parse(ctx, path) - if err != nil { - log.Err(err).Msgf("Error parsing file") - continue - } - } - - return -} - -type GeneratorVisitorConfig struct { - Boilerplate string - DisableVersionString bool - Exported bool - InPackage bool - KeepTree bool - Note string - MockBuildTags string - // The name of the output package, if InPackage is false (defaults to "mocks") - PackageName string - PackageNamePrefix string - StructName string - UnrollVariadic bool - WithExpecter bool - ReplaceType []string -} - -type GeneratorVisitor struct { - config GeneratorVisitorConfig - dryRun bool - outputStream OutputStreamProvider -} - -func NewGeneratorVisitor( - config GeneratorVisitorConfig, - outputStream OutputStreamProvider, - dryRun bool, -) *GeneratorVisitor { - return &GeneratorVisitor{ - config: config, - dryRun: dryRun, - outputStream: outputStream, - } -} - -func (v *GeneratorVisitor) VisitWalk(ctx context.Context, iface *Interface) error { - log := zerolog.Ctx(ctx).With(). - Str(logging.LogKeyInterface, iface.Name). - Str(logging.LogKeyQualifiedName, iface.QualifiedName). - Logger() - ctx = log.WithContext(ctx) - - defer func() { - if r := recover(); r != nil { - log.Error().Msgf("Unable to generate mock: %s", r) - return - } - }() - - var out io.Writer - - out, err, closer := v.outputStream.GetWriter(ctx, iface) - if err != nil { - log.Err(err).Msgf("Unable to get writer") - os.Exit(1) - } - defer func() { - if err := closer(); err != nil { - log.Err(err).Msgf("Failed to close output stream") - } - }() - - generatorConfig := GeneratorConfig{ - Boilerplate: v.config.Boilerplate, - DisableVersionString: v.config.DisableVersionString, - Exported: v.config.Exported, - InPackage: v.config.InPackage, - KeepTree: v.config.KeepTree, - Note: v.config.Note, - MockBuildTags: v.config.MockBuildTags, - PackageName: v.config.PackageName, - PackageNamePrefix: v.config.PackageNamePrefix, - StructName: v.config.StructName, - UnrollVariadic: v.config.UnrollVariadic, - WithExpecter: v.config.WithExpecter, - ReplaceType: v.config.ReplaceType, - } - - gen := NewGenerator(ctx, generatorConfig, iface, "") - log.Info().Msgf("Generating mock") - if err := gen.GenerateAll(ctx); err != nil { - log.Err(err).Msg("generation failed") - return err - } - - if !v.dryRun { - log.Info().Msgf("writing mock to file") - err = gen.Write(out) - if err != nil { - return err - } - } - - return nil -} -- cgit mrf-deployment