From ec1fd4b1b0401fad3d03654c16057712aff34e29 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 12 Oct 2019 16:09:10 +0200 Subject: [PATCH] distribution: SA4021: x = append(y) is equivalent to x = y (staticcheck) ``` distribution/push_v2_test.go:552:29: SA4021: x = append(y) is equivalent to x = y (staticcheck) return nil, errcode.Errors(append([]error{errcode.ErrorCodeUnauthorized.WithMessage("unauthorized")})) ^ ``` Signed-off-by: Sebastiaan van Stijn --- distribution/push_v2_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distribution/push_v2_test.go b/distribution/push_v2_test.go index 9bf3675ece..ca0db486f5 100644 --- a/distribution/push_v2_test.go +++ b/distribution/push_v2_test.go @@ -549,7 +549,7 @@ type mockBlobStoreWithCreate struct { } func (blob *mockBlobStoreWithCreate) Create(ctx context.Context, options ...distribution.BlobCreateOption) (distribution.BlobWriter, error) { - return nil, errcode.Errors(append([]error{errcode.ErrorCodeUnauthorized.WithMessage("unauthorized")})) + return nil, errcode.Errors([]error{errcode.ErrorCodeUnauthorized.WithMessage("unauthorized")}) } type mockRepoWithBlob struct {