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
|
type dockerContainerList []dockerContainer
|
||||||
|
|
||||||
func (containers dockerContainerList) sortByStateIconThenTitle() {
|
func (containers dockerContainerList) sortByStateIconThenTitle() {
|
||||||
sort.SliceStable(containers, func(a, b int) bool {
|
|
||||||
p := &dockerContainerStateIconPriorities
|
p := &dockerContainerStateIconPriorities
|
||||||
|
|
||||||
|
sort.SliceStable(containers, func(a, b int) bool {
|
||||||
if containers[a].StateIcon != containers[b].StateIcon {
|
if containers[a].StateIcon != containers[b].StateIcon {
|
||||||
return (*p)[containers[a].StateIcon] < (*p)[containers[b].StateIcon]
|
return (*p)[containers[a].StateIcon] < (*p)[containers[b].StateIcon]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue