mirror of
https://github.com/Xevion/glance.git
synced 2025-12-15 00:11:53 -06:00
Move variable definition outside of closure
This commit is contained in:
@@ -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]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user