github.com/ablease/cli@v6.37.1-0.20180613014814-3adbb7d7fb19+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 }