@@ -170,7 +170,7 @@ func TopicDel(mc *fastcache.Cache, db *sdb.DB, obj Topic) {
170
170
// 标签
171
171
if len (obj .Tags ) > 0 {
172
172
// 删除标签,参见 cronjob/topic_tag
173
- for _ , tag := range strings . Split (obj .Tags , "," ) {
173
+ for _ , tag := range util . StringSplit (obj .Tags , "," ) {
174
174
tagLower := strings .ToLower (tag )
175
175
tagLowerB := sdb .S2b (tagLower )
176
176
_ = db .Hdel ("tag:" + tagLower , sdb .I2b (obj .ID ))
@@ -239,7 +239,7 @@ func TopicGetRelative(mc *fastcache.Cache, db *sdb.DB, aid uint64, tags string)
239
239
240
240
aidCount := map [uint64 ]int {}
241
241
242
- for _ , tag := range strings . Split (tagsLow , "," ) {
242
+ for _ , tag := range util . StringSplit (tagsLow , "," ) {
243
243
rs := db .Hrscan ("tag:" + tag , nil , scanMax )
244
244
if rs .KvLen () > 0 {
245
245
for i := 0 ; i < len (rs .Data )- 1 ; i += 2 {
@@ -478,7 +478,7 @@ func GetTopicListArchives(db *sdb.DB, cmd, tb, key string, limit int) TopicPageI
478
478
479
479
addYearMap := map [string ]struct {}{}
480
480
for _ , article := range aitems {
481
- addTimeLst := strings . Split (util .TimeFmt (article .AddTime , "2006 Jan 02" ), " " )
481
+ addTimeLst := util . StringSplit (util .TimeFmt (article .AddTime , "2006 Jan 02" ), " " )
482
482
item := TopicLstLi {
483
483
Topic : article ,
484
484
FirstCon : util .GetDesc (article .Content ),
@@ -605,7 +605,7 @@ func SearchTopicList(mc *fastcache.Cache, db *sdb.DB, q string, limit int) (tInf
605
605
606
606
addYearMap := map [string ]struct {}{}
607
607
for _ , article := range aitems {
608
- addTimeLst := strings . Split (util .TimeFmt (article .AddTime , "2006 Jan 02" ), " " )
608
+ addTimeLst := util . StringSplit (util .TimeFmt (article .AddTime , "2006 Jan 02" ), " " )
609
609
article .Comments , _ = commentsMap [article .ID ]
610
610
item := TopicLstLi {
611
611
Topic : article ,
0 commit comments