aboutsummaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/images.go
diff options
context:
space:
mode:
authorŠimon Lukašík <slukasik@redhat.com>2018-11-05 18:59:57 +0100
committerŠimon Lukašík <slukasik@redhat.com>2018-11-10 10:52:24 +0100
commit9497b2254ce516d54649592c22a2338dcb2300eb (patch)
tree2d494e937b1d098c54d5dcde4879487208bcfca8 /pkg/varlinkapi/images.go
parent9f8f9a0d1b59eddc15ba3523f55e6d3cc872822e (diff)
downloadpodman-9497b2254ce516d54649592c22a2338dcb2300eb.tar.gz
podman-9497b2254ce516d54649592c22a2338dcb2300eb.tar.bz2
podman-9497b2254ce516d54649592c22a2338dcb2300eb.zip
Lint: InspectImage varlink api should return errors that occurred
Not just nil. Addressing: pkg/varlinkapi/images.go:273:15:warning: ineffectual assignment to err (ineffassign) Signed-off-by: Šimon Lukašík <slukasik@redhat.com>
Diffstat (limited to 'pkg/varlinkapi/images.go')
-rw-r--r--pkg/varlinkapi/images.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index d14c61c39..42e285b53 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -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"))