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

     1  package translatableerror
     2  
     3  import (
     4  	"strings"
     5  )
     6  
     7  type PropertyCombinationError struct {
     8  	AppName    string
     9  	Properties []string
    10  }
    11  
    12  func (e PropertyCombinationError) Error() string {
    13  	return "Application {{.AppName}} cannot use the combination of properties: {{.Properties}}"
    14  }
    15  
    16  func (e PropertyCombinationError) Translate(translate func(string, ...interface{}) string) string {
    17  	return translate(e.Error(), map[string]interface{}{
    18  		"AppName":    e.AppName,
    19  		"Properties": strings.Join(e.Properties, ", "),
    20  	})
    21  }