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-exchange-offline
Commits
391b626c
Commit
391b626c
authored
Nov 20, 2014
by
Brian Tiger Chow
Committed by
Jeromy
Dec 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename exchange
License: MIT Signed-off-by:
Brian Tiger Chow
<
brian@perfmode.com
>
parent
abc92d59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
offline.go
offline.go
+1
-1
offline_test.go
offline_test.go
+2
-2
No files found.
offline.go
View file @
391b626c
...
...
@@ -14,7 +14,7 @@ import (
var
OfflineMode
=
errors
.
New
(
"Block unavailable. Operating in offline mode"
)
func
NewOffline
Exchange
()
exchange
.
Interface
{
func
Exchange
()
exchange
.
Interface
{
return
&
offlineExchange
{}
}
...
...
offline_test.go
View file @
391b626c
...
...
@@ -10,7 +10,7 @@ import (
)
func
TestBlockReturnsErr
(
t
*
testing
.
T
)
{
off
:=
NewOffline
Exchange
()
off
:=
Exchange
()
_
,
err
:=
off
.
GetBlock
(
context
.
Background
(),
u
.
Key
(
"foo"
))
if
err
!=
nil
{
return
// as desired
...
...
@@ -19,7 +19,7 @@ func TestBlockReturnsErr(t *testing.T) {
}
func
TestHasBlockReturnsNil
(
t
*
testing
.
T
)
{
off
:=
NewOffline
Exchange
()
off
:=
Exchange
()
block
:=
blocks
.
NewBlock
([]
byte
(
"data"
))
err
:=
off
.
HasBlock
(
context
.
Background
(),
*
block
)
if
err
!=
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