github.com/lukasheimann/cloudfoundrycli@v7.1.0+incompatible/actor/actionerror/trigger_legacy_push_error.go (about)

     1  package actionerror
     2  
     3  import (
     4  	"fmt"
     5  	"strings"
     6  )
     7  
     8  type TriggerLegacyPushError struct {
     9  	DomainHostRelated  []string
    10  	GlobalRelated      []string
    11  	InheritanceRelated bool
    12  	RandomRouteRelated bool
    13  }
    14  
    15  func (e TriggerLegacyPushError) Error() string {
    16  	if len(e.DomainHostRelated) > 0 || len(e.GlobalRelated) > 0 {
    17  		return fmt.Sprintf("Triggering legacy push due to - Inheritance: %t, Random Route: %t, and Found: %s", e.InheritanceRelated, e.RandomRouteRelated, strings.Join(append(e.DomainHostRelated, e.GlobalRelated...), ", "))
    18  	}
    19  	return fmt.Sprintf("Triggering legacy push due to - Inheritance: %t and Random Route: %t", e.InheritanceRelated, e.RandomRouteRelated)
    20  }