summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--cache/index.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/cache/index.go b/cache/index.go
index 641e6dc..0cf8065 100644
--- a/cache/index.go
+++ b/cache/index.go
@@ -2,6 +2,7 @@ package cache
 
 import (
 	"log"
+	"strings"
 	"time"
 )
 
@@ -27,3 +28,25 @@ func (index UserIndex) DelUser(url string) {
 	delete(index, url)
 	imutex.Unlock()
 }
+
+func (index UserIndex) QueryUser(name string) []string {
+	var users []string
+	var entry string
+	for k, v := range index {
+		if strings.Contains(v.nick, name) {
+			entry = v.nick + "\t" + k + "\t" + string(v.apidate)
+			users = append(users, entry)
+		}
+	}
+
+	return users
+}
+
+// FindTag takes a user's tweets and looks for a given tag.
+// Returns the tweets with the tag as a []string.
+func (userdata *Data) FindTag(tag string) {
+	//for _, e := range userdata.status {
+	//parts := strings.Split(e, "\t")
+
+	//}
+}
24 +0100 Add ability to script commands after connect' href='/danisanti/profani-tty/commit/src/config/scripts.h?id=904a5a81cfcc19c7029f0a961cfb97f7d1a2fe9f'>904a5a81 ^
9cff3735 ^


904a5a81 ^


a35cbea7 ^
a2726b6a ^

9cff3735 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46