(imgRefAndAuth trust.ImageRefAndAuth)
| 133 | } |
| 134 | |
| 135 | func validateTag(imgRefAndAuth trust.ImageRefAndAuth) error { |
| 136 | tag := imgRefAndAuth.Tag() |
| 137 | if tag == "" { |
| 138 | if imgRefAndAuth.Digest() != "" { |
| 139 | return errors.New("cannot use a digest reference for IMAGE:TAG") |
| 140 | } |
| 141 | return fmt.Errorf("no tag specified for %s", imgRefAndAuth.Name()) |
| 142 | } |
| 143 | return nil |
| 144 | } |
| 145 | |
| 146 | func checkLocalImageExistence(ctx context.Context, apiClient client.APIClient, imageName string) error { |
| 147 | _, err := apiClient.ImageInspect(ctx, imageName) |
no test coverage detected
searching dependent graphs…