github.com/mook-as/cf-cli@v7.0.0-beta.28.0.20200120190804-b91c115fae48+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 }