@@ -51,7 +51,7 @@ func Key(keyParts ...string) string {
5151
5252// Clear deletes all namespaces and cached values
5353func (s Storage ) Clear () error {
54- db , err := openDb (s .storagePath )
54+ db , err := openDB (s .storagePath )
5555 if err != nil {
5656 return err
5757 }
@@ -67,7 +67,7 @@ func (s Storage) Clear() error {
6767// Put sets key to value within the namespace
6868// If the key already exists, it will be overwritten
6969func (c Cache [T ]) Put (key string , value T ) error {
70- db , err := openDb (c .storage .storagePath )
70+ db , err := openDB (c .storage .storagePath )
7171 if err != nil {
7272 return err
7373 }
@@ -92,7 +92,7 @@ func (c Cache[T]) Put(key string, value T) error {
9292// Get fetches the value of key within the namespace.
9393// If no value exists, it will return found == false
9494func (c Cache [T ]) Get (key string ) (val T , err error ) {
95- db , err := openDb (c .storage .storagePath )
95+ db , err := openDB (c .storage .storagePath )
9696 if err != nil {
9797 return
9898 }
@@ -128,7 +128,7 @@ func (c Cache[T]) Get(key string) (val T, err error) {
128128
129129// Delete removes a value for key within the namespace
130130func (c Cache [T ]) Delete (key string ) error {
131- db , err := openDb (c .storage .storagePath )
131+ db , err := openDB (c .storage .storagePath )
132132 if err != nil {
133133 return err
134134 }
@@ -144,6 +144,6 @@ func (c Cache[T]) Delete(key string) error {
144144 })
145145}
146146
147- func openDb (path string ) (* bolt.DB , error ) {
147+ func openDB (path string ) (* bolt.DB , error ) {
148148 return bolt .Open (path , 0640 , & bolt.Options {Timeout : 1 * time .Minute })
149149}
0 commit comments