Skip to content

Commit

Permalink
feat(cli): remove unnecessary vars
Browse files Browse the repository at this point in the history
  • Loading branch information
roi-orca committed May 14, 2023
1 parent cd98806 commit 4ec3aff
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions pkg/cache/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"net/http"

"golang.org/x/xerrors"
"google.golang.org/protobuf/types/known/emptypb"

"github.com/aquasecurity/trivy/pkg/fanal/cache"
"github.com/aquasecurity/trivy/pkg/fanal/types"
Expand Down Expand Up @@ -39,7 +38,6 @@ func NewRemoteCache(url string, customHeaders http.Header, insecure bool) cache.

// PutArtifact sends artifact to remote client
func (c RemoteCache) PutArtifact(imageID string, artifactInfo types.ArtifactInfo) error {
var _ *emptypb.Empty
err := rpc.Retry(func() error {
var err error
_, err = c.client.PutArtifact(c.ctx, rpc.ConvertToRPCArtifactInfo(imageID, artifactInfo))
Expand All @@ -53,7 +51,6 @@ func (c RemoteCache) PutArtifact(imageID string, artifactInfo types.ArtifactInfo

// PutBlob sends blobInfo to remote client
func (c RemoteCache) PutBlob(diffID string, blobInfo types.BlobInfo) error {
var _ *emptypb.Empty
err := rpc.Retry(func() error {
var err error
_, err = c.client.PutBlob(c.ctx, rpc.ConvertToRPCBlobInfo(diffID, blobInfo))
Expand Down Expand Up @@ -81,7 +78,6 @@ func (c RemoteCache) MissingBlobs(imageID string, layerIDs []string) (bool, []st

// DeleteBlobs removes blobs by IDs from RemoteCache
func (c RemoteCache) DeleteBlobs(blobIDs []string) error {
var _ *emptypb.Empty
err := rpc.Retry(func() error {
var err error
_, err = c.client.DeleteBlobs(c.ctx, rpc.ConvertToDeleteBlobsRequest(blobIDs))
Expand Down

0 comments on commit 4ec3aff

Please sign in to comment.