Skip to content

image: enable gofumpt formatter#457

Merged
mtrmac merged 4 commits into
podman-container-tools:mainfrom
Luap99:gofumpt
Nov 11, 2025
Merged

image: enable gofumpt formatter#457
mtrmac merged 4 commits into
podman-container-tools:mainfrom
Luap99:gofumpt

Conversation

@Luap99

@Luap99 Luap99 commented Nov 11, 2025

Copy link
Copy Markdown
Member

common and storage already use gofumpt. enable it for image based on the
outcome from our community discussion[1]. And it makes this repo use the
same formatter consistently which is nice.

[1] podman-container-tools/podman#27291

common and storage already use gofumpt. enable it for image based on the
outcome from our community discussion[1]. And it makes this repo use the
same formatter consistently which is nice.

[1] podman-container-tools/podman#27291

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@Luap99 Luap99 requested a review from mtrmac November 11, 2025 11:55
@github-actions github-actions Bot added the image Related to "image" package label Nov 11, 2025
podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Nov 11, 2025
@podmanbot

Copy link
Copy Markdown

✅ A new PR has been created in buildah to vendor these changes: podman-container-tools/buildah#6493

@mtrmac mtrmac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

(Note to self: I didn’t review all the changes, hopefully that can be verified by re-formatting and comparing.)

Comment thread image/docker/daemon/daemon_dest.go Outdated
if sys != nil && sys.DockerDaemonHost != client.DefaultDockerHost {
mustMatchRuntimeOS = false
}
mustMatchRuntimeOS := sys != nil && sys.DockerDaemonHost != client.DefaultDockerHost

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks incorrect

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yes I just copy pasted without thinking about it to much but true/false is inverted here

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switched to sys == nil || sys.DockerDaemonHost == client.DefaultDockerHost which I think is the right logic?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. (It wouldn’t be too bad to do

connectsToDifferentHost := sys != nil && sys.DockerDaemonHost != client.DefaultDockerHost
mustMatchRuntimeOS := !connectsToDifferentHost

to self-document what the decision is about.)

Comment thread image/.golangci.yml
This was uncovered by the gofumpt changes it seems.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Add simple fmt target to run golangci-lint fmt to format the source
tree.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
@github-actions github-actions Bot added storage Related to "storage" package common Related to "common" package labels Nov 11, 2025
podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Nov 11, 2025

@mtrmac mtrmac left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, let’s get this in quickly, this would be a pain to rebase.

Thanks!

@mtrmac mtrmac merged commit 36964d1 into podman-container-tools:main Nov 11, 2025
38 checks passed
@Luap99 Luap99 deleted the gofumpt branch November 11, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to "common" package image Related to "image" package storage Related to "storage" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants