From 822fb559d23af9953db50d71741d4fc6ff8e7c08 Mon Sep 17 00:00:00 2001 From: Terry Howe Date: Mon, 20 Feb 2023 06:56:10 -0700 Subject: [PATCH] Use logger instead of fprintln Signed-off-by: Terry Howe --- cmd/oras/repository/tags.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/oras/repository/tags.go b/cmd/oras/repository/tags.go index 230469a9e..4389727f7 100644 --- a/cmd/oras/repository/tags.go +++ b/cmd/oras/repository/tags.go @@ -17,7 +17,6 @@ package repository import ( "fmt" - "os" "strings" "github.com/opencontainers/go-digest" @@ -80,7 +79,7 @@ Example - Show tags associated with a digest: } func showTags(opts showTagsOptions) error { - ctx, _ := opts.SetLoggerLevel() + ctx, logger := opts.SetLoggerLevel() finder, err := opts.NewReadonlyTarget(ctx, opts.Common) if err != nil { return err @@ -97,7 +96,7 @@ func showTags(opts showTagsOptions) error { } filter = desc.Digest.String() } - fmt.Fprintln(os.Stderr, "Tag query by reference may take a while") + logger.Infof("[Preview] Querying tags associated to %s, it may take a while.\n", filter) } return finder.Tags(ctx, opts.last, func(tags []string) error { for _, tag := range tags {