mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
Merge pull request #2 from christophe-duc/fix_linux_build
fixed a problem on linux build
This commit is contained in:
commit
56dcdec0ae
28 changed files with 132 additions and 135 deletions
4
main.go
4
main.go
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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{
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue