diff --git a/main.go b/main.go index 542266f..6839f25 100644 --- a/main.go +++ b/main.go @@ -506,6 +506,10 @@ func (self *DockerGUI) refresh_containers() { containers := strings.Split(strings.TrimSpace(string(output)), "\n") for _, container := range containers { parts := strings.Split(container, "\t") + if len(parts) == 1 { + continue + } + id := parts[0] name := parts[1] image := parts[2] @@ -540,6 +544,10 @@ func (self *DockerGUI) refresh_images() { images := strings.Split(strings.TrimSpace(string(output)), "\n") for _, image := range images { parts := strings.Split(image, "\t") + if len(parts) == 1 { + continue + } + id := parts[0] repository := parts[1] tag := parts[2] @@ -568,6 +576,10 @@ func (self *DockerGUI) refresh_networks() { networks := strings.Split(strings.TrimSpace(string(output)), "\n") for _, network := range networks { parts := strings.Split(network, "\t") + if len(parts) == 1 { + continue + } + id := parts[0] name := parts[1] driver := parts[2] @@ -594,6 +606,10 @@ func (self *DockerGUI) refresh_volumes() { volumes := strings.Split(strings.TrimSpace(string(output)), "\n") for _, volume := range volumes { parts := strings.Split(volume, "\t") + if len(parts) == 1 { + continue + } + name := parts[0] driver := parts[1] mountpoint := parts[2]