Skip to content

Commit 62ec57c

Browse files
committed
DRY out directory path reference
1 parent 3a9b57c commit 62ec57c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lister/list.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ func (l *RealLister) List(opts ListOptions) (model.SeshSessions, error) {
5656
directoryHash := make(map[string]int)
5757
destIndex := 0
5858
for _, index := range fullOrderedIndex {
59-
directory := fullDirectory[index]
60-
if _, exists := directoryHash[directory.Path]; !exists {
59+
directoryPath := fullDirectory[index].Path
60+
if _, exists := directoryHash[directoryPath]; !exists {
6161
fullOrderedIndex[destIndex] = index
62-
directoryHash[directory.Path] = 1
62+
directoryHash[directoryPath] = 1
6363
destIndex = destIndex + 1
6464
}
6565
}

0 commit comments

Comments
 (0)