github.com/sleungcy-sap/cli@v7.1.0+incompatible/cf/errors/model_not_found_error.go (about)

     1  package errors
     2  
     3  import (
     4  	. "code.cloudfoundry.org/cli/cf/i18n"
     5  )
     6  
     7  type ModelNotFoundError struct {
     8  	ModelType string
     9  	ModelName string
    10  }
    11  
    12  func NewModelNotFoundError(modelType, name string) error {
    13  	return &ModelNotFoundError{
    14  		ModelType: modelType,
    15  		ModelName: name,
    16  	}
    17  }
    18  
    19  func (err *ModelNotFoundError) Error() string {
    20  	return err.ModelType + " " + err.ModelName + T(" not found")
    21  }