MCPcopy Index your code
hub / github.com/cloudfoundry/cli / DisplayChangesForPush

Method DisplayChangesForPush

util/ui/ui_for_push.go:73–94  ·  view source on GitHub ↗

DisplayChangesForPush will display the set of changes via DisplayChangeForPush in the order given.

(changeSet []Change)

Source from the content-addressed store, hash-verified

71// DisplayChangesForPush will display the set of changes via
72// DisplayChangeForPush in the order given.
73func (ui *UI) DisplayChangesForPush(changeSet []Change) error {
74 if len(changeSet) == 0 {
75 return nil
76 }
77
78 var columnWidth int
79 for _, change := range changeSet {
80 if width := wordSize(ui.TranslateText(change.Header)); width > columnWidth {
81 columnWidth = width
82 }
83 }
84
85 for _, change := range changeSet {
86 padding := columnWidth - wordSize(ui.TranslateText(change.Header)) + 3
87 err := ui.DisplayChangeForPush(change.Header, padding, change.HiddenValue, change.CurrentValue, change.NewValue)
88 if err != nil {
89 return err
90 }
91 }
92
93 return nil
94}
95
96func (ui UI) displayDiffForInt(offset string, header string, oldValue int, newValue int) {
97 if oldValue != newValue {

Callers

nothing calls this directly

Calls 3

TranslateTextMethod · 0.95
DisplayChangeForPushMethod · 0.95
wordSizeFunction · 0.85

Tested by

no test coverage detected