From 3bc025db783d1a36e585b6f2ced19a20a7ce7359 Mon Sep 17 00:00:00 2001 From: christalib Date: Sun, 12 Jan 2020 18:15:19 +0100 Subject: [PATCH] adding comments to structures and saving data on second filter as well --- ai/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ai/main.go b/ai/main.go index 5223267..a389216 100644 --- a/ai/main.go +++ b/ai/main.go @@ -31,6 +31,7 @@ func ReadFromStream(inputChan chan utils.InputEvent) { } if findLove(b.String()) { utils.ClippySays("I love you too...") + saveData(b.String(), input) b.Reset() } default: @@ -40,11 +41,13 @@ func ReadFromStream(inputChan chan utils.InputEvent) { } } +// Node is the word that has been captured. type Node struct { ID uuid.UUID Word string `json:"word"` } +// Edge is the collection of keystrokes captured on filtered word. type Edge struct { ID uuid.UUID NodeID uuid.UUID `json:"NodeID"`