Rename stepParentIndent
to getIndent
This commit is contained in:
parent
db079b1b0a
commit
aa482a124a
|
@ -133,7 +133,7 @@ func (acts *deployActions) OnResourceStepPre(step deploy.Step) (interface{}, err
|
|||
// Ensure we've marked this step as observed.
|
||||
acts.Seen[step.URN()] = step
|
||||
|
||||
indent := stepParentIndent(step, acts.Seen)
|
||||
indent := getIndent(step, acts.Seen)
|
||||
summary := getResourcePropertiesSummary(step, indent)
|
||||
details := getResourcePropertiesDetails(step, indent, false, acts.Opts.Debug)
|
||||
acts.Opts.Events <- resourcePreEvent(step, indent, summary, details)
|
||||
|
@ -164,7 +164,7 @@ func (acts *deployActions) OnResourceStepPost(ctx interface{},
|
|||
}
|
||||
|
||||
// Also show outputs here, since there might be some from the initial registration.
|
||||
indent := stepParentIndent(step, acts.Seen)
|
||||
indent := getIndent(step, acts.Seen)
|
||||
text := getResourceOutputsPropertiesString(step, indent, false, acts.Opts.Debug)
|
||||
acts.Opts.Events <- resourceOutputsEvent(step, indent, text)
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ func (acts *deployActions) OnResourceStepPost(ctx interface{},
|
|||
func (acts *deployActions) OnResourceOutputs(step deploy.Step) error {
|
||||
assertSeen(acts.Seen, step)
|
||||
|
||||
indent := stepParentIndent(step, acts.Seen)
|
||||
indent := getIndent(step, acts.Seen)
|
||||
text := getResourceOutputsPropertiesString(step, indent, false, acts.Opts.Debug)
|
||||
acts.Opts.Events <- resourceOutputsEvent(step, indent, text)
|
||||
|
||||
|
|
|
@ -209,8 +209,8 @@ func assertSeen(seen map[resource.URN]deploy.Step, step deploy.Step) {
|
|||
contract.Assertf(has, "URN '%v' had not been marked as seen", step.URN())
|
||||
}
|
||||
|
||||
// stepParentIndent computes a step's parent indentation. If print is true, it also prints parents as it goes.
|
||||
func stepParentIndent(step deploy.Step, seen map[resource.URN]deploy.Step) int {
|
||||
// getIndent computes a step's parent indentation.
|
||||
func getIndent(step deploy.Step, seen map[resource.URN]deploy.Step) int {
|
||||
indent := 0
|
||||
for p := step.Res().Parent; p != ""; {
|
||||
par := seen[p]
|
||||
|
|
|
@ -79,7 +79,7 @@ func newPreviewActions(opts deployOptions) *previewActions {
|
|||
func (acts *previewActions) OnResourceStepPre(step deploy.Step) (interface{}, error) {
|
||||
acts.Seen[step.URN()] = step
|
||||
|
||||
indent := stepParentIndent(step, acts.Seen)
|
||||
indent := getIndent(step, acts.Seen)
|
||||
summary := getResourcePropertiesSummary(step, indent)
|
||||
details := getResourcePropertiesDetails(step, indent, true, acts.Opts.Debug)
|
||||
acts.Opts.Events <- resourcePreEvent(step, indent, summary, details)
|
||||
|
@ -106,7 +106,7 @@ func (acts *previewActions) OnResourceStepPost(ctx interface{},
|
|||
func (acts *previewActions) OnResourceOutputs(step deploy.Step) error {
|
||||
assertSeen(acts.Seen, step)
|
||||
|
||||
indent := stepParentIndent(step, acts.Seen)
|
||||
indent := getIndent(step, acts.Seen)
|
||||
text := getResourceOutputsPropertiesString(step, indent, true, acts.Opts.Debug)
|
||||
acts.Opts.Events <- resourceOutputsEvent(step, indent, text)
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue