mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
Make YAML format as default; disable "yml" alias for YAML
This commit is contained in:
parent
036c3e4220
commit
da5df63d5c
2 changed files with 3 additions and 3 deletions
|
|
@ -132,7 +132,7 @@ type GuiConfig struct {
|
||||||
ExpandFocusedSidePanel bool `yaml:"expandFocusedSidePanel"`
|
ExpandFocusedSidePanel bool `yaml:"expandFocusedSidePanel"`
|
||||||
|
|
||||||
// DetailsFormat determines in which format will be printed container stats and configs
|
// DetailsFormat determines in which format will be printed container stats and configs
|
||||||
// By default "json", available values "json", "yaml" ("yml")
|
// By default "yaml", available values "json", "yaml"
|
||||||
DetailsFormat string `yaml:"detailsFormat,omitempty"`
|
DetailsFormat string `yaml:"detailsFormat,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -366,7 +366,7 @@ func GetDefaultConfig() UserConfig {
|
||||||
SidePanelWidth: 0.3333,
|
SidePanelWidth: 0.3333,
|
||||||
ShowBottomLine: true,
|
ShowBottomLine: true,
|
||||||
ExpandFocusedSidePanel: false,
|
ExpandFocusedSidePanel: false,
|
||||||
DetailsFormat: "json",
|
DetailsFormat: "yaml",
|
||||||
},
|
},
|
||||||
ConfirmOnQuit: false,
|
ConfirmOnQuit: false,
|
||||||
Logs: LogsConfig{
|
Logs: LogsConfig{
|
||||||
|
|
|
||||||
|
|
@ -350,7 +350,7 @@ func MarshalIntoFormat(data interface{}, format string) ([]byte, error) {
|
||||||
switch format {
|
switch format {
|
||||||
case "json":
|
case "json":
|
||||||
return dataJSON, err
|
return dataJSON, err
|
||||||
case "yaml", "yml":
|
case "yaml":
|
||||||
// Use Unmarshal->Marshal hack to convert vendor-locked objects to YAML with same structure as JSON
|
// Use Unmarshal->Marshal hack to convert vendor-locked objects to YAML with same structure as JSON
|
||||||
var dataMirror yaml.MapSlice
|
var dataMirror yaml.MapSlice
|
||||||
if err := yaml.Unmarshal(dataJSON, &dataMirror); err != nil {
|
if err := yaml.Unmarshal(dataJSON, &dataMirror); err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue