summaryrefslogtreecommitdiffstats
path: root/store/store.go
diff options
context:
space:
mode:
Diffstat (limited to 'store/store.go')
-rw-r--r--store/store.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/store/store.go b/store/store.go
index 8d4b49b6e..070ee0562 100644
--- a/store/store.go
+++ b/store/store.go
@@ -14,6 +14,15 @@ type StoreResult struct {
type StoreChannel chan StoreResult
+func Must(sc StoreChannel) interface{} {
+ r := <-sc
+ if r.Err != nil {
+ panic(r.Err)
+ }
+
+ return r.Data
+}
+
type Store interface {
Team() TeamStore
Channel() ChannelStore