From 48b5efee03a45a6e56baeb9c9fbbcfa79c37c479 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 17 Mar 2024 13:48:13 +0100 Subject: [PATCH] Dockerfile: update mvdan/gofumpt to v0.6.0 - full diff: https://github.com/mvdan/gofumpt/compare/v0.4.0...v0.6.0 - v0.6.0 release notes: https://github.com/mvdan/gofumpt/releases/tag/v0.6.0 - v0.5.0 release notes: https://github.com/mvdan/gofumpt/releases/tag/v0.5.0 Signed-off-by: Sebastiaan van Stijn --- Makefile | 2 +- cli/command/image/build/context_test.go | 1 - cli/command/plugin/create.go | 1 - dockerfiles/Dockerfile.dev | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index f19fa8df77..8469c60318 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ shellcheck: ## run shellcheck validation .PHONY: fmt fmt: ## run gofumpt (if present) or gofmt @if command -v gofumpt > /dev/null; then \ - gofumpt -w -d -lang=1.19 . ; \ + gofumpt -w -d -lang=1.21 . ; \ else \ go list -f {{.Dir}} ./... | xargs gofmt -w -s -d ; \ fi diff --git a/cli/command/image/build/context_test.go b/cli/command/image/build/context_test.go index 071a0f30ce..e49af167a6 100644 --- a/cli/command/image/build/context_test.go +++ b/cli/command/image/build/context_test.go @@ -129,7 +129,6 @@ func TestGetContextFromReaderString(t *testing.T) { tarReader := tar.NewReader(tarArchive) _, err = tarReader.Next() - if err != nil { t.Fatalf("Error when reading tar archive: %s", err) } diff --git a/cli/command/plugin/create.go b/cli/command/plugin/create.go index 3b23734ae5..c81bab3338 100644 --- a/cli/command/plugin/create.go +++ b/cli/command/plugin/create.go @@ -114,7 +114,6 @@ func runCreate(ctx context.Context, dockerCli command.Cli, options pluginCreateO createCtx, err = archive.TarWithOptions(absContextDir, &archive.TarOptions{ Compression: compression, }) - if err != nil { return err } diff --git a/dockerfiles/Dockerfile.dev b/dockerfiles/Dockerfile.dev index 0f86448640..3c437eeccc 100644 --- a/dockerfiles/Dockerfile.dev +++ b/dockerfiles/Dockerfile.dev @@ -11,7 +11,7 @@ ENV GOTOOLCHAIN=local ENV CGO_ENABLED=0 FROM golang AS gofumpt -ARG GOFUMPT_VERSION=v0.4.0 +ARG GOFUMPT_VERSION=v0.6.0 RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/go/pkg/mod \ --mount=type=tmpfs,target=/go/src/ \