From 638a4eff5f71e0cd974c520e82d165e2743ded63 Mon Sep 17 00:00:00 2001 From: ccoVeille <3875889+ccoVeille@users.noreply.github.com> Date: Wed, 17 Jul 2024 17:31:08 +0200 Subject: [PATCH] chore: do not overload standard cap function available in Go --- dumper.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dumper.go b/dumper.go index bca1178..e768fa9 100644 --- a/dumper.go +++ b/dumper.go @@ -199,8 +199,8 @@ func (d *Dumper) dump(val reflect.Value, ignoreDepth ...bool) { d.buf.WriteString(__(d.Theme.Func, val.Type().String())) case reflect.Chan: d.buf.WriteString(__(d.Theme.Chan, val.Type().String())) - if cap := val.Cap(); cap > 0 { - d.buf.WriteString(__(d.Theme.Chan, fmt.Sprintf("<%d>", cap))) + if vCap := val.Cap(); vCap > 0 { + d.buf.WriteString(__(d.Theme.Chan, fmt.Sprintf("<%d>", vCap))) } case reflect.Struct: d.dumpStruct(val)