From 5f790c705c7efd00d226f3023fa08b86d44c2da4 Mon Sep 17 00:00:00 2001 From: Radhi Fadlillah Date: Tue, 6 Mar 2018 15:33:29 +0700 Subject: [PATCH] Replace strings.Builder for backward Go compability --- cmd/account_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/account_test.go b/cmd/account_test.go index 5fc5827..151b11f 100644 --- a/cmd/account_test.go +++ b/cmd/account_test.go @@ -1,6 +1,7 @@ package cmd import ( + "bytes" "strings" "testing" ) @@ -37,8 +38,8 @@ func TestPrintAccounts(t *testing.T) { t.Errorf("failed to add test account: %v", err) return } - var b strings.Builder - err := printAccounts("", &b) + b := bytes.NewBufferString("") + err := printAccounts("", b) if err != nil { t.Errorf("got unexpected error: %v", err) }