diff --git a/specs-go/v1/layout.go b/specs-go/v1/layout.go index a54a461c5..c44486bfb 100644 --- a/specs-go/v1/layout.go +++ b/specs-go/v1/layout.go @@ -14,8 +14,15 @@ package v1 +import "regexp" + // ImageLayout is the structure in the "oci-layout" file, found in the root // of an OCI Image-layout directory. type ImageLayout struct { Version string `json:"imageLayoutVersion"` } + +var ( + // RefsRegexp matches requirement of image-layout 'refs' charset. + RefsRegexp = regexp.MustCompile(`^[a-zA-Z0-9-._]+$`) +)