From d56087441eae3cf441917ce3501d04c49a1c9c64 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Tue, 19 Jan 2021 09:16:49 +1100 Subject: [PATCH] Fix duplicate import under different aliases --- fs/torrentfs_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/torrentfs_test.go b/fs/torrentfs_test.go index 068985df..419fa721 100644 --- a/fs/torrentfs_test.go +++ b/fs/torrentfs_test.go @@ -2,7 +2,6 @@ package torrentfs import ( "context" - netContext "context" "fmt" "io/ioutil" "log" @@ -202,9 +201,9 @@ func TestDownloadOnDemand(t *testing.T) { fs := New(leecher) defer fs.Destroy() root, _ := fs.Root() - node, _ := root.(fusefs.NodeStringLookuper).Lookup(netContext.Background(), "greeting") + node, _ := root.(fusefs.NodeStringLookuper).Lookup(context.Background(), "greeting") var attr fuse.Attr - node.Attr(netContext.Background(), &attr) + node.Attr(context.Background(), &attr) size := attr.Size data := make([]byte, size) h, err := node.(fusefs.NodeOpener).Open(context.TODO(), nil, nil) @@ -215,7 +214,7 @@ func TestDownloadOnDemand(t *testing.T) { var n int for n < len(data) { resp := fuse.ReadResponse{Data: data[n:]} - err := h.(fusefs.HandleReader).Read(netContext.Background(), &fuse.ReadRequest{ + err := h.(fusefs.HandleReader).Read(context.Background(), &fuse.ReadRequest{ Size: int(size) - n, Offset: int64(n), }, &resp)