Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2020-09-25 05:28:52 +0300
committerJaime Martinez <jmartinez@gitlab.com>2020-09-25 05:28:52 +0300
commit003e7145a5bf6faa8991531d77cc4abff4869eda (patch)
treec437e880bd6f35bba4202ee0b91799de7df1a668 /internal/vfs/local
parent6230f6525fbe6cb1a75e650185062070621d82a4 (diff)
Apply suggestions from review
Diffstat (limited to 'internal/vfs/local')
-rw-r--r--internal/vfs/local/vfs.go13
-rw-r--r--internal/vfs/local/vfs_test.go2
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")