diff options
author | Ben Morrison <ben@gbmor.dev> | 2019-05-14 03:19:26 -0400 |
---|---|---|
committer | Ben Morrison <ben@gbmor.dev> | 2019-05-14 03:19:26 -0400 |
commit | 1dcdbca485394818381549a98b7d4c809842526c (patch) | |
tree | 32b8f46cd8758d1b3fabcad69e57326c8d251b2a /registry/query.go | |
parent | 2492014051e5cd4c37287a09639d18f85e1349dc (diff) | |
download | getwtxt-1dcdbca485394818381549a98b7d4c809842526c.tar.gz |
exported Data struct fields
Diffstat (limited to 'registry/query.go')
-rw-r--r-- | registry/query.go | 10 |
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 } |