From 34fb817a4a4cd2761ba35a2c94f9d0eb79d06244 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 6 Jul 2015 00:50:42 -0800 Subject: Fixing unit tests --- store/store.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'store/store.go') 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 -- cgit v1.2.3-1-g7c22