mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
Fixed code format issues
This commit is contained in:
parent
cbacd32a68
commit
62eeaac437
2 changed files with 25 additions and 25 deletions
|
|
@ -287,7 +287,7 @@ func (c *DockerCommand) sortedContainers(containers []*Container) []*Container {
|
||||||
sort.Slice(containers, func(i, j int) bool {
|
sort.Slice(containers, func(i, j int) bool {
|
||||||
stateLeft := states[containers[i].Container.State]
|
stateLeft := states[containers[i].Container.State]
|
||||||
stateRight := states[containers[j].Container.State]
|
stateRight := states[containers[j].Container.State]
|
||||||
if stateLeft == stateRight {
|
if stateLeft == stateRight {
|
||||||
return containers[i].Name < containers[j].Name
|
return containers[i].Name < containers[j].Name
|
||||||
}
|
}
|
||||||
return states[containers[i].Container.State] < states[containers[j].Container.State]
|
return states[containers[i].Container.State] < states[containers[j].Container.State]
|
||||||
|
|
|
||||||
|
|
@ -10,32 +10,32 @@ import (
|
||||||
func sampleContainers(userConfig *config.AppConfig) []*Container {
|
func sampleContainers(userConfig *config.AppConfig) []*Container {
|
||||||
return []*Container{
|
return []*Container{
|
||||||
{
|
{
|
||||||
ID: "1",
|
ID: "1",
|
||||||
Name:"1",
|
Name: "1",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "exited",
|
State: "exited",
|
||||||
},
|
},
|
||||||
Config: userConfig,
|
Config: userConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "2",
|
ID: "2",
|
||||||
Name:"2",
|
Name: "2",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "running",
|
State: "running",
|
||||||
},
|
},
|
||||||
Config: userConfig,
|
Config: userConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "3",
|
ID: "3",
|
||||||
Name:"3",
|
Name: "3",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "running",
|
State: "running",
|
||||||
},
|
},
|
||||||
Config: userConfig,
|
Config: userConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "4",
|
ID: "4",
|
||||||
Name:"4",
|
Name: "4",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "created",
|
State: "created",
|
||||||
},
|
},
|
||||||
|
|
@ -47,32 +47,32 @@ func sampleContainers(userConfig *config.AppConfig) []*Container {
|
||||||
func expectedPerStatusContainers(appConfig *config.AppConfig) []*Container {
|
func expectedPerStatusContainers(appConfig *config.AppConfig) []*Container {
|
||||||
return []*Container{
|
return []*Container{
|
||||||
{
|
{
|
||||||
ID: "2",
|
ID: "2",
|
||||||
Name:"2",
|
Name: "2",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "running",
|
State: "running",
|
||||||
},
|
},
|
||||||
Config: appConfig,
|
Config: appConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "3",
|
ID: "3",
|
||||||
Name:"3",
|
Name: "3",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "running",
|
State: "running",
|
||||||
},
|
},
|
||||||
Config: appConfig,
|
Config: appConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "1",
|
ID: "1",
|
||||||
Name:"1",
|
Name: "1",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "exited",
|
State: "exited",
|
||||||
},
|
},
|
||||||
Config: appConfig,
|
Config: appConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "4",
|
ID: "4",
|
||||||
Name:"4",
|
Name: "4",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "created",
|
State: "created",
|
||||||
},
|
},
|
||||||
|
|
@ -84,32 +84,32 @@ func expectedPerStatusContainers(appConfig *config.AppConfig) []*Container {
|
||||||
func expectedLegacySortedContainers(appConfig *config.AppConfig) []*Container {
|
func expectedLegacySortedContainers(appConfig *config.AppConfig) []*Container {
|
||||||
return []*Container{
|
return []*Container{
|
||||||
{
|
{
|
||||||
ID: "1",
|
ID: "1",
|
||||||
Name:"1",
|
Name: "1",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "exited",
|
State: "exited",
|
||||||
},
|
},
|
||||||
Config: appConfig,
|
Config: appConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "2",
|
ID: "2",
|
||||||
Name:"2",
|
Name: "2",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "running",
|
State: "running",
|
||||||
},
|
},
|
||||||
Config: appConfig,
|
Config: appConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "3",
|
ID: "3",
|
||||||
Name:"3",
|
Name: "3",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "running",
|
State: "running",
|
||||||
},
|
},
|
||||||
Config: appConfig,
|
Config: appConfig,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
ID: "4",
|
ID: "4",
|
||||||
Name:"4",
|
Name: "4",
|
||||||
Container: types.Container{
|
Container: types.Container{
|
||||||
State: "created",
|
State: "created",
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue