Merge pull request #2 from christophe-duc/fix_linux_build

fixed a problem on linux build
This commit is contained in:
Christophe 2026-01-07 18:56:43 -04:00 committed by GitHub
commit 56dcdec0ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 132 additions and 135 deletions

View file

@ -8,12 +8,12 @@ import (
"runtime"
"runtime/debug"
"github.com/go-errors/errors"
"github.com/integrii/flaggy"
"github.com/christophe-duc/lazypodman/pkg/app"
"github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/go-errors/errors"
"github.com/integrii/flaggy"
"github.com/jesseduffield/yaml"
"github.com/samber/lo"
)

View file

@ -6,9 +6,9 @@ import (
"os/exec"
"strings"
"github.com/go-errors/errors"
"github.com/christophe-duc/lazypodman/pkg/i18n"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/go-errors/errors"
"github.com/sasha-s/go-deadlock"
"github.com/sirupsen/logrus"
"golang.org/x/xerrors"

View file

@ -4,8 +4,8 @@ import (
"context"
"strings"
"github.com/fatih/color"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/samber/lo"
"github.com/sirupsen/logrus"
)

View file

@ -13,9 +13,9 @@ import (
"github.com/go-errors/errors"
"github.com/jesseduffield/kill"
"github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/jesseduffield/kill"
"github.com/mgutz/str"
"github.com/sirupsen/logrus"
)

View file

@ -12,11 +12,11 @@ import (
"sync"
"time"
"github.com/imdario/mergo"
"github.com/christophe-duc/lazypodman/pkg/commands/ssh"
"github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/i18n"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/imdario/mergo"
"github.com/sasha-s/go-deadlock"
"github.com/sirupsen/logrus"
)
@ -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

@ -323,11 +323,7 @@ func (r *LibpodRuntime) ListPods(ctx context.Context) ([]PodSummary, error) {
if err != nil {
status = "unknown"
}
config, configErr := pod.Config()
infraID := ""
if configErr == nil && config != nil {
infraID = config.InfraContainerID
}
infraID, _ := pod.InfraContainerID()
result[i] = PodSummary{
ID: pod.ID(),
Name: pod.Name(),

View file

@ -7,6 +7,7 @@ import (
"time"
"github.com/containers/podman/v5/libpod/define"
handlertypes "github.com/containers/podman/v5/pkg/api/handlers/types"
"github.com/containers/podman/v5/pkg/bindings"
"github.com/containers/podman/v5/pkg/bindings/containers"
"github.com/containers/podman/v5/pkg/bindings/images"
@ -16,7 +17,6 @@ import (
"github.com/containers/podman/v5/pkg/bindings/volumes"
"github.com/containers/podman/v5/pkg/domain/entities"
"github.com/containers/podman/v5/pkg/domain/entities/types"
handlertypes "github.com/containers/podman/v5/pkg/api/handlers/types"
nettypes "go.podman.io/common/libnetwork/types"
)

View file

@ -3,8 +3,8 @@ package gui
import (
"time"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/jesseduffield/gocui"
)
type appStatus struct {

View file

@ -1,9 +1,9 @@
package gui
import (
"github.com/jesseduffield/lazycore/pkg/boxlayout"
"github.com/christophe-duc/lazypodman/pkg/gui/panels"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/jesseduffield/lazycore/pkg/boxlayout"
"github.com/mattn/go-runewidth"
"github.com/samber/lo"
)

View file

@ -8,10 +8,10 @@ import (
"os/signal"
"time"
"github.com/fatih/color"
"github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
)
func (gui *Gui) renderContainerLogsToMain(container *commands.Container) tasks.TaskFunc {

View file

@ -6,8 +6,6 @@ import (
"strings"
"time"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels"
@ -15,6 +13,8 @@ import (
"github.com/christophe-duc/lazypodman/pkg/gui/types"
"github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/samber/lo"
)

View file

@ -1,11 +1,11 @@
package gui
import (
"github.com/fatih/color"
"github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/types"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/samber/lo"
)

View file

@ -1,9 +1,9 @@
package gui
import (
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/gookit/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/utils"
)
var gocuiColorMap = map[string]gocui.Attribute{

View file

@ -9,14 +9,14 @@ import (
"github.com/go-errors/errors"
throttle "github.com/boz/go-throttle"
"github.com/jesseduffield/gocui"
lcUtils "github.com/jesseduffield/lazycore/pkg/utils"
"github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels"
"github.com/christophe-duc/lazypodman/pkg/gui/types"
"github.com/christophe-duc/lazypodman/pkg/i18n"
"github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/jesseduffield/gocui"
lcUtils "github.com/jesseduffield/lazycore/pkg/utils"
"github.com/sasha-s/go-deadlock"
"github.com/sirupsen/logrus"
)

View file

@ -5,8 +5,6 @@ import (
"strings"
"time"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels"
@ -14,6 +12,8 @@ import (
"github.com/christophe-duc/lazypodman/pkg/gui/types"
"github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/samber/lo"
)

View file

@ -3,8 +3,6 @@ package gui
import (
"strconv"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels"
@ -12,6 +10,8 @@ import (
"github.com/christophe-duc/lazypodman/pkg/gui/types"
"github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/samber/lo"
)

View file

@ -3,8 +3,8 @@ package gui
import (
"github.com/samber/lo"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/gui/types"
"github.com/jesseduffield/gocui"
)
func (gui *Gui) getBindings(v *gocui.View) []*Binding {

View file

@ -5,10 +5,10 @@ import (
"fmt"
"strings"
"github.com/go-errors/errors"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/go-errors/errors"
"github.com/jesseduffield/gocui"
"github.com/samber/lo"
)

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"
)

View file

@ -1,10 +1,10 @@
package presentation
import (
"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"
)
func GetServiceDisplayStrings(guiConfig *config.GuiConfig, service *commands.Service) []string {

View file

@ -6,13 +6,13 @@ import (
"path"
"strings"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/gui/panels"
"github.com/christophe-duc/lazypodman/pkg/gui/presentation"
"github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/yaml"
)

View file

@ -5,8 +5,6 @@ import (
"fmt"
"time"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels"
@ -14,6 +12,8 @@ import (
"github.com/christophe-duc/lazypodman/pkg/gui/types"
"github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/samber/lo"
)

View file

@ -8,8 +8,8 @@ import (
"os/signal"
"strings"
"github.com/fatih/color"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
)
func (gui *Gui) runSubprocess(cmd *exec.Cmd) error {

View file

@ -5,9 +5,9 @@ import (
"sort"
"strings"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/gui/panels"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/jesseduffield/gocui"
"github.com/samber/lo"
"github.com/spkg/bom"
)

View file

@ -3,8 +3,6 @@ package gui
import (
"fmt"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels"
@ -12,6 +10,8 @@ import (
"github.com/christophe-duc/lazypodman/pkg/gui/types"
"github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/samber/lo"
)