From efbcdce9b9ea0a8cf512b0b563b25e7cc3e96b27 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Mon, 20 Nov 2023 15:59:39 +0100 Subject: [PATCH] linting: cli/command/trust: unusedwrite: unused write to field Hashes (govet) cli/command/trust/sign_test.go:211:9: unusedwrite: unused write to field Hashes (govet) target.Hashes, target.Length, err = getSignedManifestHashAndSize(notaryRepo, "test") ^ Signed-off-by: Sebastiaan van Stijn --- cli/command/trust/sign_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cli/command/trust/sign_test.go b/cli/command/trust/sign_test.go index 83863de953..632403ebf5 100644 --- a/cli/command/trust/sign_test.go +++ b/cli/command/trust/sign_test.go @@ -207,8 +207,7 @@ func TestAddStageSigners(t *testing.T) { func TestGetSignedManifestHashAndSize(t *testing.T) { notaryRepo, err := client.NewFileCachedRepository(t.TempDir(), "gun", "https://localhost", nil, passphrase.ConstantRetriever(passwd), trustpinning.TrustPinConfig{}) assert.NilError(t, err) - target := &client.Target{} - target.Hashes, target.Length, err = getSignedManifestHashAndSize(notaryRepo, "test") + _, _, err = getSignedManifestHashAndSize(notaryRepo, "test") assert.Error(t, err, "client is offline") }