enable gofumpt formatter

Based on our discussion gofumpt won the vote so use that one via
golangci-lint.

https://github.com/containers/podman/discussions/27291

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2025-11-11 12:12:42 +01:00
parent 2555b8b413
commit 5c1ed12d8d
389 changed files with 1228 additions and 1600 deletions

View File

@@ -781,7 +781,7 @@ func (p *PodmanTestIntegration) RunTopContainer(name string) *PodmanSessionInteg
// runs top. If the name passed != "", it will have a name, command args can also be passed in
func (p *PodmanTestIntegration) RunTopContainerWithArgs(name string, args []string) *PodmanSessionIntegration {
// In proxy environment, some tests need to the --http-proxy=false option (#16684)
var podmanArgs = []string{"run", "--http-proxy=false"}
podmanArgs := []string{"run", "--http-proxy=false"}
if name != "" {
podmanArgs = append(podmanArgs, "--name", name)
}
@@ -800,7 +800,7 @@ func (p *PodmanTestIntegration) RunTopContainerWithArgs(name string, args []stri
// RunLsContainer runs a simple container in the background that
// simply runs ls. If the name passed != "", it will have a name
func (p *PodmanTestIntegration) RunLsContainer(name string) (*PodmanSessionIntegration, int, string) {
var podmanArgs = []string{"run"}
podmanArgs := []string{"run"}
if name != "" {
podmanArgs = append(podmanArgs, "--name", name)
}
@@ -819,7 +819,7 @@ func (p *PodmanTestIntegration) RunLsContainer(name string) (*PodmanSessionInteg
// RunNginxWithHealthCheck runs the alpine nginx container with an optional name and adds a healthcheck into it
func (p *PodmanTestIntegration) RunNginxWithHealthCheck(name string) (*PodmanSessionIntegration, string) {
var podmanArgs = []string{"run"}
podmanArgs := []string{"run"}
if name != "" {
podmanArgs = append(podmanArgs, "--name", name)
}
@@ -832,7 +832,7 @@ func (p *PodmanTestIntegration) RunNginxWithHealthCheck(name string) (*PodmanSes
// RunContainerWithNetworkTest runs the fedoraMinimal curl with the specified network mode.
func (p *PodmanTestIntegration) RunContainerWithNetworkTest(mode string) *PodmanSessionIntegration {
var podmanArgs = []string{"run"}
podmanArgs := []string{"run"}
if mode != "" {
podmanArgs = append(podmanArgs, "--network", mode)
}
@@ -842,7 +842,7 @@ func (p *PodmanTestIntegration) RunContainerWithNetworkTest(mode string) *Podman
}
func (p *PodmanTestIntegration) RunLsContainerInPod(name, pod string) (*PodmanSessionIntegration, int, string) {
var podmanArgs = []string{"run", "--pod", pod}
podmanArgs := []string{"run", "--pod", pod}
if name != "" {
podmanArgs = append(podmanArgs, "--name", name)
}
@@ -1003,7 +1003,7 @@ func (s *PodmanSessionIntegration) InspectPodArrToJSON() []define.InspectPodData
// CreatePod creates a pod with no infra container
// it optionally takes a pod name
func (p *PodmanTestIntegration) CreatePod(options map[string][]string) (*PodmanSessionIntegration, int, string) {
var args = []string{"pod", "create", "--infra=false", "--share", ""}
args := []string{"pod", "create", "--infra=false", "--share", ""}
for k, values := range options {
for _, v := range values {
args = append(args, k+"="+v)
@@ -1016,7 +1016,7 @@ func (p *PodmanTestIntegration) CreatePod(options map[string][]string) (*PodmanS
}
func (p *PodmanTestIntegration) CreateVolume(options map[string][]string) (*PodmanSessionIntegration, int, string) {
var args = []string{"volume", "create"}
args := []string{"volume", "create"}
for k, values := range options {
for _, v := range values {
args = append(args, k+"="+v)
@@ -1379,8 +1379,10 @@ func (p *PodmanTestIntegration) makeOptions(args []string, options PodmanExecOpt
podmanOptions = append(podmanOptions, strings.Split(p.StorageOptions, " ")...)
if !options.NoCache {
cacheOptions := []string{"--storage-opt",
fmt.Sprintf("%s.imagestore=%s", p.PodmanTest.ImageCacheFS, p.PodmanTest.ImageCacheDir)}
cacheOptions := []string{
"--storage-opt",
fmt.Sprintf("%s.imagestore=%s", p.PodmanTest.ImageCacheFS, p.PodmanTest.ImageCacheDir),
}
podmanOptions = append(cacheOptions, podmanOptions...)
}
podmanOptions = append(podmanOptions, args...)