github.com/franc20/ayesa_sap@v7.0.0-beta.28.0.20200124003224-302d4d52fa6c+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 }