code: func Decode(in string) (image Image, err error) {
  	repo, tag := parseRepositoryTag(in)
  	image.Registry, image.Repository = splitRepository(repo)
  
  	if strings.Contains(tag, ":") {
  		image.Digest = tag
  	} else {
  		image.Tag = tag
  	}
  
  	if image.Repository == "" {
  		err = ErrInvalidImage
  		return
  	}
  
  	return
  }
docs: // Decode decodes the string representation of an image into an Image structure.