[UX] Fix default value of ImageRegistry in odo preference view output (#6951)

* [UX] Fix default value of ImageRegistry in odo preference view output

Signed-off-by: Parthvi <parthvi.vala@gmail.com>

* Update pkg/preference/machine_output.go

Co-authored-by: Armel Soro <armel@rm3l.org>

---------

Signed-off-by: Parthvi <parthvi.vala@gmail.com>
Co-authored-by: Armel Soro <armel@rm3l.org>
This commit is contained in:
Parthvi Vala
2023-07-06 01:02:15 +05:30
committed by GitHub
parent 3b73c806db
commit 5911930a11

View File

@@ -81,7 +81,7 @@ func HumanReadableOutput(preferenceList api.PreferenceList, registryList []api.R
preferenceT.SortBy([]table.SortBy{{Name: "PARAMETER", Mode: table.Asc}})
for _, pref := range preferenceList.Items {
value := showBlankIfNil(pref.Value)
if reflect.DeepEqual(value, pref.Default) {
if value != "" && reflect.DeepEqual(value, pref.Default) {
value = fmt.Sprintf("%v (default)", value)
}
preferenceT.AppendRow(table.Row{pref.Name, value})