github.com/wanddynosios/cli/v8@v8.7.9-0.20240221182337-1a92e3a7017f/api/cloudcontroller/ccerror/service_offering_not_found_error.go (about)

     1  package ccerror
     2  
     3  import "fmt"
     4  
     5  type ServiceOfferingNotFoundError struct {
     6  	ServiceOfferingName, ServiceBrokerName string
     7  }
     8  
     9  func (e ServiceOfferingNotFoundError) Error() string {
    10  	if e.ServiceOfferingName != "" && e.ServiceBrokerName != "" {
    11  		return fmt.Sprintf("Service offering '%s' for service broker '%s' not found.", e.ServiceOfferingName, e.ServiceBrokerName)
    12  	}
    13  
    14  	if e.ServiceOfferingName != "" {
    15  		return fmt.Sprintf("Service offering '%s' not found.", e.ServiceOfferingName)
    16  	}
    17  
    18  	if e.ServiceBrokerName != "" {
    19  		return fmt.Sprintf("No service offerings found for service broker '%s'.", e.ServiceBrokerName)
    20  	}
    21  
    22  	return "No service offerings found."
    23  }