Skip to content

Commit b181f45

Browse files
authored
Merge pull request #284 from mtrmac/mime-constants
Use available constants for MIME types instead of string literals
2 parents 4a53078 + f31dfa3 commit b181f45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

image/internal/image/docker_schema1.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func (m *manifestSchema1) convertToManifestSchema2(_ context.Context, options *t
202202
d = layerDiffIDs[v2Index]
203203
}
204204
layers = append(layers, manifest.Schema2Descriptor{
205-
MediaType: "application/vnd.docker.image.rootfs.diff.tar.gzip",
205+
MediaType: manifest.DockerV2Schema2LayerMediaType,
206206
Size: size,
207207
Digest: m.m.FSLayers[v1Index].BlobSum,
208208
})
@@ -217,7 +217,7 @@ func (m *manifestSchema1) convertToManifestSchema2(_ context.Context, options *t
217217
return nil, err
218218
}
219219
configDescriptor := manifest.Schema2Descriptor{
220-
MediaType: "application/vnd.docker.container.image.v1+json",
220+
MediaType: manifest.DockerV2Schema2ConfigMediaType,
221221
Size: int64(len(configJSON)),
222222
Digest: digest.FromBytes(configJSON),
223223
}

0 commit comments

Comments
 (0)