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")
+
+	//}
+}
out tweaks' href='/gbmor/getwtxt/commit/assets/tmpl/index.html?h=v0.4.7&id=d15180e9dcd540d5850fa0319a7614620075eaea'>d15180e ^
920306c ^
6cf0e26 ^


920306c ^
6cf0e26 ^

920306c ^

6cf0e26 ^
920306c ^


3df037d ^



5be84b2 ^
3df037d ^





920306c ^
3df037d ^



920306c ^
3df037d ^









5be84b2 ^
3df037d ^

1eae520 ^
3df037d ^


0f645e7 ^
920306c ^
5be84b2 ^







920306c ^
920306c ^
29c35a3 ^
920306c ^
61d34d4 ^


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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87