code: func imageWithDigestString(image string, dgst digest.Digest) string {
  	namedRef, err := reference.ParseNormalizedNamed(image)
  	if err == nil {
  		if _, isCanonical := namedRef.(reference.Canonical); !isCanonical {
  			// ensure that image gets a default tag if none is provided
  			img, err := reference.WithDigest(namedRef, dgst)
  			if err == nil {
  				return reference.FamiliarString(img)
  			}
  		}
  	}
  	return ""
  }
docs: // imageWithDigestString takes an image string and a digest, and updates
  // the image string if it didn't originally contain a digest. It returns
  // an empty string if there are no updates.