image/oci.go
func (m *manifestOCI1) OCIConfig(ctx context.Context) (*imgspecv1.Image, error) {
	cb, err := m.ConfigBlob(ctx)
	if err != nil {
		return nil, err
	}
	configOCI := &imgspecv1.Image{}
	if err := json.Unmarshal(cb, configOCI); err != nil {
		return nil, err
	}
	return configOCI, nil
}
func (m *manifestOCI1) OCIConfig(ctx context.Context) (*imgspecv1.Image, error) {
	cb, err := m.ConfigBlob(ctx)
	if err != nil {
		return nil, err
	}
	configOCI := &imgspecv1.Image{}
	if err := json.Unmarshal(cb, configOCI); err != nil {
		return nil, err
	}
	return configOCI, nil
}
func ( m * manifestOCI1 ) OCIConfig ( ctx context . Context ) ( * imgspecv1 . Image , error ) { cb , err := m . ConfigBlob ( ctx ) if err != nil { return nil , err } configOCI := & imgspecv1 . Image { } if err := json . Unmarshal ( cb , configOCI ) ; err != nil { return nil , err } return configOCI , nil }
// OCIConfig returns the image configuration as per OCI v1 image-spec. Information about
// layers in the resulting configuration isn't guaranteed to be returned to due how
// old image manifests work (docker v2s1 especially).
OCIConfig returns the image configuration as per OCI v1 image - spec . Information about layers in the resulting configuration isn t guaranteed to be returned to due how old image manifests work ( docker v2s1 especially ) .