diff options
Diffstat (limited to 'hotline/file_store.go')
| -rw-r--r-- | hotline/file_store.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/hotline/file_store.go b/hotline/file_store.go index c1c3929..f528c36 100644 --- a/hotline/file_store.go +++ b/hotline/file_store.go @@ -14,25 +14,25 @@ type FileStore interface { Symlink(oldname, newname string) error // TODO: implement these - //Rename(oldpath string, newpath string) error - //RemoveAll(path string) error + // Rename(oldpath string, newpath string) error + // RemoveAll(path string) error } type OSFileStore struct{} -func (fs OSFileStore) Mkdir(name string, perm os.FileMode) error { +func (fs *OSFileStore) Mkdir(name string, perm os.FileMode) error { return os.Mkdir(name, perm) } -func (fs OSFileStore) Stat(name string) (os.FileInfo, error) { +func (fs *OSFileStore) Stat(name string) (os.FileInfo, error) { return os.Stat(name) } -func (fs OSFileStore) Open(name string) (*os.File, error) { +func (fs *OSFileStore) Open(name string) (*os.File, error) { return os.Open(name) } -func (fs OSFileStore) Symlink(oldname, newname string) error { +func (fs *OSFileStore) Symlink(oldname, newname string) error { return os.Symlink(oldname, newname) } @@ -40,12 +40,12 @@ type MockFileStore struct { mock.Mock } -func (mfs MockFileStore) Mkdir(name string, perm os.FileMode) error { +func (mfs *MockFileStore) Mkdir(name string, perm os.FileMode) error { args := mfs.Called(name, perm) return args.Error(0) } -func (mfs MockFileStore) Stat(name string) (os.FileInfo, error) { +func (mfs *MockFileStore) Stat(name string) (os.FileInfo, error) { args := mfs.Called(name) if args.Get(0) == nil { return nil, args.Error(1) @@ -54,12 +54,12 @@ func (mfs MockFileStore) Stat(name string) (os.FileInfo, error) { return args.Get(0).(os.FileInfo), args.Error(1) } -func (mfs MockFileStore) Open(name string) (*os.File, error) { +func (mfs *MockFileStore) Open(name string) (*os.File, error) { args := mfs.Called(name) return args.Get(0).(*os.File), args.Error(1) } -func (mfs MockFileStore) Symlink(oldname, newname string) error { +func (mfs *MockFileStore) Symlink(oldname, newname string) error { args := mfs.Called(oldname, newname) return args.Error(0) } |