grim/tagpull

Move the package to it's new home
draft
2020-06-18, Gary Kramlich
c79b1b4a64c9
Move the package to it's new home
package main
import (
"fmt"
"github.com/heroku/docker-registry-client/registry"
)
func registryGetImageID(repository string) (string, error) {
reg, err := registry.New("https://index.docker.io", "", "")
if err != nil {
return "", err
}
repo, tag := parseRepositoryAndTag(repository)
manifest, err := reg.ManifestV2(repo, tag)
fmt.Printf("%#v\n", manifest)
return manifest.Config.Digest.String(), err
}