Skip to content

Commit 4b765dd

Browse files
authored
activation: oneline append in FilesWithNames()
1 parent 2e2b96d commit 4b765dd

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

activation/files.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,7 @@ func FilesWithNames() map[string][]*os.File {
2222
filesWithNames := map[string][]*os.File{}
2323

2424
for _, f := range files {
25-
current, ok := filesWithNames[f.Name()]
26-
27-
if !ok {
28-
current = []*os.File{}
29-
filesWithNames[f.Name()] = current
30-
}
31-
32-
filesWithNames[f.Name()] = append(current, f)
25+
filesWithNames[f.Name()] = append(filesWithNames[f.Name()], f)
3326
}
3427

3528
return filesWithNames

0 commit comments

Comments
 (0)