github.com/DaAlbrecht/cf-cli@v0.0.0-20231128151943-1fe19bb400b9/actor/actionerror/service_key_not_found_error.go (about)

     1  package actionerror
     2  
     3  import "fmt"
     4  
     5  type ServiceKeyNotFoundError struct {
     6  	KeyName             string
     7  	ServiceInstanceName string
     8  }
     9  
    10  func NewServiceKeyNotFoundError(keyName, serviceInstanceName string) error {
    11  	return ServiceKeyNotFoundError{
    12  		KeyName:             keyName,
    13  		ServiceInstanceName: serviceInstanceName,
    14  	}
    15  }
    16  
    17  func (e ServiceKeyNotFoundError) Error() string {
    18  	return fmt.Sprintf("No service key %s found for service instance %s", e.KeyName, e.ServiceInstanceName)
    19  }