diff options
Diffstat (limited to 'internal/vfs/local')
-rw-r--r-- | internal/vfs/local/vfs.go | 13 | ||||
-rw-r--r-- | internal/vfs/local/vfs_test.go | 2 |
2 files changed, 3 insertions, 12 deletions
diff --git a/internal/vfs/local/vfs.go b/internal/vfs/local/vfs.go index 0ece253d..ca74dfbe 100644 --- a/internal/vfs/local/vfs.go +++ b/internal/vfs/local/vfs.go @@ -11,16 +11,7 @@ import ( var errNotDirectory = errors.New("path needs to be a directory") -type VFS struct { - name string -} - -// New instance of VFS -func New(name string) *VFS { - return &VFS{ - name: name, - } -} +type VFS struct{} func (fs VFS) Root(ctx context.Context, path string) (vfs.Root, error) { rootPath, err := filepath.Abs(path) @@ -46,5 +37,5 @@ func (fs VFS) Root(ctx context.Context, path string) (vfs.Root, error) { } func (fs *VFS) Name() string { - return fs.name + return "local" } diff --git a/internal/vfs/local/vfs_test.go b/internal/vfs/local/vfs_test.go index 0c56cbbc..ec67d595 100644 --- a/internal/vfs/local/vfs_test.go +++ b/internal/vfs/local/vfs_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" ) -var localVFS = New("local_test") +var localVFS = &VFS{} func tmpDir(t *testing.T) (string, func()) { tmpDir, err := ioutil.TempDir("", "vfs") |