github.com/loafoe/cli@v7.1.0+incompatible/command/translatableerror/add_plugin_repository_error.go (about) 1 package translatableerror 2 3 type AddPluginRepositoryError struct { 4 Name string 5 URL string 6 Message string 7 } 8 9 func (AddPluginRepositoryError) Error() string { 10 return "Could not add repository '{{.RepositoryName}}' from {{.RepositoryURL}}: {{.Message}}" 11 } 12 13 func (e AddPluginRepositoryError) Translate(translate func(string, ...interface{}) string) string { 14 return translate(e.Error(), map[string]interface{}{ 15 "RepositoryName": e.Name, 16 "RepositoryURL": e.URL, 17 "Message": e.Message, 18 }) 19 }