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-bitswap
Commits
a4f12ffc
Commit
a4f12ffc
authored
May 26, 2015
by
rht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace 'var * bytes.Buffer' with '\1 := new(bytes.Buffer)'
parent
bf637bca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
message/message_test.go
message/message_test.go
+6
-6
No files found.
message/message_test.go
View file @
a4f12ffc
...
...
@@ -100,12 +100,12 @@ func TestToNetFromNetPreservesWantList(t *testing.T) {
original
.
AddEntry
(
u
.
Key
(
"T"
),
1
)
original
.
AddEntry
(
u
.
Key
(
"F"
),
1
)
var
buf
bytes
.
Buffer
if
err
:=
original
.
ToNet
(
&
buf
);
err
!=
nil
{
buf
:=
new
(
bytes
.
Buffer
)
if
err
:=
original
.
ToNet
(
buf
);
err
!=
nil
{
t
.
Fatal
(
err
)
}
copied
,
err
:=
FromNet
(
&
buf
)
copied
,
err
:=
FromNet
(
buf
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
@@ -130,12 +130,12 @@ func TestToAndFromNetMessage(t *testing.T) {
original
.
AddBlock
(
blocks
.
NewBlock
([]
byte
(
"F"
)))
original
.
AddBlock
(
blocks
.
NewBlock
([]
byte
(
"M"
)))
var
buf
bytes
.
Buffer
if
err
:=
original
.
ToNet
(
&
buf
);
err
!=
nil
{
buf
:=
new
(
bytes
.
Buffer
)
if
err
:=
original
.
ToNet
(
buf
);
err
!=
nil
{
t
.
Fatal
(
err
)
}
m2
,
err
:=
FromNet
(
&
buf
)
m2
,
err
:=
FromNet
(
buf
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
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