From 97dccbeaebc467696d4668efd2f8492864e438fe Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Tue, 17 Dec 2019 16:24:44 -0700 Subject: [PATCH] fix one arg i bet --- logb.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/logb.go b/logb.go index d7c8b25..256d33b 100644 --- a/logb.go +++ b/logb.go @@ -65,7 +65,9 @@ func log(lvl Level, args ...interface{}) { if len(args) > 0 { args = append([]interface{}{}, args...) v = fmt.Sprint(args) - v = v[1 : len(v)-1] + if len(args) > 1 { + v = v[1 : len(v)-1] + } } logf(lvl, "%s", v) }