diff --git a/File.go b/File.go index 1782e0b..b0901e6 100644 --- a/File.go +++ b/File.go @@ -18,12 +18,12 @@ const ( ) type File[T any] struct { - collection StorageData + collection storageData dirty atomic.Uint32 sync chan struct{} } -func (fs *File[T]) Init(c StorageData) error { +func (fs *File[T]) Init(c storageData) error { fs.collection = c fs.sync = make(chan struct{}) diff --git a/Storage.go b/Storage.go index e23091c..b603db2 100644 --- a/Storage.go +++ b/Storage.go @@ -1,7 +1,7 @@ package ocean type Storage[T any] interface { - Init(data StorageData) error + Init(data storageData) error Delete(key string) error Set(key string, value *T) error Sync() diff --git a/StorageData.go b/storageData.go similarity index 73% rename from StorageData.go rename to storageData.go index eecf1e1..ee3c3b9 100644 --- a/StorageData.go +++ b/storageData.go @@ -2,7 +2,7 @@ package ocean import "sync" -type StorageData interface { +type storageData interface { Data() *sync.Map Name() string Root() string