github.com/sleungcy-sap/cli@v7.1.0+incompatible/command/translatableerror/getting_plugin_repository_error.go (about) 1 package translatableerror 2 3 // GettingPluginRepositoryError is returned when there's an error 4 // accessing the plugin repository 5 type GettingPluginRepositoryError struct { 6 Name string 7 Message string 8 } 9 10 func (GettingPluginRepositoryError) Error() string { 11 return "Could not get plugin repository '{{.RepositoryName}}'\n{{.ErrorMessage}}" 12 } 13 14 func (e GettingPluginRepositoryError) Translate(translate func(string, ...interface{}) string) string { 15 return translate(e.Error(), map[string]interface{}{"RepositoryName": e.Name, "ErrorMessage": e.Message}) 16 }