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

     1  package translatableerror
     2  
     3  type InvalidYAMLError struct {
     4  	Err error
     5  }
     6  
     7  func (e InvalidYAMLError) Error() string {
     8  	return "The option --vars-file expects a valid YAML file. {{.ErrorMessage}}"
     9  }
    10  
    11  func (e InvalidYAMLError) Translate(translate func(string, ...interface{}) string) string {
    12  	return translate(e.Error(), map[string]interface{}{
    13  		"ErrorMessage": e.Err.Error(),
    14  	})
    15  }