working commit
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package auxoci
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
|
||||
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
|
||||
)
|
||||
|
||||
func ParseOCIManifest(source []byte) (*ocispec.Manifest, error) {
|
||||
manifest := &ocispec.Manifest{}
|
||||
err := json.Unmarshal(source, &manifest)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Manifest parsing error: %v", err)
|
||||
return manifest, err
|
||||
}
|
||||
return manifest, err
|
||||
}
|
||||
Reference in New Issue
Block a user