daemon/images/image_import.go
Method ImageService.ImportImage
has 54 lines of code (exceeds 50 allowed). Consider refactoring. Open
Open
func (i *ImageService) ImportImage(ctx context.Context, newRef reference.Named, platform *ocispec.Platform, msg string, layerReader io.Reader, changes []string) (image.ID, error) {
if platform == nil {
def := platforms.DefaultSpec()
platform = &def
}
Method ImageService.ImportImage
has 8 return statements (exceeds 4 allowed). Open
Open
func (i *ImageService) ImportImage(ctx context.Context, newRef reference.Named, platform *ocispec.Platform, msg string, layerReader io.Reader, changes []string) (image.ID, error) {
if platform == nil {
def := platforms.DefaultSpec()
platform = &def
}
Method ImageService.ImportImage
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (i *ImageService) ImportImage(ctx context.Context, newRef reference.Named, platform *ocispec.Platform, msg string, layerReader io.Reader, changes []string) (image.ID, error) {