diff options
author | =Corey Hulen <corey@hulen.com> | 2015-07-06 00:50:42 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-07-06 00:50:42 -0800 |
commit | 34fb817a4a4cd2761ba35a2c94f9d0eb79d06244 (patch) | |
tree | eaf0ecaf55383449a5b2cc369fa8112109da7f0d /store/store.go | |
parent | cbadc263864b1b0196b90b9afa1c68335f0ab7f1 (diff) | |
download | chat-34fb817a4a4cd2761ba35a2c94f9d0eb79d06244.tar.gz chat-34fb817a4a4cd2761ba35a2c94f9d0eb79d06244.tar.bz2 chat-34fb817a4a4cd2761ba35a2c94f9d0eb79d06244.zip |
Fixing unit tests
Diffstat (limited to 'store/store.go')
-rw-r--r-- | store/store.go | 9 |
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 |