github.com/sleungcy/cli@v7.1.0+incompatible/command/translatableerror/repository_name_taken_error.go (about) 1 package translatableerror 2 3 // RepositoryNameTakenError is returned when adding a plugin repository 4 // fails due to a repository already existing with the same name 5 type RepositoryNameTakenError struct { 6 Name string 7 } 8 9 func (RepositoryNameTakenError) Error() string { 10 return "Plugin repo named '{{.RepositoryName}}' already exists, please use another name." 11 } 12 13 func (e RepositoryNameTakenError) Translate(translate func(string, ...interface{}) string) string { 14 return translate(e.Error(), map[string]interface{}{"RepositoryName": e.Name}) 15 }