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

     1  package translatableerror
     2  
     3  type ApplicationNotFoundError struct {
     4  	GUID string
     5  	Name string
     6  }
     7  
     8  func (e ApplicationNotFoundError) Error() string {
     9  	if e.GUID != "" {
    10  		return "Application with GUID {{.GUID}} not found."
    11  	}
    12  	return "App '{{.AppName}}' not found."
    13  }
    14  
    15  func (e ApplicationNotFoundError) Translate(translate func(string, ...interface{}) string) string {
    16  	return translate(e.Error(), map[string]interface{}{
    17  		"GUID":    e.GUID,
    18  		"AppName": e.Name,
    19  	})
    20  }