From 78ac555c4d3a69b6c8cbb00f94fa85c97d140f90 Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Tue, 26 Aug 2025 16:14:03 +0200 Subject: [PATCH] CI: Run gofmt on Linting action (#110159) * CI: Run gofmt on Linting action * Chore: Run gofmt on all packages --- .github/workflows/go-lint.yml | 21 +++++++++++++++++++ Makefile | 4 ++++ .../wire/testdata/BindInjectorArg/foo/wire.go | 3 ++- .../BindInjectorArgPointer/foo/wire.go | 3 ++- .../BindInterfaceWithValue/foo/wire.go | 3 ++- .../testdata/BuildTagsAllPackages/bar/bar.go | 3 ++- .../BuildTagsAllPackages/bar/bar_inject.go | 3 ++- .../testdata/BuildTagsAllPackages/foo/wire.go | 3 ++- .../internal/wire/testdata/Chain/foo/wire.go | 3 ++- .../wire/testdata/Cleanup/foo/wire.go | 3 ++- .../wire/testdata/CopyOtherDecls/foo/foo.go | 3 ++- .../internal/wire/testdata/Cycle/foo/wire.go | 3 ++- .../wire/testdata/DocComment/foo/wire.go | 3 ++- .../wire/testdata/EmptyVar/foo/wire.go | 3 ++- .../testdata/ExampleWithMocks/foo/wire.go | 3 ++- .../wire/testdata/ExportedValue/foo/wire.go | 3 ++- .../ExportedValueDifferentPackage/foo/wire.go | 3 ++- .../wire/testdata/FieldsOfCycle/foo/wire.go | 3 ++- .../FieldsOfImportedStruct/main/wire.go | 3 ++- .../wire/testdata/FieldsOfStruct/foo/wire.go | 3 ++- .../foo/wire.go | 3 ++- .../FieldsOfStructPointer/foo/wire.go | 3 ++- .../testdata/FieldsOfValueStruct/main/wire.go | 3 ++- .../wire/testdata/FuncArgProvider/foo/wire.go | 3 ++- .../internal/wire/testdata/Header/foo/wire.go | 3 ++- .../ImportedInterfaceBinding/bar/wire.go | 3 ++- .../wire/testdata/InjectInput/foo/wire.go | 3 ++- .../testdata/InjectInputConflict/foo/wire.go | 3 ++- .../wire/testdata/InjectWithPanic/foo/wire.go | 3 ++- .../InjectorMissingCleanup/foo/wire.go | 3 ++- .../testdata/InjectorMissingError/foo/wire.go | 3 ++- .../testdata/InterfaceBinding/foo/wire.go | 3 ++- .../foo/wire.go | 3 ++- .../InterfaceBindingInvalidArg0/foo/wire.go | 3 ++- .../InterfaceBindingNotEnoughArgs/foo/wire.go | 3 ++- .../InterfaceBindingReuse/foo/wire.go | 3 ++- .../wire/testdata/InterfaceValue/foo/wire.go | 3 ++- .../InterfaceValueDoesntImplement/foo/wire.go | 3 ++- .../InterfaceValueInvalidArg0/foo/wire.go | 3 ++- .../InterfaceValueNotEnoughArgs/foo/wire.go | 3 ++- .../wire/testdata/InvalidInjector/foo/wire.go | 3 ++- .../testdata/MultipleArgsSameType/foo/wire.go | 3 ++- .../testdata/MultipleBindings/foo/wire.go | 3 ++- .../MultipleMissingInputs/foo/wire.go | 3 ++- .../MultipleSimilarPackages/main/wire.go | 3 ++- .../wire/testdata/NamingWorstCase/foo/wire.go | 3 ++- .../NamingWorstCaseAllInOne/foo/foo.go | 3 ++- .../wire/testdata/NiladicIdentity/foo/wire.go | 3 ++- .../wire/testdata/NiladicValue/foo/wire.go | 3 ++- .../testdata/NoImplicitInterface/foo/wire.go | 3 ++- .../testdata/NoInjectParamNames/foo/wire.go | 3 ++- .../wire/testdata/PartialCleanup/foo/wire.go | 3 ++- .../wire/testdata/PkgImport/foo/wire.go | 3 ++- .../foo/wire.go | 3 ++- .../wire/testdata/RelativePkg/foo/wire.go | 3 ++- .../testdata/ReservedKeywords/foo/wire.go | 3 ++- .../ReturnArgumentAsInterface/foo/wire.go | 3 ++- .../wire/testdata/ReturnError/foo/wire.go | 3 ++- .../internal/wire/testdata/Struct/foo/wire.go | 3 ++- .../testdata/StructNotAStruct/foo/wire.go | 3 ++- .../wire/testdata/StructPointer/foo/wire.go | 3 ++- .../testdata/StructWithPreventTag/foo/wire.go | 3 ++- .../wire/testdata/TwoDeps/foo/wire.go | 3 ++- .../testdata/UnexportedStruct/foo/wire.go | 3 ++- .../wire/testdata/UnexportedValue/foo/wire.go | 3 ++- .../wire/testdata/UnusedProviders/foo/wire.go | 3 ++- .../wire/testdata/ValueChain/foo/wire.go | 3 ++- .../wire/testdata/ValueConversion/foo/wire.go | 3 ++- .../ValueFromFunctionScope/foo/wire.go | 3 ++- .../ValueIsInterfaceValue/foo/wire.go | 3 ++- .../wire/testdata/ValueIsStruct/foo/wire.go | 3 ++- .../wire/testdata/VarValue/foo/wire.go | 3 ++- .../wire/testdata/Varargs/foo/wire.go | 3 ++- pkg/storage/unified/resource/search_test.go | 2 +- .../unified/testing/storage_backend.go | 2 +- 75 files changed, 169 insertions(+), 73 deletions(-) diff --git a/.github/workflows/go-lint.yml b/.github/workflows/go-lint.yml index d352b8f8235..a32c06b55c1 100644 --- a/.github/workflows/go-lint.yml +++ b/.github/workflows/go-lint.yml @@ -33,6 +33,27 @@ jobs: with: self: .github/workflows/go-lint.yml + go-fmt: + needs: detect-changes + if: needs.detect-changes.outputs.changed == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: actions/setup-go@v5.5.0 + with: + go-version-file: ./go.mod + - name: Run gofmt + run: | + GOFMT="$(go list -m -f '{{.Dir}}' | xargs -I{} sh -c 'test ! -f {}/.nolint && echo {}' | xargs gofmt -s -e -l 2>&1 | grep -v '/pkg/build/' || true)" + if [ -n "$GOFMT" ]; then + echo "Found files that are not gofmt'ed" + echo "Run 'gofmt -s -w .' or 'make gofmt' or install the pre-commit hook with 'make lefthook-install'" + echo "${GOFMT}" + exit 1 + fi + lint-go: needs: detect-changes if: needs.detect-changes.outputs.changed == 'true' diff --git a/Makefile b/Makefile index 92c20458a6f..1885015ab18 100644 --- a/Makefile +++ b/Makefile @@ -384,6 +384,10 @@ lint-go-diff: sed 's,^,./,' | \ $(XARGSR) $(golangci-lint) run --config .golangci.yml +.PHONY: gofmt +gofmt: ## Run gofmt for all Go files. + gofmt -s -w . + # with disabled SC1071 we are ignored some TCL,Expect `/usr/bin/env expect` scripts .PHONY: shellcheck shellcheck: $(SH_FILES) ## Run checks for shell scripts. diff --git a/pkg/build/wire/internal/wire/testdata/BindInjectorArg/foo/wire.go b/pkg/build/wire/internal/wire/testdata/BindInjectorArg/foo/wire.go index bd7d773b79b..6e2348e354a 100644 --- a/pkg/build/wire/internal/wire/testdata/BindInjectorArg/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/BindInjectorArg/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/BindInjectorArgPointer/foo/wire.go b/pkg/build/wire/internal/wire/testdata/BindInjectorArgPointer/foo/wire.go index 3fc9ca38046..f4006aec6ee 100644 --- a/pkg/build/wire/internal/wire/testdata/BindInjectorArgPointer/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/BindInjectorArgPointer/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/BindInterfaceWithValue/foo/wire.go b/pkg/build/wire/internal/wire/testdata/BindInterfaceWithValue/foo/wire.go index 54c19ba97b0..e11792a75f3 100644 --- a/pkg/build/wire/internal/wire/testdata/BindInterfaceWithValue/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/BindInterfaceWithValue/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/bar/bar.go b/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/bar/bar.go index 97c2561ba9d..610d527a2fb 100644 --- a/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/bar/bar.go +++ b/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/bar/bar.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build !wireinject +//go:build !wireinject +// +build !wireinject // Package bar includes both wireinject and non-wireinject variants. package bar diff --git a/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/bar/bar_inject.go b/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/bar/bar_inject.go index aa40270918c..b8b541d8df7 100644 --- a/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/bar/bar_inject.go +++ b/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/bar/bar_inject.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package bar diff --git a/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/foo/wire.go b/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/foo/wire.go index 32cc0f80743..6e85c5bd273 100644 --- a/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/BuildTagsAllPackages/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/Chain/foo/wire.go b/pkg/build/wire/internal/wire/testdata/Chain/foo/wire.go index 4106dd8d91f..19e87988007 100644 --- a/pkg/build/wire/internal/wire/testdata/Chain/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/Chain/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/Cleanup/foo/wire.go b/pkg/build/wire/internal/wire/testdata/Cleanup/foo/wire.go index 49867e8c1b1..2e4a8a97ff8 100644 --- a/pkg/build/wire/internal/wire/testdata/Cleanup/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/Cleanup/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/CopyOtherDecls/foo/foo.go b/pkg/build/wire/internal/wire/testdata/CopyOtherDecls/foo/foo.go index e8045b254e8..514519b27dd 100644 --- a/pkg/build/wire/internal/wire/testdata/CopyOtherDecls/foo/foo.go +++ b/pkg/build/wire/internal/wire/testdata/CopyOtherDecls/foo/foo.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject // All of the declarations are in one file. // Wire should copy non-injectors over, preserving imports. diff --git a/pkg/build/wire/internal/wire/testdata/Cycle/foo/wire.go b/pkg/build/wire/internal/wire/testdata/Cycle/foo/wire.go index b89cdff87d2..b32c0d8a154 100644 --- a/pkg/build/wire/internal/wire/testdata/Cycle/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/Cycle/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/DocComment/foo/wire.go b/pkg/build/wire/internal/wire/testdata/DocComment/foo/wire.go index 9a17664592d..bb5462cd03f 100644 --- a/pkg/build/wire/internal/wire/testdata/DocComment/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/DocComment/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/EmptyVar/foo/wire.go b/pkg/build/wire/internal/wire/testdata/EmptyVar/foo/wire.go index f1db1a4db8f..c3ed4421f36 100644 --- a/pkg/build/wire/internal/wire/testdata/EmptyVar/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/EmptyVar/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ExampleWithMocks/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ExampleWithMocks/foo/wire.go index bdec16a6806..258c96278b9 100644 --- a/pkg/build/wire/internal/wire/testdata/ExampleWithMocks/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ExampleWithMocks/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ExportedValue/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ExportedValue/foo/wire.go index 46f7af5bf5f..fb455bcad76 100644 --- a/pkg/build/wire/internal/wire/testdata/ExportedValue/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ExportedValue/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ExportedValueDifferentPackage/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ExportedValueDifferentPackage/foo/wire.go index 1da10a3455b..f51c3076d9b 100644 --- a/pkg/build/wire/internal/wire/testdata/ExportedValueDifferentPackage/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ExportedValueDifferentPackage/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/FieldsOfCycle/foo/wire.go b/pkg/build/wire/internal/wire/testdata/FieldsOfCycle/foo/wire.go index b49dc720a42..6f385096306 100644 --- a/pkg/build/wire/internal/wire/testdata/FieldsOfCycle/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/FieldsOfCycle/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/FieldsOfImportedStruct/main/wire.go b/pkg/build/wire/internal/wire/testdata/FieldsOfImportedStruct/main/wire.go index 15646542ee2..b42acb70c0f 100644 --- a/pkg/build/wire/internal/wire/testdata/FieldsOfImportedStruct/main/wire.go +++ b/pkg/build/wire/internal/wire/testdata/FieldsOfImportedStruct/main/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/FieldsOfStruct/foo/wire.go b/pkg/build/wire/internal/wire/testdata/FieldsOfStruct/foo/wire.go index 7b35bd86b56..de6a11293cd 100644 --- a/pkg/build/wire/internal/wire/testdata/FieldsOfStruct/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/FieldsOfStruct/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/FieldsOfStructDoNotProvidePtrToField/foo/wire.go b/pkg/build/wire/internal/wire/testdata/FieldsOfStructDoNotProvidePtrToField/foo/wire.go index 271ee817094..697e8484764 100644 --- a/pkg/build/wire/internal/wire/testdata/FieldsOfStructDoNotProvidePtrToField/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/FieldsOfStructDoNotProvidePtrToField/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/FieldsOfStructPointer/foo/wire.go b/pkg/build/wire/internal/wire/testdata/FieldsOfStructPointer/foo/wire.go index 04ebb253f10..b3e507daaad 100644 --- a/pkg/build/wire/internal/wire/testdata/FieldsOfStructPointer/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/FieldsOfStructPointer/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/FieldsOfValueStruct/main/wire.go b/pkg/build/wire/internal/wire/testdata/FieldsOfValueStruct/main/wire.go index d8ccb5caaeb..50973ee3424 100644 --- a/pkg/build/wire/internal/wire/testdata/FieldsOfValueStruct/main/wire.go +++ b/pkg/build/wire/internal/wire/testdata/FieldsOfValueStruct/main/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/FuncArgProvider/foo/wire.go b/pkg/build/wire/internal/wire/testdata/FuncArgProvider/foo/wire.go index ae1011bd26c..93561a26718 100644 --- a/pkg/build/wire/internal/wire/testdata/FuncArgProvider/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/FuncArgProvider/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/Header/foo/wire.go b/pkg/build/wire/internal/wire/testdata/Header/foo/wire.go index 4ad2705fc59..91b6bcf8b26 100644 --- a/pkg/build/wire/internal/wire/testdata/Header/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/Header/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ImportedInterfaceBinding/bar/wire.go b/pkg/build/wire/internal/wire/testdata/ImportedInterfaceBinding/bar/wire.go index 952f0753b09..af32bfa8e7a 100644 --- a/pkg/build/wire/internal/wire/testdata/ImportedInterfaceBinding/bar/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ImportedInterfaceBinding/bar/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InjectInput/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InjectInput/foo/wire.go index 0c1bf839fdd..9f2c89d27ea 100644 --- a/pkg/build/wire/internal/wire/testdata/InjectInput/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InjectInput/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InjectInputConflict/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InjectInputConflict/foo/wire.go index 24308cb35b7..36803e8524b 100644 --- a/pkg/build/wire/internal/wire/testdata/InjectInputConflict/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InjectInputConflict/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InjectWithPanic/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InjectWithPanic/foo/wire.go index 349b7746904..b6878192e70 100644 --- a/pkg/build/wire/internal/wire/testdata/InjectWithPanic/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InjectWithPanic/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InjectorMissingCleanup/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InjectorMissingCleanup/foo/wire.go index 932a9fa7914..c93a1808041 100644 --- a/pkg/build/wire/internal/wire/testdata/InjectorMissingCleanup/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InjectorMissingCleanup/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InjectorMissingError/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InjectorMissingError/foo/wire.go index 2dced82e731..33d26ce8fbe 100644 --- a/pkg/build/wire/internal/wire/testdata/InjectorMissingError/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InjectorMissingError/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InterfaceBinding/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InterfaceBinding/foo/wire.go index 250d8adc18e..f647e016a89 100644 --- a/pkg/build/wire/internal/wire/testdata/InterfaceBinding/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InterfaceBinding/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InterfaceBindingDoesntImplement/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InterfaceBindingDoesntImplement/foo/wire.go index 492e3c2a5b7..910d3c6f8da 100644 --- a/pkg/build/wire/internal/wire/testdata/InterfaceBindingDoesntImplement/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InterfaceBindingDoesntImplement/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InterfaceBindingInvalidArg0/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InterfaceBindingInvalidArg0/foo/wire.go index 97f6b77ffdd..05ea89e45a4 100644 --- a/pkg/build/wire/internal/wire/testdata/InterfaceBindingInvalidArg0/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InterfaceBindingInvalidArg0/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InterfaceBindingNotEnoughArgs/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InterfaceBindingNotEnoughArgs/foo/wire.go index 15a3322e589..060e2ba3275 100644 --- a/pkg/build/wire/internal/wire/testdata/InterfaceBindingNotEnoughArgs/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InterfaceBindingNotEnoughArgs/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InterfaceBindingReuse/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InterfaceBindingReuse/foo/wire.go index b342b3b6f16..4c7f71daaf6 100644 --- a/pkg/build/wire/internal/wire/testdata/InterfaceBindingReuse/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InterfaceBindingReuse/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InterfaceValue/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InterfaceValue/foo/wire.go index 5ed782b930d..8c221c36fb2 100644 --- a/pkg/build/wire/internal/wire/testdata/InterfaceValue/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InterfaceValue/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InterfaceValueDoesntImplement/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InterfaceValueDoesntImplement/foo/wire.go index c9ce4a302fc..d6e14b8a908 100644 --- a/pkg/build/wire/internal/wire/testdata/InterfaceValueDoesntImplement/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InterfaceValueDoesntImplement/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InterfaceValueInvalidArg0/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InterfaceValueInvalidArg0/foo/wire.go index 69985206fb5..d937e27b214 100644 --- a/pkg/build/wire/internal/wire/testdata/InterfaceValueInvalidArg0/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InterfaceValueInvalidArg0/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InterfaceValueNotEnoughArgs/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InterfaceValueNotEnoughArgs/foo/wire.go index 8d7b884d461..2d9c4818dba 100644 --- a/pkg/build/wire/internal/wire/testdata/InterfaceValueNotEnoughArgs/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InterfaceValueNotEnoughArgs/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/InvalidInjector/foo/wire.go b/pkg/build/wire/internal/wire/testdata/InvalidInjector/foo/wire.go index 8c67b41e08d..2aae75c709b 100644 --- a/pkg/build/wire/internal/wire/testdata/InvalidInjector/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/InvalidInjector/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/MultipleArgsSameType/foo/wire.go b/pkg/build/wire/internal/wire/testdata/MultipleArgsSameType/foo/wire.go index 22d939c7cd1..c3414c5bbbc 100644 --- a/pkg/build/wire/internal/wire/testdata/MultipleArgsSameType/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/MultipleArgsSameType/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/MultipleBindings/foo/wire.go b/pkg/build/wire/internal/wire/testdata/MultipleBindings/foo/wire.go index 5bc1500b05d..81d8673ce0a 100644 --- a/pkg/build/wire/internal/wire/testdata/MultipleBindings/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/MultipleBindings/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/MultipleMissingInputs/foo/wire.go b/pkg/build/wire/internal/wire/testdata/MultipleMissingInputs/foo/wire.go index de8c23907a7..68a6ce0adc5 100644 --- a/pkg/build/wire/internal/wire/testdata/MultipleMissingInputs/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/MultipleMissingInputs/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/MultipleSimilarPackages/main/wire.go b/pkg/build/wire/internal/wire/testdata/MultipleSimilarPackages/main/wire.go index fb501789ed4..3a8d02b21e3 100644 --- a/pkg/build/wire/internal/wire/testdata/MultipleSimilarPackages/main/wire.go +++ b/pkg/build/wire/internal/wire/testdata/MultipleSimilarPackages/main/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/NamingWorstCase/foo/wire.go b/pkg/build/wire/internal/wire/testdata/NamingWorstCase/foo/wire.go index 78cc79105f0..ca2d14ca594 100644 --- a/pkg/build/wire/internal/wire/testdata/NamingWorstCase/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/NamingWorstCase/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/NamingWorstCaseAllInOne/foo/foo.go b/pkg/build/wire/internal/wire/testdata/NamingWorstCaseAllInOne/foo/foo.go index 0c814f01bef..7f4b32e9a0e 100644 --- a/pkg/build/wire/internal/wire/testdata/NamingWorstCaseAllInOne/foo/foo.go +++ b/pkg/build/wire/internal/wire/testdata/NamingWorstCaseAllInOne/foo/foo.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject // This file is specifically designed to cause issues with copying the // AST, particularly with the identifier "context". diff --git a/pkg/build/wire/internal/wire/testdata/NiladicIdentity/foo/wire.go b/pkg/build/wire/internal/wire/testdata/NiladicIdentity/foo/wire.go index 0570bb2a3bd..7df0fda0aa5 100644 --- a/pkg/build/wire/internal/wire/testdata/NiladicIdentity/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/NiladicIdentity/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/NiladicValue/foo/wire.go b/pkg/build/wire/internal/wire/testdata/NiladicValue/foo/wire.go index 50e62af7d3f..d4e3b817299 100644 --- a/pkg/build/wire/internal/wire/testdata/NiladicValue/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/NiladicValue/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/NoImplicitInterface/foo/wire.go b/pkg/build/wire/internal/wire/testdata/NoImplicitInterface/foo/wire.go index f4cd412752d..30463e15f5e 100644 --- a/pkg/build/wire/internal/wire/testdata/NoImplicitInterface/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/NoImplicitInterface/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/NoInjectParamNames/foo/wire.go b/pkg/build/wire/internal/wire/testdata/NoInjectParamNames/foo/wire.go index 758cb5fb093..49c5bd7ea5d 100644 --- a/pkg/build/wire/internal/wire/testdata/NoInjectParamNames/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/NoInjectParamNames/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/PartialCleanup/foo/wire.go b/pkg/build/wire/internal/wire/testdata/PartialCleanup/foo/wire.go index 5d52e9243c7..2f6ba1e5756 100644 --- a/pkg/build/wire/internal/wire/testdata/PartialCleanup/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/PartialCleanup/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/PkgImport/foo/wire.go b/pkg/build/wire/internal/wire/testdata/PkgImport/foo/wire.go index 4f9c9d9a7ba..b7d7a58d37a 100644 --- a/pkg/build/wire/internal/wire/testdata/PkgImport/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/PkgImport/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ProviderSetBindingMissingConcreteType/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ProviderSetBindingMissingConcreteType/foo/wire.go index 2e765205481..1e6567663b2 100644 --- a/pkg/build/wire/internal/wire/testdata/ProviderSetBindingMissingConcreteType/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ProviderSetBindingMissingConcreteType/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/RelativePkg/foo/wire.go b/pkg/build/wire/internal/wire/testdata/RelativePkg/foo/wire.go index 0570bb2a3bd..7df0fda0aa5 100644 --- a/pkg/build/wire/internal/wire/testdata/RelativePkg/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/RelativePkg/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ReservedKeywords/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ReservedKeywords/foo/wire.go index c375ee159f7..6c54496eb52 100644 --- a/pkg/build/wire/internal/wire/testdata/ReservedKeywords/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ReservedKeywords/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ReturnArgumentAsInterface/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ReturnArgumentAsInterface/foo/wire.go index fb79f9ceb41..d311052cf63 100644 --- a/pkg/build/wire/internal/wire/testdata/ReturnArgumentAsInterface/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ReturnArgumentAsInterface/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ReturnError/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ReturnError/foo/wire.go index a729e826273..56d379b986a 100644 --- a/pkg/build/wire/internal/wire/testdata/ReturnError/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ReturnError/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/Struct/foo/wire.go b/pkg/build/wire/internal/wire/testdata/Struct/foo/wire.go index 29ef937ddfc..4ec713fe569 100644 --- a/pkg/build/wire/internal/wire/testdata/Struct/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/Struct/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/StructNotAStruct/foo/wire.go b/pkg/build/wire/internal/wire/testdata/StructNotAStruct/foo/wire.go index 7a84cdb9dcb..068b6fa2f2e 100644 --- a/pkg/build/wire/internal/wire/testdata/StructNotAStruct/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/StructNotAStruct/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/StructPointer/foo/wire.go b/pkg/build/wire/internal/wire/testdata/StructPointer/foo/wire.go index c08f942eb8b..2554df47944 100644 --- a/pkg/build/wire/internal/wire/testdata/StructPointer/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/StructPointer/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/StructWithPreventTag/foo/wire.go b/pkg/build/wire/internal/wire/testdata/StructWithPreventTag/foo/wire.go index 5e0d5800859..0ad39062cf6 100644 --- a/pkg/build/wire/internal/wire/testdata/StructWithPreventTag/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/StructWithPreventTag/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/TwoDeps/foo/wire.go b/pkg/build/wire/internal/wire/testdata/TwoDeps/foo/wire.go index 4106dd8d91f..19e87988007 100644 --- a/pkg/build/wire/internal/wire/testdata/TwoDeps/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/TwoDeps/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/UnexportedStruct/foo/wire.go b/pkg/build/wire/internal/wire/testdata/UnexportedStruct/foo/wire.go index e0b4618c316..e15b4d88acc 100644 --- a/pkg/build/wire/internal/wire/testdata/UnexportedStruct/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/UnexportedStruct/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/UnexportedValue/foo/wire.go b/pkg/build/wire/internal/wire/testdata/UnexportedValue/foo/wire.go index a26cbf97b25..7fd5280932b 100644 --- a/pkg/build/wire/internal/wire/testdata/UnexportedValue/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/UnexportedValue/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/UnusedProviders/foo/wire.go b/pkg/build/wire/internal/wire/testdata/UnusedProviders/foo/wire.go index 681b80d10ff..1adae2b9d05 100644 --- a/pkg/build/wire/internal/wire/testdata/UnusedProviders/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/UnusedProviders/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ValueChain/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ValueChain/foo/wire.go index 4106dd8d91f..19e87988007 100644 --- a/pkg/build/wire/internal/wire/testdata/ValueChain/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ValueChain/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ValueConversion/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ValueConversion/foo/wire.go index a389be1b630..9a2b672648d 100644 --- a/pkg/build/wire/internal/wire/testdata/ValueConversion/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ValueConversion/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ValueFromFunctionScope/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ValueFromFunctionScope/foo/wire.go index e2ca3f2f3e4..8fa89493472 100644 --- a/pkg/build/wire/internal/wire/testdata/ValueFromFunctionScope/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ValueFromFunctionScope/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ValueIsInterfaceValue/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ValueIsInterfaceValue/foo/wire.go index eb548fa1f00..282e6f9f041 100644 --- a/pkg/build/wire/internal/wire/testdata/ValueIsInterfaceValue/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ValueIsInterfaceValue/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/ValueIsStruct/foo/wire.go b/pkg/build/wire/internal/wire/testdata/ValueIsStruct/foo/wire.go index 51633dd0626..27620781ea0 100644 --- a/pkg/build/wire/internal/wire/testdata/ValueIsStruct/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/ValueIsStruct/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/VarValue/foo/wire.go b/pkg/build/wire/internal/wire/testdata/VarValue/foo/wire.go index e8a718a2e26..6b2e219aca6 100644 --- a/pkg/build/wire/internal/wire/testdata/VarValue/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/VarValue/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/build/wire/internal/wire/testdata/Varargs/foo/wire.go b/pkg/build/wire/internal/wire/testdata/Varargs/foo/wire.go index 33d7acc5f45..0843aef8f68 100644 --- a/pkg/build/wire/internal/wire/testdata/Varargs/foo/wire.go +++ b/pkg/build/wire/internal/wire/testdata/Varargs/foo/wire.go @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -//+build wireinject +//go:build wireinject +// +build wireinject package main diff --git a/pkg/storage/unified/resource/search_test.go b/pkg/storage/unified/resource/search_test.go index 45c32f2e462..091110f2c4e 100644 --- a/pkg/storage/unified/resource/search_test.go +++ b/pkg/storage/unified/resource/search_test.go @@ -382,7 +382,7 @@ func TestSearchGetOrCreateIndexWithIndexUpdate(t *testing.T) { buildEmptyIndexCalls: []buildEmptyIndexCall{}, cache: map[NamespacedResource]ResourceIndex{ - NamespacedResource{Namespace: "ns", Group: "group", Resource: "bad"}: &MockResourceIndex{ + {Namespace: "ns", Group: "group", Resource: "bad"}: &MockResourceIndex{ updateIndexError: failedErr, }, }, diff --git a/pkg/storage/unified/testing/storage_backend.go b/pkg/storage/unified/testing/storage_backend.go index 5488b44a144..4ae283c1f38 100644 --- a/pkg/storage/unified/testing/storage_backend.go +++ b/pkg/storage/unified/testing/storage_backend.go @@ -524,7 +524,7 @@ func runTestIntegrationBackendListModifiedSince(t *testing.T, backend resource.S require.GreaterOrEqual(t, latestRv, rvDeleted) counter := 0 - for _, _ = range seq { + for range seq { counter++ } require.Equal(t, 0, counter) // no events should be returned