Move variable definition outside of closure
This commit is contained in:
parent
49a0758aae
commit
8adad18198
1 changed files with 2 additions and 1 deletions
|
@ -113,8 +113,9 @@ type dockerContainer struct {
|
|||
type dockerContainerList []dockerContainer
|
||||
|
||||
func (containers dockerContainerList) sortByStateIconThenTitle() {
|
||||
p := &dockerContainerStateIconPriorities
|
||||
|
||||
sort.SliceStable(containers, func(a, b int) bool {
|
||||
p := &dockerContainerStateIconPriorities
|
||||
if containers[a].StateIcon != containers[b].StateIcon {
|
||||
return (*p)[containers[a].StateIcon] < (*p)[containers[b].StateIcon]
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue