From d02d7e5e1d4db643aa3f351aa97a40063383e1e5 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sun, 10 Sep 2023 10:49:24 +0000 Subject: [PATCH] address updated golangci-lint errors: S1011 (gosimple) should replace loop with `copy.outs[level] = append(copy.outs[level], os.outs[level]...)` (gosimple) --- logger/datastructures.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/logger/datastructures.go b/logger/datastructures.go index 5e74513..6601a14 100644 --- a/logger/datastructures.go +++ b/logger/datastructures.go @@ -150,9 +150,7 @@ func NewOutlets() *Outlets { func (os *Outlets) DeepCopy() (copy *Outlets) { copy = NewOutlets() for level := range os.outs { - for i := range os.outs[level] { - copy.outs[level] = append(copy.outs[level], os.outs[level][i]) - } + copy.outs[level] = append(copy.outs[level], os.outs[level]...) } return copy }