code: func ParseImageName(image string) (string, string, string, error) {
  	named, err := dockerref.ParseNormalizedNamed(image)
  	if err != nil {
  		return "", "", "", fmt.Errorf("couldn't parse image name: %v", err)
  	}
  
  	repoToPull := named.Name()
  	var tag, digest string
  
  	tagged, ok := named.(dockerref.Tagged)
  	if ok {
  		tag = tagged.Tag()
  	}
  
  	digested, ok := named.(dockerref.Digested)
  	if ok {
  		digest = digested.Digest().String()
  	}
  	// If no tag was specified, use the default "latest".
  	if len(tag) == 0 && len(digest) == 0 {
  		tag = DefaultImageTag
  	}
  	return repoToPull, tag, digest, nil
  }
docs: // ParseImageName parses a docker image string into three parts: repo, tag and digest.
  // If both tag and digest are empty, a default image tag will be returned.