From 850b4536a91ff41bc8102c055313eaa1a6f46be7 Mon Sep 17 00:00:00 2001 From: Adam Kaplan Date: Wed, 21 Oct 2015 14:35:06 -0400 Subject: [PATCH] Fixes to compile errors for new interface. --- filestore/filestore.go | 6 +++--- limitedstore/limitedstore_test.go | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/filestore/filestore.go b/filestore/filestore.go index e0ed631..04e99fc 100644 --- a/filestore/filestore.go +++ b/filestore/filestore.go @@ -98,7 +98,7 @@ func (store *FileStore) Terminate(id string) error { return nil } -func (store *FileStore) LockFile(id string) (hasLock bool, err) { +func (store *FileStore) LockFile(id string) (hasLock bool, err error) { info, err := store.GetInfo(id) if err != nil { hasLock = false @@ -110,7 +110,7 @@ func (store *FileStore) LockFile(id string) (hasLock bool, err) { return } info.Locked = true - err = writeInfo(id, info) + err = store.writeInfo(id, info) if err != nil { hasLock = false return @@ -125,7 +125,7 @@ func (store *FileStore) UnlockFile(id string) (err error) { return } info.Locked = false - err = writeInfo(info) + err = store.writeInfo(id, info) return } diff --git a/limitedstore/limitedstore_test.go b/limitedstore/limitedstore_test.go index d4f75ea..e2f9e56 100644 --- a/limitedstore/limitedstore_test.go +++ b/limitedstore/limitedstore_test.go @@ -49,6 +49,14 @@ func (store *dataStore) Terminate(id string) error { return nil } +func (store *dataStore) LockFile(id string) (bool, error) { + return true, nil +} + +func (store *dataStore) UnlockFile(id string) (error) { + return nil +} + func TestLimitedStore(t *testing.T) { dataStore := &dataStore{ t: t,