github.com/jenspinney/cli@v6.42.1-0.20190207184520-7450c600020e+incompatible/command/translatableerror/service_plan_not_found_error.go (about)

     1  package translatableerror
     2  
     3  type ServicePlanNotFoundError struct {
     4  	PlanName    string
     5  	ServiceName string
     6  }
     7  
     8  func (e ServicePlanNotFoundError) Error() string {
     9  	return "The plan {{.PlanName}} could not be found for service {{.ServiceName}}"
    10  }
    11  
    12  func (e ServicePlanNotFoundError) Translate(translate func(string, ...interface{}) string) string {
    13  	return translate(e.Error(), map[string]interface{}{
    14  		"PlanName":    e.PlanName,
    15  		"ServiceName": e.ServiceName,
    16  	})
    17  }