github.com/lukasheimann/cloudfoundrycli@v7.1.0+incompatible/command/translatableerror/plugin_already_installed_error.go (about)

     1  package translatableerror
     2  
     3  // PluginAlreadyInstalledError is returned when the plugin has the same name as
     4  // an installed plugin.
     5  type PluginAlreadyInstalledError struct {
     6  	BinaryName string
     7  	Name       string
     8  	Version    string
     9  }
    10  
    11  func (PluginAlreadyInstalledError) Error() string {
    12  	return "Plugin {{.Name}} {{.Version}} could not be installed. A plugin with that name is already installed.\nTIP: Use '{{.BinaryName}} install-plugin -f' to force a reinstall."
    13  }
    14  
    15  func (e PluginAlreadyInstalledError) Translate(translate func(string, ...interface{}) string) string {
    16  	return translate(e.Error(), map[string]interface{}{
    17  		"BinaryName": e.BinaryName,
    18  		"Name":       e.Name,
    19  		"Version":    e.Version,
    20  	})
    21  }