diff options
author | Steve Manuel <nilslice@gmail.com> | 2016-10-18 13:57:39 -0700 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2016-10-18 13:57:39 -0700 |
commit | 16230b04aa14c88873eaf4c7b9596a7f850df0e9 (patch) | |
tree | b84dd88a6b6747e719f6650cdd830636416ee9e0 /system/db/init.go | |
parent | aef933f144a89e947d8ccdae8e085eed221e2bdd (diff) |
implement Sort on all content types by Timestamp, DESC (latest to oldest) - run in goroutine on db.Init() as well as any time content is saved via SetContent
Diffstat (limited to 'system/db/init.go')
-rw-r--r-- | system/db/init.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/system/db/init.go b/system/db/init.go index 5806622..399a1e2 100644 --- a/system/db/init.go +++ b/system/db/init.go @@ -71,9 +71,11 @@ func Init() { } // sort all content into type_sorted buckets - for t := range content.Types { - go SortContent(t + "_sorted") - } + go func() { + for t := range content.Types { + SortContent(t + "_sorted") + } + }() } |