From 9497b2254ce516d54649592c22a2338dcb2300eb Mon Sep 17 00:00:00 2001 From: Šimon Lukašík Date: Mon, 5 Nov 2018 18:59:57 +0100 Subject: Lint: InspectImage varlink api should return errors that occurred MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not just nil. Addressing: pkg/varlinkapi/images.go:273:15:warning: ineffectual assignment to err (ineffassign) Signed-off-by: Šimon Lukašík --- pkg/varlinkapi/images.go | 3 +++ 1 file changed, 3 insertions(+) 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")) -- cgit v1.2.3-54-g00ecf