Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
b4ef99bc
Commit
b4ef99bc
authored
Sep 21, 2014
by
Brian Tiger Chow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(exch) name the error
parent
b5ea124a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
exchange/offline/offline.go
exchange/offline/offline.go
+3
-1
No files found.
exchange/offline/offline.go
View file @
b4ef99bc
...
...
@@ -10,6 +10,8 @@ import (
u
"github.com/jbenet/go-ipfs/util"
)
var
OfflineMode
=
errors
.
New
(
"Block unavailable. Operating in offline mode"
)
func
NewOfflineExchange
()
exchange
.
Interface
{
return
&
offlineExchange
{}
}
...
...
@@ -23,7 +25,7 @@ type offlineExchange struct {
// given key.
// NB: This function may return before the timeout expires.
func
(
_
*
offlineExchange
)
Block
(
context
.
Context
,
u
.
Key
)
(
*
blocks
.
Block
,
error
)
{
return
nil
,
errors
.
New
(
"Block unavailable. Operating in o
ffline
m
ode
"
)
return
nil
,
O
ffline
M
ode
}
// HasBlock always returns nil.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment