Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: manage podman inspect result as a list also #7269

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions pkg/podman/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@
return PodInspectData{}, err
}

var result PodInspectData
var result []PodInspectData
if err := json.Unmarshal(out, &result); err != nil {

Check failure on line 38 in pkg/podman/inspect.go

View workflow job for this annotation

GitHub Actions / validate

shadow: declaration of "err" shadows declaration at line 29 (govet)
var singleResult PodInspectData
err = json.Unmarshal(out, &singleResult)
return singleResult, err
}

err = json.Unmarshal(out, &result)
return result, err
return result[0], err
}
Loading