Replace `x[:]` where x is a slice with just `x`.
Found using https://go-critic.github.io/overview.html#unslice-ref
Change-Id: Ib0ee16e1d49b2a875b6b92a770049acc33208362
Reviewed-on: https://go-review.googlesource.com/123375
Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
gp := mp.curg
var nstk int
if gp == _g_ {
- nstk = callers(skip+1, buf[:])
+ nstk = callers(skip+1, buf)
} else if gp != nil {
gp = mp.curg
- nstk = gcallers(gp, skip, buf[:])
+ nstk = gcallers(gp, skip, buf)
}
if nstk > 0 {
nstk-- // skip runtime.goexit