Commit a4f12ffc authored by rht's avatar rht

Replace 'var * bytes.Buffer' with '\1 := new(bytes.Buffer)'

parent bf637bca
......@@ -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)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment