1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-10-25 02:16:56 +08:00

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

This commit is contained in:
rht
2015-05-26 23:18:04 +07:00
parent 8cad2d2c89
commit 3547f7ae33
27 changed files with 96 additions and 97 deletions

View File

@ -321,7 +321,7 @@ func appendString(args, inputs []string) ([]string, []string) {
}
func appendStdinAsString(args []string, stdin *os.File) ([]string, *os.File, error) {
var buf bytes.Buffer
buf := new(bytes.Buffer)
_, err := buf.ReadFrom(stdin)
if err != nil {

View File

@ -32,7 +32,7 @@ func TestMarshalling(t *testing.T) {
if err != nil {
t.Error(err, "Should have passed")
}
var buf bytes.Buffer
buf := new(bytes.Buffer)
buf.ReadFrom(reader)
output := buf.String()
if removeWhitespace(output) != "{\"Foo\":\"beep\",\"Bar\":\"boop\",\"Baz\":1337}" {