Replace strings.Builder for backward Go compability

This commit is contained in:
Radhi Fadlillah 2018-03-06 15:33:29 +07:00
parent a747852728
commit 5f790c705c

View file

@ -1,6 +1,7 @@
package cmd package cmd
import ( import (
"bytes"
"strings" "strings"
"testing" "testing"
) )
@ -37,8 +38,8 @@ func TestPrintAccounts(t *testing.T) {
t.Errorf("failed to add test account: %v", err) t.Errorf("failed to add test account: %v", err)
return return
} }
var b strings.Builder b := bytes.NewBufferString("")
err := printAccounts("", &b) err := printAccounts("", b)
if err != nil { if err != nil {
t.Errorf("got unexpected error: %v", err) t.Errorf("got unexpected error: %v", err)
} }