github.com/sleungcy-sap/cli@v7.1.0+incompatible/command/translatableerror/flag_no_longer_supported_error.go (about)

     1  package translatableerror
     2  
     3  // FlagNoLongerSupportedError can be used to indicate a flag is no longer supported
     4  type FlagNoLongerSupportedError struct {
     5  	Flag string
     6  }
     7  
     8  func (e FlagNoLongerSupportedError) Error() string {
     9  	return "Flag '{{.Flag}}' is no longer supported."
    10  }
    11  
    12  func (e FlagNoLongerSupportedError) Translate(translate func(string, ...interface{}) string) string {
    13  	return translate(e.Error(), map[string]interface{}{
    14  		"Flag": e.Flag,
    15  	})
    16  }