github.com/cloudfoundry/cli@v7.1.0+incompatible/command/translatableerror/command_line_options_and_manifest_conflict_error.go (about)

     1  package translatableerror
     2  
     3  import "strings"
     4  
     5  type CommandLineOptionsAndManifestConflictError struct {
     6  	ManifestAttribute  string
     7  	CommandLineOptions []string
     8  }
     9  
    10  func (e CommandLineOptionsAndManifestConflictError) Error() string {
    11  	return "The following arguments cannot be used with an app manifest that declares routes using the '{{.ManifestAttribute}}' attribute: {{.CommandLineOptions}}"
    12  }
    13  
    14  func (e CommandLineOptionsAndManifestConflictError) Translate(translate func(string, ...interface{}) string) string {
    15  	return translate(e.Error(), map[string]interface{}{
    16  		"ManifestAttribute":  e.ManifestAttribute,
    17  		"CommandLineOptions": strings.Join(e.CommandLineOptions, ", "),
    18  	})
    19  }