From a8d631177f4315810f0ab7c7d66d38e332ab0916 Mon Sep 17 00:00:00 2001 From: Moritz Poldrack Date: Fri, 29 Jul 2022 21:50:42 +0200 Subject: lint: merge declaration and assignment (S1021) Signed-off-by: Moritz Poldrack Acked-by: Robin Jarry --- widgets/dirtree.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/widgets/dirtree.go b/widgets/dirtree.go index b28d8072..7b10f02e 100644 --- a/widgets/dirtree.go +++ b/widgets/dirtree.go @@ -374,8 +374,7 @@ func buildTree(node *types.Thread, stree [][]string, defaultUid uint32) { m := make(map[string][][]string) for _, branch := range stree { if len(branch) > 1 { - var next [][]string - next = append(m[branch[0]], branch[1:]) + next := append(m[branch[0]], branch[1:]) m[branch[0]] = next } } -- cgit