move DefaultRepository into own file; add todo tags;
This commit is contained in:
@@ -7,13 +7,13 @@ import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
|
||||
// A very simple datastructure, implementing the IDatastore interface. It uses
|
||||
// a simple text file to the data as json.
|
||||
type FileDatastore struct {
|
||||
path string
|
||||
}
|
||||
|
||||
|
||||
// Creates a new FileDatastore object, creating the storage file in the
|
||||
// process.
|
||||
func NewFileDatastore(path string) (*FileDatastore, error) {
|
||||
@@ -120,7 +120,6 @@ func (fds *FileDatastore) GetAllKeys() (map[string]bool, error) {
|
||||
// Deletes the entry with the given key. May through an error if the file
|
||||
// cannot be opened or the contents cannot be decoded or encoded correctly.
|
||||
func (fds *FileDatastore) Delete(key string) error {
|
||||
|
||||
m, err := fds.readMapObj()
|
||||
if err != nil { return err }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user