github.com/cloudfoundry-attic/cli-with-i18n@v6.32.1-0.20171002233121-7401370d3b85+incompatible/command/translatableerror/stack_not_found_error.go (about) 1 package translatableerror 2 3 type StackNotFoundError struct { 4 GUID string 5 Name string 6 } 7 8 func (e StackNotFoundError) Error() string { 9 if e.Name == "" { 10 return "Stack with GUID {{.GUID}} not found" 11 } 12 13 return "Stack {{.Name}} not found" 14 } 15 16 func (e StackNotFoundError) Translate(translate func(string, ...interface{}) string) string { 17 return translate(e.Error(), map[string]interface{}{ 18 "GUID": e.GUID, 19 "Name": e.Name, 20 }) 21 }