github.com/cloudfoundry/cli@v7.1.0+incompatible/command/translatableerror/service_instance_not_shared_to_space_error.go (about)

     1  package translatableerror
     2  
     3  import "fmt"
     4  
     5  // ServiceInstanceNotSharedToSpaceError is returned when attempting to unshare a service instance from a space to which it is not shared.
     6  type ServiceInstanceNotSharedToSpaceError struct {
     7  	ServiceInstanceName string
     8  }
     9  
    10  func (e ServiceInstanceNotSharedToSpaceError) Error() string {
    11  	return fmt.Sprintf("Failed to unshare service instance '{{.ServiceInstance}}'. Ensure the space and specified org exist and that the service instance has been shared to this space.")
    12  }
    13  
    14  func (e ServiceInstanceNotSharedToSpaceError) Translate(translate func(string, ...interface{}) string) string {
    15  	return translate(e.Error(), map[string]interface{}{
    16  		"ServiceInstance": e.ServiceInstanceName,
    17  	})
    18  }