aboutsummaryrefslogtreecommitdiff
path: root/hotline/file_store.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2022-05-29 09:34:24 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2022-05-29 09:34:24 -0700
commit003a743e6767b3041c3a8321566c3586d73b399a (patch)
tree5d8302cfa59a4a939a1d5db8e2e444183023e637 /hotline/file_store.go
parent9ebf276dbdf3ecae5bdf478ec91efcefc22d6ee3 (diff)
Refactor and cleanup
Diffstat (limited to 'hotline/file_store.go')
-rw-r--r--hotline/file_store.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/hotline/file_store.go b/hotline/file_store.go
index f528c36..e9d083f 100644
--- a/hotline/file_store.go
+++ b/hotline/file_store.go
@@ -12,7 +12,7 @@ type FileStore interface {
Stat(name string) (os.FileInfo, error)
Open(name string) (*os.File, error)
Symlink(oldname, newname string) error
-
+ Remove(name string) error
// TODO: implement these
// Rename(oldpath string, newpath string) error
// RemoveAll(path string) error
@@ -36,6 +36,10 @@ func (fs *OSFileStore) Symlink(oldname, newname string) error {
return os.Symlink(oldname, newname)
}
+func (fs *OSFileStore) Remove(name string) error {
+ return os.Remove(name)
+}
+
type MockFileStore struct {
mock.Mock
}
@@ -63,3 +67,8 @@ func (mfs *MockFileStore) Symlink(oldname, newname string) error {
args := mfs.Called(oldname, newname)
return args.Error(0)
}
+
+func (mfs *MockFileStore) Remove(name string) error {
+ args := mfs.Called(name)
+ return args.Error(0)
+}