fixed linting issues

This commit is contained in:
christophe-duc 2026-01-07 18:49:39 -04:00
parent 341f173a68
commit 364f399d26
2 changed files with 6 additions and 5 deletions

View file

@ -402,7 +402,8 @@ func (c *PodmanCommand) RefreshContainersAndServices(currentServices []*Service,
// buildContainerListItems creates a unified list of pods and containers
func (c *PodmanCommand) buildContainerListItems(containers []*Container, podSummaries []PodSummary) []*ContainerListItem {
var items []*ContainerListItem
// Pre-allocate: pods + containers (max possible size)
items := make([]*ContainerListItem, 0, len(podSummaries)+len(containers))
// Create a map of pod ID -> pod summary
podMap := make(map[string]PodSummary)

View file

@ -6,10 +6,10 @@ import (
"strconv"
"strings"
"github.com/fatih/color"
"github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/samber/lo"
)
@ -47,10 +47,10 @@ func GetContainerListItemDisplayStrings(guiConfig *config.GuiConfig, item *comma
func GetPodDisplayStrings(guiConfig *config.GuiConfig, pod *commands.Pod) []string {
return []string{
getPodDisplayStatus(guiConfig, pod),
"", // No substatus for pods
"", // No substatus for pods
utils.ColoredString(pod.Name, color.FgCyan),
"", // No CPU% for pods
"", // No ports for pods
"", // No CPU% for pods
"", // No ports for pods
utils.ColoredString(fmt.Sprintf("(%d containers)", len(pod.Containers)), color.FgMagenta),
}
}