deleted pkg/repocli/go.mod pkg/repocli/go.sum; some updates

This commit is contained in:
2026-03-02 11:07:41 +02:00
parent 0eab0ad13d
commit 2d34ec5634
5 changed files with 44 additions and 37 deletions
+4 -4
View File
@@ -26,6 +26,7 @@ import (
const (
indexMediaType = "application/vnd.oci.image.index.v1+json"
manifestMediaType = "application/vnd.oci.image.manifest.v1+json"
)
func (cli *Client) ImageManifest(ctx context.Context, imagepath string) (any, error) {
@@ -90,16 +91,15 @@ func (cli *Client) ImageManifest(ctx context.Context, imagepath string) (any, er
return res, err
}
res = index
case manifestMediaType:
//case manifestMediaType:
default:
var manifest ocispec.Manifest
err = json.Unmarshal(manifestBytes, &manifest)
if err != nil {
return res, err
}
res = &manifest
default:
err = fmt.Errorf("Unknown media type: %s", descr.MediaType)
fmt.Printf("Unknown or empty media type: %s", descr.MediaType)
}
return res, err
}