From d7f7a7c91d2c04d77fdc52ede9b5b98e2c1a183a Mon Sep 17 00:00:00 2001 From: "Mikhail f. Shiryaev" Date: Wed, 9 Feb 2022 17:28:56 +0100 Subject: [PATCH] test: fix assertion linting --- glob_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/glob_test.go b/glob_test.go index 53dbbd4..188fc3c 100644 --- a/glob_test.go +++ b/glob_test.go @@ -453,11 +453,11 @@ func TestGlob(t *testing.T) { // nolint:funlen t.Run("symlinks", func(t *testing.T) { t.Parallel() - testFS := testFs(t, []string{ - "./a/file", - }, nil).(testfs.FS) + var fsPath string + if testFS, ok := testFs(t, []string{"./a/file"}, nil).(testfs.FS); ok { + fsPath = testFS.Path() + } - fsPath := testFS.Path() workingSymlink := filepath.Join(fsPath, "b") brokenSymlink := filepath.Join(fsPath, "c") err := os.Symlink("a", workingSymlink)