summaryrefslogtreecommitdiff
path: root/tools.go
diff options
context:
space:
mode:
Diffstat (limited to 'tools.go')
-rw-r--r--tools.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools.go b/tools.go
index af4356e..44df9f5 100644
--- a/tools.go
+++ b/tools.go
@@ -73,8 +73,11 @@ func memorise(args ...string) []byte {
Mind: args[1],
UpdatedAt: time.Now(),
}
- store.Memorise(memory)
- msg := fmt.Sprintf("info saved under the topic: %s", args[0])
+ if _, err := store.Memorise(memory); err != nil {
+ logger.Error("failed to save memory", "err", err, "memoory", memory)
+ return []byte("failed to save info")
+ }
+ msg := "info saved under the topic:" + args[0]
return []byte(msg)
}
@@ -104,7 +107,7 @@ func recallTopics(args ...string) []byte {
return []byte(joinedS)
}
-func fullMemoryLoad() {}
+// func fullMemoryLoad() {}
type fnSig func(...string) []byte