@cryptotaxi247 / kubo / commits / b4ef99bc8

fix(exch) name the error

Brian Tiger Chow committed Sep 21, 2014 at 02:26 UTC b4ef99bc81b2c857cb8e15eab086224affd1e097
1 file changed +3 -1
exchange/offline/offline.go
+3 -1
@@ -10,6 +10,8 @@ import (
10 u "github.com/jbenet/go-ipfs/util"
11 )
12
13 +var OfflineMode = errors.New("Block unavailable. Operating in offline mode")
14 +
15 func NewOfflineExchange() exchange.Interface {
16 return &offlineExchange{}
17 }
@@ -23,7 +25,7 @@ type offlineExchange struct {
25 // given key.
26 // NB: This function may return before the timeout expires.
27 func (_ *offlineExchange) Block(context.Context, u.Key) (*blocks.Block, error) {
26 - return nil, errors.New("Block unavailable. Operating in offline mode")
28 + return nil, OfflineMode
29 }
30
31 // HasBlock always returns nil.