github.com/cloudfoundry/cli@v7.1.0+incompatible/actor/actionerror/duplicate_service_plan_error.go (about) 1 package actionerror 2 3 import "fmt" 4 5 type DuplicateServicePlanError struct { 6 Name string 7 ServiceOfferingName string 8 ServiceBrokerName string 9 } 10 11 func (e DuplicateServicePlanError) Error() string { 12 base := fmt.Sprintf("Service plan '%s' is provided by multiple service offerings", e.Name) 13 requiredFlag := "Specify an offering by using the '-e' flag" 14 if e.ServiceOfferingName != "" { 15 base = fmt.Sprintf("%s. "+ 16 "Service offering '%s' is provided by multiple service brokers", base, e.ServiceOfferingName) 17 requiredFlag = "Specify a broker name by using the '-b' flag" 18 } 19 return fmt.Sprintf("%s. %s.", base, requiredFlag) 20 }