Skip to content

Commit

Permalink
Use logger instead of fprintln
Browse files Browse the repository at this point in the history
Signed-off-by: Terry Howe <[email protected]>
  • Loading branch information
Terry Howe committed Feb 22, 2023
1 parent 042fb39 commit 822fb55
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/oras/repository/tags.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package repository

import (
"fmt"
"os"
"strings"

"github.com/opencontainers/go-digest"
Expand Down Expand Up @@ -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
Expand All @@ -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 {
Expand Down

0 comments on commit 822fb55

Please sign in to comment.