aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMoritz Poldrack <git@moritz.sh>2022-07-29 21:50:42 +0200
committerRobin Jarry <robin@jarry.cc>2022-08-04 21:57:55 +0200
commita8d631177f4315810f0ab7c7d66d38e332ab0916 (patch)
treeb5283184f6ddfb33ba89bf60a92574c4e1bb48d1
parentef599aa8fc9faf2747d3ec9fb02fb7b80af27cc6 (diff)
downloadaerc-a8d631177f4315810f0ab7c7d66d38e332ab0916.tar.gz
lint: merge declaration and assignment (S1021)
Signed-off-by: Moritz Poldrack <moritz@poldrack.dev> Acked-by: Robin Jarry <robin@jarry.cc>
-rw-r--r--widgets/dirtree.go3
1 files changed, 1 insertions, 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
}
}