Remove err nil check
since type checking nil will not panic and return appropriately Signed-off-by: Manish Tomar <manish.tomar@docker.com>master
							parent
							
								
									da8db4666b
								
							
						
					
					
						commit
						48818fdea7
					
				|  | @ -98,7 +98,6 @@ func MarkAndSweep(ctx context.Context, storageDriver driver.StorageDriver, regis | ||||||
| 			return nil | 			return nil | ||||||
| 		}) | 		}) | ||||||
| 
 | 
 | ||||||
| 		if err != nil { |  | ||||||
| 		// In certain situations such as unfinished uploads, deleting all
 | 		// In certain situations such as unfinished uploads, deleting all
 | ||||||
| 		// tags in S3 or removing the _manifests folder manually, this
 | 		// tags in S3 or removing the _manifests folder manually, this
 | ||||||
| 		// error may be of type PathNotFound.
 | 		// error may be of type PathNotFound.
 | ||||||
|  | @ -107,7 +106,6 @@ func MarkAndSweep(ctx context.Context, storageDriver driver.StorageDriver, regis | ||||||
| 		if _, ok := err.(driver.PathNotFoundError); ok { | 		if _, ok := err.(driver.PathNotFoundError); ok { | ||||||
| 			return nil | 			return nil | ||||||
| 		} | 		} | ||||||
| 		} |  | ||||||
| 
 | 
 | ||||||
| 		return err | 		return err | ||||||
| 	}) | 	}) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue