signature/policy_config.go
func newPRMExactReference(dockerReference string) (*prmExactReference, error) {
	ref, err := reference.ParseNormalizedNamed(dockerReference)
	if err != nil {
		return nil, InvalidPolicyFormatError(fmt.Sprintf("Invalid format of dockerReference %s: %s", dockerReference, err.Error()))
	}
	if reference.IsNameOnly(ref) {
		return nil, InvalidPolicyFormatError(fmt.Sprintf("dockerReference %s contains neither a tag nor digest", dockerReference))
	}
	return &prmExactReference{
		prmCommon:       prmCommon{Type: prmTypeExactReference},
		DockerReference: dockerReference,
	}, nil
}
func newPRMExactReference(dockerReference string) (*prmExactReference, error) {
	ref, err := reference.ParseNormalizedNamed(dockerReference)
	if err != nil {
		return nil, InvalidPolicyFormatError(fmt.Sprintf("Invalid format of dockerReference %s: %s", dockerReference, err.Error()))
	}
	if reference.IsNameOnly(ref) {
		return nil, InvalidPolicyFormatError(fmt.Sprintf("dockerReference %s contains neither a tag nor digest", dockerReference))
	}
	return &prmExactReference{
		prmCommon:       prmCommon{Type: prmTypeExactReference},
		DockerReference: dockerReference,
	}, nil
}
func newPRMExactReference ( dockerReference string ) ( * prmExactReference , error ) { ref , err := reference . ParseNormalizedNamed ( dockerReference ) if err != nil { return nil , InvalidPolicyFormatError ( fmt . Sprintf ( " " , dockerReference , err . Error ( ) ) ) } if reference . IsNameOnly ( ref ) { return nil , InvalidPolicyFormatError ( fmt . Sprintf ( " " , dockerReference ) ) } return & prmExactReference { prmCommon : prmCommon { Type : prmTypeExactReference } , DockerReference : dockerReference , } , nil }
// newPRMExactReference is NewPRMExactReference, except it resturns the private type.
newPRMExactReference is NewPRMExactReference except it resturns the private type .