A Docker Registry client.
package main
import (
"fmt"
"log"
"github.com/imagespy/registry-client"
)
func main() {
reg := ®istry.Registry{
Authenticator: registry.NewTokenAuthenticator(),
Client: registry.DefaultClient(),
Domain: "docker.io",
}
repo, err := reg.RepositoryFromString("golang")
if err != nil {
log.Fatal(err)
}
img, err := repo.Images().GetByTag("1.12.0")
if err != nil {
log.Fatal(err)
}
fmt.Println(img.Digest)
}