mirror of
https://github.com/containers/podman.git
synced 2025-06-22 01:48:54 +08:00
Lint: InspectImage varlink api should return errors that occurred
Not just nil.
Addressing:
pkg/varlinkapi/images.go:273:15⚠️ ineffectual assignment to err (ineffassign)
Signed-off-by: Šimon Lukašík <slukasik@redhat.com>
This commit is contained in:
@ -271,6 +271,9 @@ func (i *LibpodAPI) InspectImage(call iopodman.VarlinkCall, name string) error {
|
||||
return call.ReplyImageNotFound(name)
|
||||
}
|
||||
inspectInfo, err := newImage.Inspect(getContext())
|
||||
if err != nil {
|
||||
return call.ReplyErrorOccurred(err.Error())
|
||||
}
|
||||
b, err := json.Marshal(inspectInfo)
|
||||
if err != nil {
|
||||
return call.ReplyErrorOccurred(fmt.Sprintf("unable to serialize"))
|
||||
|
Reference in New Issue
Block a user