(ctx context.Context, client registryclient.RegistryClient, ref reference.Named, blobs []manifestBlob)
| 275 | } |
| 276 | |
| 277 | func mountBlobs(ctx context.Context, client registryclient.RegistryClient, ref reference.Named, blobs []manifestBlob) error { |
| 278 | for _, blob := range blobs { |
| 279 | err := client.MountBlob(ctx, blob.canonical, ref) |
| 280 | switch err.(type) { |
| 281 | case nil: |
| 282 | case registryclient.ErrBlobCreated: |
| 283 | if blob.os != "windows" { |
| 284 | return fmt.Errorf("error mounting %s to %s", blob.canonical, ref) |
| 285 | } |
| 286 | default: |
| 287 | return err |
| 288 | } |
| 289 | } |
| 290 | return nil |
| 291 | } |