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:
@ -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 {
|
||||
|
||||
@ -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}" {
|
||||
|
||||
Reference in New Issue
Block a user