code: func GetRegistryAuth(ctx context.Context, resolver AuthConfigResolver, imageName string) (*types.AuthConfig, error) {
  	distributionRef, err := reference.ParseNormalizedNamed(imageName)
  	if err != nil {
  		return nil, fmt.Errorf("Failed to parse image name: %s: %s", imageName, err)
  	}
  	imgRefAndAuth, err := trust.GetImageReferencesAndAuth(ctx, nil, resolver, distributionRef.String())
  	if err != nil {
  		return nil, fmt.Errorf("Failed to get imgRefAndAuth: %s", err)
  	}
  	return imgRefAndAuth.AuthConfig(), nil
  }
docs: // GetRegistryAuth returns the auth config given an input image