From 8997f95f27d9307fe6c95f15e2d8bd56d89a3fb3 Mon Sep 17 00:00:00 2001 From: Xiaoxuan Wang Date: Thu, 12 Dec 2024 14:34:09 +0800 Subject: [PATCH] resolved comments Signed-off-by: Xiaoxuan Wang --- cmd/oras/internal/display/metadata/json/push.go | 2 +- cmd/oras/internal/display/metadata/template/push.go | 2 +- cmd/oras/internal/display/metadata/text/push.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/oras/internal/display/metadata/json/push.go b/cmd/oras/internal/display/metadata/json/push.go index 4d8d6f21c..9433829e6 100644 --- a/cmd/oras/internal/display/metadata/json/push.go +++ b/cmd/oras/internal/display/metadata/json/push.go @@ -57,7 +57,7 @@ func (ph *PushHandler) OnCopied(opts *option.Target, root ocispec.Descriptor) er return nil } -// Render is called after the push is completed. +// Render implements PushHandler. func (ph *PushHandler) Render() error { return output.PrintPrettyJSON(ph.out, model.NewPush(ph.root, ph.path, ph.tagged.Tags())) } diff --git a/cmd/oras/internal/display/metadata/template/push.go b/cmd/oras/internal/display/metadata/template/push.go index 33228e6cc..bc40f0afa 100644 --- a/cmd/oras/internal/display/metadata/template/push.go +++ b/cmd/oras/internal/display/metadata/template/push.go @@ -59,7 +59,7 @@ func (ph *PushHandler) OnCopied(opts *option.Target, root ocispec.Descriptor) er return nil } -// Render is called after the push is completed. +// Render implements PushHandler. func (ph *PushHandler) Render() error { return output.ParseAndWrite(ph.out, model.NewPush(ph.root, ph.path, ph.tagged.Tags()), ph.template) } diff --git a/cmd/oras/internal/display/metadata/text/push.go b/cmd/oras/internal/display/metadata/text/push.go index a258d374e..317345a63 100644 --- a/cmd/oras/internal/display/metadata/text/push.go +++ b/cmd/oras/internal/display/metadata/text/push.go @@ -51,7 +51,7 @@ func (h *PushHandler) OnCopied(opts *option.Target, root ocispec.Descriptor) err return h.printer.Println("Pushed", opts.AnnotatedReference()) } -// Render is called after the push is completed. +// Render implements PushHandler. func (h *PushHandler) Render() error { err := h.printer.Println("ArtifactType:", h.root.ArtifactType) if err != nil {