github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/actor/actionerror/service_plan_not_found_error.go (about) 1 package actionerror 2 3 import "fmt" 4 5 type ServicePlanNotFoundError struct { 6 PlanName string 7 OfferingName string 8 ServiceBrokerName string 9 } 10 11 func (e ServicePlanNotFoundError) Error() string { 12 if e.OfferingName != "" && e.PlanName != "" { 13 if e.ServiceBrokerName != "" { 14 return fmt.Sprintf("The plan %s could not be found for service offering %s and broker %s.", e.PlanName, e.OfferingName, e.ServiceBrokerName) 15 } 16 return fmt.Sprintf("The plan %s could not be found for service offering %s.", e.PlanName, e.OfferingName) 17 } 18 19 if e.PlanName != "" { 20 return fmt.Sprintf("Service plan '%s' not found.", e.PlanName) 21 } 22 23 if e.OfferingName != "" { 24 return fmt.Sprintf("No service plans found for service offering '%s'.", e.OfferingName) 25 } 26 27 return "No service plans found." 28 }