github.com/cloudfoundry/cli@v7.1.0+incompatible/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 } 9 10 func (e ServicePlanNotFoundError) Error() string { 11 if e.OfferingName != "" && e.PlanName != "" { 12 return fmt.Sprintf("The plan %s could not be found for service %s.", e.PlanName, e.OfferingName) 13 } 14 15 if e.PlanName != "" { 16 return fmt.Sprintf("Service plan '%s' not found.", e.PlanName) 17 } 18 19 if e.OfferingName != "" { 20 return fmt.Sprintf("No service plans found for service offering '%s'.", e.OfferingName) 21 } 22 23 return "No service plans found." 24 }