Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
Signed-off-by: Billy Zha <jinzha1@microsoft.com>
  • Loading branch information
qweeah committed Mar 6, 2023
1 parent 5529a30 commit d430688
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions cmd/oras/internal/display/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,6 @@ func (p *tagManifestStatusForRepo) PushReference(ctx context.Context, expected o
return Print("Tagged", reference)
}

// FetchReference fetches the content identified by the reference.
func (p *tagManifestStatusForRepo) FetchReference(ctx context.Context, reference string) (ocispec.Descriptor, io.ReadCloser, error) {
desc, rc, err := p.Repository.FetchReference(ctx, reference)
if err == nil && p.hintFunc != nil {
p.printHint.Do(func() {
Print(p.hintFunc(desc))
})
}
return desc, rc, err
}

type tagManifestStatusForTarget struct {
oras.Target
printHint *sync.Once
Expand All @@ -155,14 +144,3 @@ func (p *tagManifestStatusForTarget) Tag(ctx context.Context, desc ocispec.Descr
}
return Print("Tagged", reference)
}

// Resolve resolves a reference to a descriptor.
func (p *tagManifestStatusForTarget) Resolve(ctx context.Context, reference string) (ocispec.Descriptor, error) {
desc, err := p.Target.Resolve(ctx, reference)
if err == nil && p.hintFunc != nil {
p.printHint.Do(func() {
Print(p.hintFunc(desc))
})
}
return desc, err
}

0 comments on commit d430688

Please sign in to comment.