From 5ca7231ed408ac264f509ff52b5d28ff4fbda757 Mon Sep 17 00:00:00 2001 From: xuri Date: Fri, 3 Jan 2020 23:57:25 +0800 Subject: optimize code and comments: use println errors instead of panic --- file_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'file_test.go') diff --git a/file_test.go b/file_test.go index 97ff720..8c5050c 100644 --- a/file_test.go +++ b/file_test.go @@ -12,18 +12,17 @@ func BenchmarkWrite(b *testing.B) { for col := 1; col <= 20; col++ { val, err := CoordinatesToCellName(col, row) if err != nil { - panic(err) + b.Error(err) } if err := f.SetCellDefault("Sheet1", val, s); err != nil { - panic(err) + b.Error(err) } } } // Save xlsx file by the given path. err := f.SaveAs("./test.xlsx") if err != nil { - panic(err) + b.Error(err) } } - } -- cgit v1.2.1