From 34d415c9308f2d089520c2a193cdf8393dcc6b5d Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Thu, 28 Nov 2024 17:57:50 +0300 Subject: Feat: add linter --- tools.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tools.go') 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 -- cgit v1.2.3