client rebuilding in progress

This commit is contained in:
2026-03-04 12:27:52 +02:00
parent 2d34ec5634
commit ae9c29de1e
31 changed files with 908 additions and 467 deletions
+5 -5
View File
@@ -12,9 +12,9 @@ import (
const (
MediaTypeOIIv1 = "application/vnd.oci.image.index.v1+json"
MediatypeDDMLv2 = "application/vnd.docker.distribution.manifest.list.v2+json"
MediaTypeDDMLv2 = "application/vnd.docker.distribution.manifest.list.v2+json"
MediatypeDDMv2 = "application/vnd.docker.distribution.manifest.v2+json"
MediaTypeDDMv2 = "application/vnd.docker.distribution.manifest.v2+json"
MediaTypeOIMv1 = "application/vnd.oci.image.manifest.v1+json"
)
@@ -30,7 +30,7 @@ func NewDownloader(client *Client) *Downloader {
func (down *Downloader) Pull(ctx context.Context, rawref, dir, os, arch string) error {
var err error
ref, err := NewReference(rawref)
ref, err := ParseReference(rawref)
if err != nil {
return err
}
@@ -46,7 +46,7 @@ func (down *Downloader) Pull(ctx context.Context, rawref, dir, os, arch string)
return err
}
if mime == MediaTypeOIIv1 || mime == MediatypeDDMLv2 {
if mime == MediaTypeOIIv1 || mime == MediaTypeDDMLv2 {
var index ocispec.Index
err = json.Unmarshal(man, &index)
if err != nil {
@@ -72,7 +72,7 @@ func (down *Downloader) Pull(ctx context.Context, rawref, dir, os, arch string)
err = errors.New("Manifest not found")
return err
}
if mime != MediaTypeOIMv1 && mime != MediatypeDDMv2 {
if mime != MediaTypeOIMv1 && mime != MediaTypeDDMv2 {
err = errors.New("Unknown manifest media type")
return err
}