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:
		
							parent
							
								
									9f8f9a0d1b
								
							
						
					
					
						commit
						9497b2254c
					
				| 
						 | 
				
			
			@ -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"))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue