From eaecd2c573ec7048af91d5710de4bd0c64e1b91d Mon Sep 17 00:00:00 2001 From: Vivianne Date: Fri, 26 Jul 2024 17:29:21 +0800 Subject: [PATCH 1/6] Update Config.md - location of the config in Windows Update the location of the config file in Windows in the file Config.md --- docs/Config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Config.md b/docs/Config.md index e43bdf90..d386ff31 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -10,7 +10,7 @@ Changes to the user config will only take place after closing and re-opening laz - OSX: `~/Library/Application Support/jesseduffield/lazydocker/config.yml` - Linux: `~/.config/lazydocker/config.yml` -- Windows: `C:\\Users\\\\AppData\\Roaming\\jesseduffield\\lazydocker\\config.yml` (I think) +- Windows: `C:\Users\\AppData\Roaming\lazydocker\config.yml` JSON schema is available for `config.yml` so that IntelliSense in Visual Studio Code (completion and error checking) is automatically enabled when the [YAML Red Hat][yaml] From 86cce8495521e4d54b753a9e7c16f462f2ddb864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=89AU?= Date: Wed, 5 Jun 2024 20:59:24 +0200 Subject: [PATCH 2/6] Add navigation via numbers A la lazygit, we can now navigate between panels using numbers (1,2,3,4,5,6,7) Add translation for number navigation reformat oops fix translation case & generate docs pluralize networks --- docs/keybindings/Keybindings_de.md | 6 ++++++ docs/keybindings/Keybindings_en.md | 6 ++++++ docs/keybindings/Keybindings_es.md | 6 ++++++ docs/keybindings/Keybindings_fr.md | 6 ++++++ docs/keybindings/Keybindings_nl.md | 6 ++++++ docs/keybindings/Keybindings_pl.md | 6 ++++++ docs/keybindings/Keybindings_pt.md | 6 ++++++ docs/keybindings/Keybindings_tr.md | 6 ++++++ docs/keybindings/Keybindings_zh.md | 6 ++++++ pkg/gui/keybindings.go | 9 +++++++++ pkg/gui/view_helpers.go | 7 +++++++ pkg/i18n/english.go | 14 ++++++++++++++ 12 files changed, 84 insertions(+) diff --git a/docs/keybindings/Keybindings_de.md b/docs/keybindings/Keybindings_de.md index f463e21b..2d306a2d 100644 --- a/docs/keybindings/Keybindings_de.md +++ b/docs/keybindings/Keybindings_de.md @@ -104,4 +104,10 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   +: next screen mode (normal/half/fullscreen)
   _: prev screen mode
+  1: focus projects panel
+  2: focus services panel
+  3: focus containers panel
+  4: focus images panel
+  5: focus volumes panel
+  6: focus networks panel
 
diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index a5a8ff3f..13470d1d 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -104,4 +104,10 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   +: next screen mode (normal/half/fullscreen)
   _: prev screen mode
+  1: focus projects panel
+  2: focus services panel
+  3: focus containers panel
+  4: focus images panel
+  5: focus volumes panel
+  6: focus networks panel
 
diff --git a/docs/keybindings/Keybindings_es.md b/docs/keybindings/Keybindings_es.md index ff4eee14..145c7a22 100644 --- a/docs/keybindings/Keybindings_es.md +++ b/docs/keybindings/Keybindings_es.md @@ -104,4 +104,10 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   +: next screen mode (normal/half/fullscreen)
   _: prev screen mode
+  1: focus projects panel
+  2: focus services panel
+  3: focus containers panel
+  4: focus images panel
+  5: focus volumes panel
+  6: focus networks panel
 
diff --git a/docs/keybindings/Keybindings_fr.md b/docs/keybindings/Keybindings_fr.md index 64fb4197..260fe0bd 100644 --- a/docs/keybindings/Keybindings_fr.md +++ b/docs/keybindings/Keybindings_fr.md @@ -104,4 +104,10 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   +: next screen mode (normal/half/fullscreen)
   _: prev screen mode
+  1: focus projects panel
+  2: focus services panel
+  3: focus containers panel
+  4: focus images panel
+  5: focus volumes panel
+  6: focus networks panel
 
diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md index 3de0c93e..dca57f64 100644 --- a/docs/keybindings/Keybindings_nl.md +++ b/docs/keybindings/Keybindings_nl.md @@ -104,4 +104,10 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   +: next screen mode (normal/half/fullscreen)
   _: prev screen mode
+  1: focus projects panel
+  2: focus services panel
+  3: focus containers panel
+  4: focus images panel
+  5: focus volumes panel
+  6: focus networks panel
 
diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md index 8d46b0ef..c290fdc2 100644 --- a/docs/keybindings/Keybindings_pl.md +++ b/docs/keybindings/Keybindings_pl.md @@ -104,4 +104,10 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   +: next screen mode (normal/half/fullscreen)
   _: prev screen mode
+  1: focus projects panel
+  2: focus services panel
+  3: focus containers panel
+  4: focus images panel
+  5: focus volumes panel
+  6: focus networks panel
 
diff --git a/docs/keybindings/Keybindings_pt.md b/docs/keybindings/Keybindings_pt.md index 41604314..73544cc9 100644 --- a/docs/keybindings/Keybindings_pt.md +++ b/docs/keybindings/Keybindings_pt.md @@ -104,4 +104,10 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   +: modo de tela seguinte (normal/meia/tela cheia)
   _: modo de tela anterior
+  1: focus projects panel
+  2: focus services panel
+  3: focus containers panel
+  4: focus images panel
+  5: focus volumes panel
+  6: focus networks panel
 
diff --git a/docs/keybindings/Keybindings_tr.md b/docs/keybindings/Keybindings_tr.md index 018f68c2..787d7d15 100644 --- a/docs/keybindings/Keybindings_tr.md +++ b/docs/keybindings/Keybindings_tr.md @@ -104,4 +104,10 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   +: next screen mode (normal/half/fullscreen)
   _: prev screen mode
+  1: focus projects panel
+  2: focus services panel
+  3: focus containers panel
+  4: focus images panel
+  5: focus volumes panel
+  6: focus networks panel
 
diff --git a/docs/keybindings/Keybindings_zh.md b/docs/keybindings/Keybindings_zh.md index 8b1607dd..0e47a44e 100644 --- a/docs/keybindings/Keybindings_zh.md +++ b/docs/keybindings/Keybindings_zh.md @@ -104,4 +104,10 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   +: 下一个屏幕模式(正常/半屏/全屏)
   _: 上一个屏幕模式
+  1: focus projects panel
+  2: focus services panel
+  3: focus containers panel
+  4: focus images panel
+  5: focus volumes panel
+  6: focus networks panel
 
diff --git a/pkg/gui/keybindings.go b/pkg/gui/keybindings.go index 424f47c5..df706024 100644 --- a/pkg/gui/keybindings.go +++ b/pkg/gui/keybindings.go @@ -534,6 +534,15 @@ func (gui *Gui) GetInitialKeybindings() []*Binding { }...) } + bindings = append(bindings, []*Binding{ + {Handler: gui.handleGoTo(gui.Panels.Projects.View), Key: '1', Description: gui.Tr.FocusProjects}, + {Handler: gui.handleGoTo(gui.Panels.Services.View), Key: '2', Description: gui.Tr.FocusServices}, + {Handler: gui.handleGoTo(gui.Panels.Containers.View), Key: '3', Description: gui.Tr.FocusContainers}, + {Handler: gui.handleGoTo(gui.Panels.Images.View), Key: '4', Description: gui.Tr.FocusImages}, + {Handler: gui.handleGoTo(gui.Panels.Volumes.View), Key: '5', Description: gui.Tr.FocusVolumes}, + {Handler: gui.handleGoTo(gui.Panels.Networks.View), Key: '6', Description: gui.Tr.FocusNetworks}, + }...) + for _, panel := range gui.allListPanels() { setUpDownClickBindings(panel.GetView().Name(), panel.HandlePrevLine, panel.HandleNextLine, panel.HandleClick) } diff --git a/pkg/gui/view_helpers.go b/pkg/gui/view_helpers.go index 5e2b72fb..6acbb18c 100644 --- a/pkg/gui/view_helpers.go +++ b/pkg/gui/view_helpers.go @@ -12,6 +12,13 @@ import ( "github.com/spkg/bom" ) +func (gui *Gui) handleGoTo(view *gocui.View) func(g *gocui.Gui, v *gocui.View) error { + return func(g *gocui.Gui, v *gocui.View) error { + gui.resetMainView() + return gui.switchFocus(view) + } +} + func (gui *Gui) nextView(g *gocui.Gui, v *gocui.View) error { sideViewNames := gui.sideViewNames() var focusedViewName string diff --git a/pkg/i18n/english.go b/pkg/i18n/english.go index 0d4f8222..d1ed0320 100644 --- a/pkg/i18n/english.go +++ b/pkg/i18n/english.go @@ -128,6 +128,13 @@ type TranslationSet struct { LcNextScreenMode string LcPrevScreenMode string FilterPrompt string + + FocusProjects string + FocusServices string + FocusContainers string + FocusImages string + FocusVolumes string + FocusNetworks string } func englishSet() TranslationSet { @@ -263,5 +270,12 @@ func englishSet() TranslationSet { LcNextScreenMode: "next screen mode (normal/half/fullscreen)", LcPrevScreenMode: "prev screen mode", FilterPrompt: "filter", + + FocusProjects: "focus projects panel", + FocusServices: "focus services panel", + FocusContainers: "focus containers panel", + FocusImages: "focus images panel", + FocusVolumes: "focus volumes panel", + FocusNetworks: "focus networks panel", } } From a8e75ecfe32dc3730f3c553d8d7ca9f52eb51a3c Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 31 Jul 2024 09:42:45 +0200 Subject: [PATCH 3/6] go.mod: github.com/docker/docker v27.1.1 full diff: https://github.com/docker/docker/compare/v27.0.3...v27.1.1 Signed-off-by: Sebastiaan van Stijn --- go.mod | 2 +- go.sum | 4 ++-- vendor/github.com/docker/docker/api/swagger.yaml | 4 ++-- vendor/github.com/docker/docker/api/types/system/info.go | 7 ------- vendor/modules.txt | 2 +- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/go.mod b/go.mod index 0376b293..ac4735ca 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/boz/go-throttle v0.0.0-20160922054636-fdc4eab740c1 github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 github.com/docker/cli v27.0.3+incompatible - github.com/docker/docker v27.0.3+incompatible + github.com/docker/docker v27.1.1+incompatible github.com/fatih/color v1.10.0 github.com/go-errors/errors v1.5.1 github.com/gookit/color v1.5.0 diff --git a/go.sum b/go.sum index ffacfe7f..387a2548 100644 --- a/go.sum +++ b/go.sum @@ -19,8 +19,8 @@ github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5Qvfr github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/docker/cli v27.0.3+incompatible h1:usGs0/BoBW8MWxGeEtqPMkzOY56jZ6kYlSN5BLDioCQ= github.com/docker/cli v27.0.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/docker v27.0.3+incompatible h1:aBGI9TeQ4MPlhquTQKq9XbK79rKFVwXNUAYz9aXyEBE= -github.com/docker/docker v27.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= +github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8= github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= diff --git a/vendor/github.com/docker/docker/api/swagger.yaml b/vendor/github.com/docker/docker/api/swagger.yaml index cc754bf1..78f0ce1f 100644 --- a/vendor/github.com/docker/docker/api/swagger.yaml +++ b/vendor/github.com/docker/docker/api/swagger.yaml @@ -5334,7 +5334,7 @@ definitions: The version Go used to compile the daemon, and the version of the Go runtime in use. type: "string" - example: "go1.21.11" + example: "go1.21.12" Os: description: | The operating system that the daemon is running on ("linux" or "windows") @@ -9563,7 +9563,7 @@ paths: Containers report these events: `attach`, `commit`, `copy`, `create`, `destroy`, `detach`, `die`, `exec_create`, `exec_detach`, `exec_start`, `exec_die`, `export`, `health_status`, `kill`, `oom`, `pause`, `rename`, `resize`, `restart`, `start`, `stop`, `top`, `unpause`, `update`, and `prune` - Images report these events: `create, `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` + Images report these events: `create`, `delete`, `import`, `load`, `pull`, `push`, `save`, `tag`, `untag`, and `prune` Volumes report these events: `create`, `mount`, `unmount`, `destroy`, and `prune` diff --git a/vendor/github.com/docker/docker/api/types/system/info.go b/vendor/github.com/docker/docker/api/types/system/info.go index 6791cf32..c66a2afb 100644 --- a/vendor/github.com/docker/docker/api/types/system/info.go +++ b/vendor/github.com/docker/docker/api/types/system/info.go @@ -77,9 +77,6 @@ type Info struct { Containerd *ContainerdInfo `json:",omitempty"` - // Legacy API fields for older API versions. - legacyFields - // Warnings contains a slice of warnings that occurred while collecting // system information. These warnings are intended to be informational // messages for the user, and are not intended to be parsed / used for @@ -124,10 +121,6 @@ type ContainerdNamespaces struct { Plugins string } -type legacyFields struct { - ExecutionDriver string `json:",omitempty"` // Deprecated: deprecated since API v1.25, but returned for older versions. -} - // PluginsInfo is a temp struct holding Plugins name // registered with docker daemon. It is used by [Info] struct type PluginsInfo struct { diff --git a/vendor/modules.txt b/vendor/modules.txt index 448b93b8..c66091a8 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -35,7 +35,7 @@ github.com/docker/cli/cli/connhelper/ssh github.com/docker/cli/cli/context github.com/docker/cli/cli/context/docker github.com/docker/cli/cli/context/store -# github.com/docker/docker v27.0.3+incompatible +# github.com/docker/docker v27.1.1+incompatible ## explicit github.com/docker/docker/api github.com/docker/docker/api/types From 98721a3a2ce2c9b0661ad9a9e48988117874003b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 31 Jul 2024 09:55:42 +0200 Subject: [PATCH 4/6] go.mod: github.com/docker/cli v27.1.1 full diff: https://github.com/docker/cli/compare/v27.0.3...v27.1.1 Signed-off-by: Sebastiaan van Stijn --- go.mod | 4 ++-- go.sum | 8 ++++---- .../docker/cli/cli/config/configfile/file.go | 1 + .../docker/cli/cli/context/store/store.go | 3 +++ .../docker-credential-helpers/client/client.go | 17 +++++------------ .../credentials/error.go | 11 +++++++---- vendor/modules.txt | 4 ++-- 7 files changed, 24 insertions(+), 24 deletions(-) diff --git a/go.mod b/go.mod index ac4735ca..f1f302bf 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/OpenPeeDeeP/xdg v0.2.1-0.20190312153938-4ba9e1eb294c github.com/boz/go-throttle v0.0.0-20160922054636-fdc4eab740c1 github.com/cloudfoundry/jibber_jabber v0.0.0-20151120183258-bcc4c8345a21 - github.com/docker/cli v27.0.3+incompatible + github.com/docker/cli v27.1.1+incompatible github.com/docker/docker v27.1.1+incompatible github.com/fatih/color v1.10.0 github.com/go-errors/errors v1.5.1 @@ -35,7 +35,7 @@ require ( github.com/containerd/log v0.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/distribution/reference v0.6.0 // indirect - github.com/docker/docker-credential-helpers v0.8.0 // indirect + github.com/docker/docker-credential-helpers v0.8.2 // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect diff --git a/go.sum b/go.sum index 387a2548..05ef54bf 100644 --- a/go.sum +++ b/go.sum @@ -17,12 +17,12 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/cli v27.0.3+incompatible h1:usGs0/BoBW8MWxGeEtqPMkzOY56jZ6kYlSN5BLDioCQ= -github.com/docker/cli v27.0.3+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v27.1.1+incompatible h1:goaZxOqs4QKxznZjjBWKONQci/MywhtRv2oNn0GkeZE= +github.com/docker/cli v27.1.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.8.0 h1:YQFtbBQb4VrpoPxhFuzEBPQ9E16qz5SpHLS+uswaCp8= -github.com/docker/docker-credential-helpers v0.8.0/go.mod h1:UGFXcuoQ5TxPiB54nHOZ32AWRqQdECoh/Mg0AlEYb40= +github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo= +github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= diff --git a/vendor/github.com/docker/cli/cli/config/configfile/file.go b/vendor/github.com/docker/cli/cli/config/configfile/file.go index ba9bc9d1..ae9dcb33 100644 --- a/vendor/github.com/docker/cli/cli/config/configfile/file.go +++ b/vendor/github.com/docker/cli/cli/config/configfile/file.go @@ -303,6 +303,7 @@ func (configFile *ConfigFile) GetAllCredentials() (map[string]types.AuthConfig, for registryHostname := range configFile.CredentialHelpers { newAuth, err := configFile.GetAuthConfig(registryHostname) if err != nil { + // TODO(thaJeztah): use context-logger, so that this output can be suppressed (in tests). logrus.WithError(err).Warnf("Failed to get credentials for registry: %s", registryHostname) continue } diff --git a/vendor/github.com/docker/cli/cli/context/store/store.go b/vendor/github.com/docker/cli/cli/context/store/store.go index 44e9477f..066b5769 100644 --- a/vendor/github.com/docker/cli/cli/context/store/store.go +++ b/vendor/github.com/docker/cli/cli/context/store/store.go @@ -124,6 +124,9 @@ func (s *ContextStore) List() ([]Metadata, error) { // Names return Metadata names for a Lister func Names(s Lister) ([]string, error) { + if s == nil { + return nil, errors.New("nil lister") + } list, err := s.List() if err != nil { return nil, err diff --git a/vendor/github.com/docker/docker-credential-helpers/client/client.go b/vendor/github.com/docker/docker-credential-helpers/client/client.go index 678153cf..7ca5ab72 100644 --- a/vendor/github.com/docker/docker-credential-helpers/client/client.go +++ b/vendor/github.com/docker/docker-credential-helpers/client/client.go @@ -16,11 +16,9 @@ func isValidCredsMessage(msg string) error { if credentials.IsCredentialsMissingServerURLMessage(msg) { return credentials.NewErrCredentialsMissingServerURL() } - if credentials.IsCredentialsMissingUsernameMessage(msg) { return credentials.NewErrCredentialsMissingUsername() } - return nil } @@ -36,13 +34,10 @@ func Store(program ProgramFunc, creds *credentials.Credentials) error { out, err := cmd.Output() if err != nil { - t := strings.TrimSpace(string(out)) - - if isValidErr := isValidCredsMessage(t); isValidErr != nil { + if isValidErr := isValidCredsMessage(string(out)); isValidErr != nil { err = isValidErr } - - return fmt.Errorf("error storing credentials - err: %v, out: `%s`", err, t) + return fmt.Errorf("error storing credentials - err: %v, out: `%s`", err, strings.TrimSpace(string(out))) } return nil @@ -55,17 +50,15 @@ func Get(program ProgramFunc, serverURL string) (*credentials.Credentials, error out, err := cmd.Output() if err != nil { - t := strings.TrimSpace(string(out)) - - if credentials.IsErrCredentialsNotFoundMessage(t) { + if credentials.IsErrCredentialsNotFoundMessage(string(out)) { return nil, credentials.NewErrCredentialsNotFound() } - if isValidErr := isValidCredsMessage(t); isValidErr != nil { + if isValidErr := isValidCredsMessage(string(out)); isValidErr != nil { err = isValidErr } - return nil, fmt.Errorf("error getting credentials - err: %v, out: `%s`", err, t) + return nil, fmt.Errorf("error getting credentials - err: %v, out: `%s`", err, strings.TrimSpace(string(out))) } resp := &credentials.Credentials{ diff --git a/vendor/github.com/docker/docker-credential-helpers/credentials/error.go b/vendor/github.com/docker/docker-credential-helpers/credentials/error.go index 8fa4d5d2..2283d5a4 100644 --- a/vendor/github.com/docker/docker-credential-helpers/credentials/error.go +++ b/vendor/github.com/docker/docker-credential-helpers/credentials/error.go @@ -1,6 +1,9 @@ package credentials -import "errors" +import ( + "errors" + "strings" +) const ( // ErrCredentialsNotFound standardizes the not found error, so every helper returns @@ -47,7 +50,7 @@ func IsErrCredentialsNotFound(err error) bool { // This function helps to check messages returned by an // external program via its standard output. func IsErrCredentialsNotFoundMessage(err string) bool { - return err == errCredentialsNotFoundMessage + return strings.TrimSpace(err) == errCredentialsNotFoundMessage } // errCredentialsMissingServerURL represents an error raised @@ -104,7 +107,7 @@ func IsCredentialsMissingServerURL(err error) bool { // IsCredentialsMissingServerURLMessage checks for an // errCredentialsMissingServerURL in the error message. func IsCredentialsMissingServerURLMessage(err string) bool { - return err == errCredentialsMissingServerURLMessage + return strings.TrimSpace(err) == errCredentialsMissingServerURLMessage } // IsCredentialsMissingUsername returns true if the error @@ -117,5 +120,5 @@ func IsCredentialsMissingUsername(err error) bool { // IsCredentialsMissingUsernameMessage checks for an // errCredentialsMissingUsername in the error message. func IsCredentialsMissingUsernameMessage(err string) bool { - return err == errCredentialsMissingUsernameMessage + return strings.TrimSpace(err) == errCredentialsMissingUsernameMessage } diff --git a/vendor/modules.txt b/vendor/modules.txt index c66091a8..511cfdbc 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -23,7 +23,7 @@ github.com/davecgh/go-spew/spew # github.com/distribution/reference v0.6.0 ## explicit; go 1.20 github.com/distribution/reference -# github.com/docker/cli v27.0.3+incompatible +# github.com/docker/cli v27.1.1+incompatible ## explicit github.com/docker/cli/cli/config github.com/docker/cli/cli/config/configfile @@ -60,7 +60,7 @@ github.com/docker/docker/errdefs github.com/docker/docker/internal/multierror github.com/docker/docker/pkg/ioutils github.com/docker/docker/pkg/stdcopy -# github.com/docker/docker-credential-helpers v0.8.0 +# github.com/docker/docker-credential-helpers v0.8.2 ## explicit; go 1.19 github.com/docker/docker-credential-helpers/client github.com/docker/docker-credential-helpers/credentials From b8a3ca1550db5ffdd46f4e32a1596f229e8c4412 Mon Sep 17 00:00:00 2001 From: kohath Date: Mon, 25 Nov 2024 21:27:27 +0800 Subject: [PATCH 5/6] Show jump panel keybindings in panel titles --- pkg/gui/views.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/gui/views.go b/pkg/gui/views.go index 60cf7201..3de6d61a 100644 --- a/pkg/gui/views.go +++ b/pkg/gui/views.go @@ -119,9 +119,11 @@ func (gui *Gui) createAllViews() error { gui.Views.Main.IgnoreCarriageReturns = true gui.Views.Project.Title = gui.Tr.ProjectTitle + gui.Views.Project.TitlePrefix = "[1]" gui.Views.Services.Highlight = true gui.Views.Services.Title = gui.Tr.ServicesTitle + gui.Views.Services.TitlePrefix = "[2]" gui.Views.Services.SelBgColor = selectedLineBgColor gui.Views.Containers.Highlight = true @@ -131,17 +133,21 @@ func (gui *Gui) createAllViews() error { } else { gui.Views.Containers.Title = gui.Tr.StandaloneContainersTitle } + gui.Views.Containers.TitlePrefix = "[3]" gui.Views.Images.Highlight = true gui.Views.Images.Title = gui.Tr.ImagesTitle gui.Views.Images.SelBgColor = selectedLineBgColor + gui.Views.Images.TitlePrefix = "[4]" gui.Views.Volumes.Highlight = true gui.Views.Volumes.Title = gui.Tr.VolumesTitle + gui.Views.Volumes.TitlePrefix = "[5]" gui.Views.Volumes.SelBgColor = selectedLineBgColor gui.Views.Networks.Highlight = true gui.Views.Networks.Title = gui.Tr.NetworksTitle + gui.Views.Networks.TitlePrefix = "[6]" gui.Views.Networks.SelBgColor = selectedLineBgColor gui.Views.Options.Frame = false From 15677ac3d2be0ab795f4e29a33a702eeb35af7e9 Mon Sep 17 00:00:00 2001 From: kohath Date: Sat, 7 Dec 2024 22:04:56 +0800 Subject: [PATCH 6/6] readme add manual install part --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 29b0a312..0af77059 100644 --- a/README.md +++ b/README.md @@ -229,6 +229,17 @@ If you encounter a compatibility issue with Docker bundled binary, try rebuildin the image with the build argument `--build-arg DOCKER_VERSION="v$(docker -v | cut -d" " -f3 | rev | cut -c 2- | rev)"` so that the bundled docker binary matches your host docker binary version. +### Manual + +You'll need to [install Go](https://golang.org/doc/install) + +``` +git clone https://github.com/jesseduffield/lazydocker.git +cd lazydocker +go install +``` + +You can also use `go run main.go` to compile and run in one go (pun definitely intended) ## Usage