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"
"runtime/debug" "runtime/debug"
"github.com/go-errors/errors"
"github.com/integrii/flaggy"
"github.com/christophe-duc/lazypodman/pkg/app" "github.com/christophe-duc/lazypodman/pkg/app"
"github.com/christophe-duc/lazypodman/pkg/commands" "github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config" "github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/utils" "github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/go-errors/errors"
"github.com/integrii/flaggy"
"github.com/jesseduffield/yaml" "github.com/jesseduffield/yaml"
"github.com/samber/lo" "github.com/samber/lo"
) )

View file

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

View file

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

View file

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

View file

@ -12,11 +12,11 @@ import (
"sync" "sync"
"time" "time"
"github.com/imdario/mergo"
"github.com/christophe-duc/lazypodman/pkg/commands/ssh" "github.com/christophe-duc/lazypodman/pkg/commands/ssh"
"github.com/christophe-duc/lazypodman/pkg/config" "github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/i18n" "github.com/christophe-duc/lazypodman/pkg/i18n"
"github.com/christophe-duc/lazypodman/pkg/utils" "github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/imdario/mergo"
"github.com/sasha-s/go-deadlock" "github.com/sasha-s/go-deadlock"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )
@ -402,7 +402,8 @@ func (c *PodmanCommand) RefreshContainersAndServices(currentServices []*Service,
// buildContainerListItems creates a unified list of pods and containers // buildContainerListItems creates a unified list of pods and containers
func (c *PodmanCommand) buildContainerListItems(containers []*Container, podSummaries []PodSummary) []*ContainerListItem { 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 // Create a map of pod ID -> pod summary
podMap := make(map[string]PodSummary) podMap := make(map[string]PodSummary)

View file

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

View file

@ -7,6 +7,7 @@ import (
"time" "time"
"github.com/containers/podman/v5/libpod/define" "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"
"github.com/containers/podman/v5/pkg/bindings/containers" "github.com/containers/podman/v5/pkg/bindings/containers"
"github.com/containers/podman/v5/pkg/bindings/images" "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/bindings/volumes"
"github.com/containers/podman/v5/pkg/domain/entities" "github.com/containers/podman/v5/pkg/domain/entities"
"github.com/containers/podman/v5/pkg/domain/entities/types" "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" nettypes "go.podman.io/common/libnetwork/types"
) )

View file

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

View file

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

View file

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

View file

@ -6,8 +6,6 @@ import (
"strings" "strings"
"time" "time"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/commands" "github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config" "github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels" "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/gui/types"
"github.com/christophe-duc/lazypodman/pkg/tasks" "github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils" "github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/samber/lo" "github.com/samber/lo"
) )

View file

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

View file

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

View file

@ -9,14 +9,14 @@ import (
"github.com/go-errors/errors" "github.com/go-errors/errors"
throttle "github.com/boz/go-throttle" 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/commands"
"github.com/christophe-duc/lazypodman/pkg/config" "github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels" "github.com/christophe-duc/lazypodman/pkg/gui/panels"
"github.com/christophe-duc/lazypodman/pkg/gui/types" "github.com/christophe-duc/lazypodman/pkg/gui/types"
"github.com/christophe-duc/lazypodman/pkg/i18n" "github.com/christophe-duc/lazypodman/pkg/i18n"
"github.com/christophe-duc/lazypodman/pkg/tasks" "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/sasha-s/go-deadlock"
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
) )

View file

@ -5,8 +5,6 @@ import (
"strings" "strings"
"time" "time"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/commands" "github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config" "github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels" "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/gui/types"
"github.com/christophe-duc/lazypodman/pkg/tasks" "github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils" "github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/samber/lo" "github.com/samber/lo"
) )

View file

@ -3,8 +3,6 @@ package gui
import ( import (
"strconv" "strconv"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/commands" "github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config" "github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels" "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/gui/types"
"github.com/christophe-duc/lazypodman/pkg/tasks" "github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils" "github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/samber/lo" "github.com/samber/lo"
) )

View file

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

View file

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

View file

@ -6,10 +6,10 @@ import (
"strconv" "strconv"
"strings" "strings"
"github.com/fatih/color"
"github.com/christophe-duc/lazypodman/pkg/commands" "github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config" "github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/utils" "github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/samber/lo" "github.com/samber/lo"
) )

View file

@ -1,10 +1,10 @@
package presentation package presentation
import ( import (
"github.com/fatih/color"
"github.com/christophe-duc/lazypodman/pkg/commands" "github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config" "github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/utils" "github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
) )
func GetServiceDisplayStrings(guiConfig *config.GuiConfig, service *commands.Service) []string { func GetServiceDisplayStrings(guiConfig *config.GuiConfig, service *commands.Service) []string {

View file

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

View file

@ -5,8 +5,6 @@ import (
"fmt" "fmt"
"time" "time"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/commands" "github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config" "github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels" "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/gui/types"
"github.com/christophe-duc/lazypodman/pkg/tasks" "github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils" "github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/samber/lo" "github.com/samber/lo"
) )

View file

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

View file

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

View file

@ -3,8 +3,6 @@ package gui
import ( import (
"fmt" "fmt"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/christophe-duc/lazypodman/pkg/commands" "github.com/christophe-duc/lazypodman/pkg/commands"
"github.com/christophe-duc/lazypodman/pkg/config" "github.com/christophe-duc/lazypodman/pkg/config"
"github.com/christophe-duc/lazypodman/pkg/gui/panels" "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/gui/types"
"github.com/christophe-duc/lazypodman/pkg/tasks" "github.com/christophe-duc/lazypodman/pkg/tasks"
"github.com/christophe-duc/lazypodman/pkg/utils" "github.com/christophe-duc/lazypodman/pkg/utils"
"github.com/fatih/color"
"github.com/jesseduffield/gocui"
"github.com/samber/lo" "github.com/samber/lo"
) )