summary refs log tree commit diff stats
path: root/registry/query.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-05-14 03:19:26 -0400
committerBen Morrison <ben@gbmor.dev>2019-05-14 03:19:26 -0400
commit1dcdbca485394818381549a98b7d4c809842526c (patch)
tree32b8f46cd8758d1b3fabcad69e57326c8d251b2a /registry/query.go
parent2492014051e5cd4c37287a09639d18f85e1349dc (diff)
downloadgetwtxt-1dcdbca485394818381549a98b7d4c809842526c.tar.gz
exported Data struct fields
Diffstat (limited to 'registry/query.go')
-rw-r--r--registry/query.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/registry/query.go b/registry/query.go
index e024bc6..32f5c6c 100644
--- a/registry/query.go
+++ b/registry/query.go
@@ -15,9 +15,9 @@ func (index UserIndex) QueryUser(name string) []string {
 	var users []string
 	imutex.RLock()
 	for k, v := range index {
-		if strings.Contains(v.nick, name) {
-			timekey[v.date] = v.nick + "\t" + k + "\t" + string(v.apidate)
-			keys = append(keys, v.date)
+		if strings.Contains(v.Nick, name) {
+			timekey[v.Date] = v.Nick + "\t" + k + "\t" + string(v.APIdate)
+			keys = append(keys, v.Date)
 		}
 	}
 	imutex.RUnlock()
@@ -48,7 +48,7 @@ func (index UserIndex) QueryTag(tag string) []string {
 // Returns the tweets with the tag as a []string.
 func (userdata *Data) FindTag(tag string) TimeMap {
 	var statuses TimeMap
-	for k, e := range userdata.status {
+	for k, e := range userdata.Status {
 		parts := strings.Split(e, "\t")
 		statusslice := strings.Split(parts[3], " ")
 		for _, v := range statusslice {
@@ -87,7 +87,7 @@ func (tm TimeMapSlice) SortByTime() []string {
 // GetStatuses returns the string slice containing a user's statuses
 func (index UserIndex) GetStatuses(url string) TimeMap {
 	imutex.RLock()
-	status := index[url].status
+	status := index[url].Status
 	imutex.RUnlock()
 	return status
 }