Skip to content
This repository was archived by the owner on Dec 17, 2021. It is now read-only.

Commit cedb0f6

Browse files
committed
commands/ls: Remove func isActive
1 parent a675097 commit cedb0f6

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

commands/ls.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ const (
3333
var (
3434
headers = map[string]string{
3535
"Name": "NAME",
36-
"Active": "ACTIVE",
37-
"ActiveHost": "ACTIVE_HOST",
3836
"DriverName": "DRIVER",
3937
"State": "STATE",
4038
"URL": "URL",
@@ -47,8 +45,6 @@ var (
4745

4846
type HostListItem struct {
4947
Name string
50-
Active string
51-
ActiveHost bool
5248
DriverName string
5349
State state.State
5450
URL string
@@ -315,16 +311,8 @@ func attemptGetHostState(h *host.Host, stateQueryChan chan<- HostListItem) {
315311
engineOptions = h.HostOptions.EngineOptions
316312
}
317313

318-
activeHost := isActive(currentState, url)
319-
active := "-"
320-
if activeHost {
321-
active = "*"
322-
}
323-
324314
stateQueryChan <- HostListItem{
325315
Name: h.Name,
326-
Active: active,
327-
ActiveHost: activeHost,
328316
DriverName: h.Driver.DriverName(),
329317
State: currentState,
330318
URL: url,
@@ -406,10 +394,6 @@ func sortHostListItemsByName(items []HostListItem) {
406394
}
407395
}
408396

409-
func isActive(currentState state.State, hostURL string) bool {
410-
return currentState == state.Running && hostURL == os.Getenv("DOCKER_HOST")
411-
}
412-
413397
func urlPort(urlWithPort string) string {
414398
parts := strings.Split(urlWithPort, ":")
415399
return parts[len(parts)-1]

0 commit comments

Comments
 (0)