From 4f2b140f8a929528f771a84439441da59bf92540 Mon Sep 17 00:00:00 2001 From: Marcus Brandenburger Date: Tue, 25 Mar 2025 16:21:14 +0100 Subject: [PATCH] Replace itiai10/copy with built-in os.copyFS Signed-off-by: Marcus Brandenburger --- go.mod | 1 - go.sum | 4 ---- platform/fabric/core/generic/msp/service_test.go | 3 +-- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 71eab74aa..04dd0d05f 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,6 @@ require ( github.com/onsi/ginkgo v1.16.5 github.com/onsi/ginkgo/v2 v2.20.2 github.com/onsi/gomega v1.34.1 - github.com/otiai10/copy v1.14.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.20.5 github.com/spf13/cobra v1.8.1 diff --git a/go.sum b/go.sum index d322ca1f6..d500ffa41 100644 --- a/go.sum +++ b/go.sum @@ -1489,10 +1489,6 @@ github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= -github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU= -github.com/otiai10/copy v1.14.0/go.mod h1:ECfuL02W+/FkTWZWgQqXPWZgW9oeKCSQ5qVfSc4qc4w= -github.com/otiai10/mint v1.5.1 h1:XaPLeE+9vGbuyEHem1JNk3bYc7KKqyI/na0/mLd/Kks= -github.com/otiai10/mint v1.5.1/go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= diff --git a/platform/fabric/core/generic/msp/service_test.go b/platform/fabric/core/generic/msp/service_test.go index 62dea0a09..1b2b3fbce 100644 --- a/platform/fabric/core/generic/msp/service_test.go +++ b/platform/fabric/core/generic/msp/service_test.go @@ -21,7 +21,6 @@ import ( mem "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/db/driver/memory" "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/kvs" registry2 "github.com/hyperledger-labs/fabric-smart-client/platform/view/services/registry" - "github.com/otiai10/copy" "github.com/stretchr/testify/assert" ) @@ -180,7 +179,7 @@ func TestRefresh(t *testing.T) { } // copy new identity and refresh - assert.NoError(t, copy.Copy("./testdata/manager@org2.example.com", "./testdata/x509typefolder/msps/manager@org2.example.com")) + assert.NoError(t, os.CopyFS("./testdata/x509typefolder/msps/manager@org2.example.com", os.DirFS("./testdata/manager@org2.example.com"))) assert.NoError(t, mspService.Refresh()) assert.Equal(t, []string{