Skip to content

Commit

Permalink
switch to yaml fork so that we can view omitEmpty yaml fields when pr…
Browse files Browse the repository at this point in the history
…inting the config
  • Loading branch information
jesseduffield committed Jun 28, 2019
1 parent f3491cf commit 2ef5edc
Show file tree
Hide file tree
Showing 21 changed files with 67 additions and 18 deletions.
18 changes: 9 additions & 9 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@
[[constraint]]
branch = "master"
name = "github.com/jesseduffield/asciigraph"

[[constraint]]
branch = "v2"
name = "github.com/jesseduffield/yaml"
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/go-errors/errors"
"github.com/jesseduffield/lazydocker/pkg/app"
"github.com/jesseduffield/lazydocker/pkg/config"
"gopkg.in/yaml.v2"
"github.com/jesseduffield/yaml"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion pkg/config/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"path/filepath"
"time"

yaml "github.com/jesseduffield/yaml"
"github.com/shibukawa/configdir"
yaml "gopkg.in/yaml.v2"
)

// AppConfig contains the base configuration fields required for lazygit.
Expand Down
6 changes: 3 additions & 3 deletions pkg/gui/status_panel.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazydocker/pkg/commands"
"github.com/jesseduffield/lazydocker/pkg/utils"
"gopkg.in/yaml.v2"
"github.com/jesseduffield/yaml"
)

func (gui *Gui) getStatusContexts() []string {
Expand Down Expand Up @@ -86,7 +86,7 @@ func (gui *Gui) renderCredits() error {
mainView.Wrap = true

var configBuf bytes.Buffer
yaml.NewEncoder(&configBuf).Encode(gui.Config.UserConfig)
yaml.NewEncoder(&configBuf, yaml.IncludeOmitted).Encode(gui.Config.UserConfig)

dashboardString := strings.Join(
[]string{
Expand All @@ -96,7 +96,7 @@ func (gui *Gui) renderCredits() error {
"Config Options: https://github.com/jesseduffield/lazydocker/blob/master/docs/Config.md",
"Raise an Issue: https://github.com/jesseduffield/lazydocker/issues",
utils.ColoredString("Buy Jesse a coffee: https://donorbox.org/lazydocker", color.FgMagenta), // caffeine ain't free
"Here's what you lazydocker config is when merged with the defaults (you can open your config by pressing 'o'):",
"Here's your lazydocker config when merged in with the defaults (you can open your config by pressing 'o'):",
configBuf.String(),
}, "\n\n")

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.

0 comments on commit 2ef5edc

Please sign in to comment.