]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/file_store.go
Misc cleanup
[rbdr/mobius] / hotline / file_store.go
index c1c392905c3704791014653d9937f993114af541..f528c3677ee08f65a4c1f8ca52ac3b88dff49b48 100644 (file)
@@ -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)
 }