aboutsummaryrefslogtreecommitdiffstats
path: root/utils/fs/os
diff options
context:
space:
mode:
Diffstat (limited to 'utils/fs/os')
-rw-r--r--utils/fs/os/os.go6
-rw-r--r--utils/fs/os/os_test.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/utils/fs/os/os.go b/utils/fs/os/os.go
index 02395d6..3ff825e 100644
--- a/utils/fs/os/os.go
+++ b/utils/fs/os/os.go
@@ -14,8 +14,8 @@ type OS struct {
base string
}
-// NewOS returns a new OS filesystem
-func NewOS(baseDir string) *OS {
+// New returns a new OS filesystem
+func New(baseDir string) *OS {
return &OS{
base: baseDir,
}
@@ -139,7 +139,7 @@ func (fs *OS) Join(elem ...string) string {
// Dir returns a new Filesystem from the same type of fs using as baseDir the
// given path
func (fs *OS) Dir(path string) fs.Filesystem {
- return NewOS(fs.Join(fs.base, path))
+ return New(fs.Join(fs.base, path))
}
// Base returns the base path of the filesytem
diff --git a/utils/fs/os/os_test.go b/utils/fs/os/os_test.go
index 02a0a6c..756e284 100644
--- a/utils/fs/os/os_test.go
+++ b/utils/fs/os/os_test.go
@@ -21,7 +21,7 @@ var _ = Suite(&OSSuite{})
func (s *OSSuite) SetUpTest(c *C) {
s.path, _ = ioutil.TempDir(stdos.TempDir(), "go-git-os-fs-test")
- s.FilesystemSuite.Fs = os.NewOS(s.path)
+ s.FilesystemSuite.Fs = os.New(s.path)
}
func (s *OSSuite) TearDownTest(c *C) {
err := stdos.RemoveAll(s.path)