From 16230b04aa14c88873eaf4c7b9596a7f850df0e9 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 18 Oct 2016 13:57:39 -0700 Subject: 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 --- system/db/init.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'system') 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") + } + }() } -- cgit v1.2.3