Display only 50 tags
This commit is contained in:
parent
e365103370
commit
0783521019
1 changed files with 3 additions and 0 deletions
|
@ -124,6 +124,9 @@ func indexHandler(coll *mgo.Collection) func(http.ResponseWriter, *http.Request)
|
|||
sort.Sort(result)
|
||||
data.Tags = make([]string, len(result))
|
||||
for i, tag := range result {
|
||||
if i == 50 {
|
||||
break /* display only 50 */
|
||||
}
|
||||
if tag.Subject != "" {
|
||||
data.Tags[i] = tag.Subject
|
||||
}
|
||||
|
|
Reference in a new issue