1
1
mirror of https://github.com/walles/moar.git synced 2024-11-30 12:42:26 +03:00

Fix some error messages

After testing. The invalid value is already printed by the framework, no
need to include it in the error message.
This commit is contained in:
Johan Walles 2024-01-02 15:36:45 +01:00
parent 4264d277dc
commit cd2a8a9d09

View File

@ -170,8 +170,7 @@ func parseLexerOption(lexerOption string) (chroma.Lexer, error) {
}
return nil, fmt.Errorf(
"Unsupported language %s, look here form inspiration: https://github.com/alecthomas/chroma/tree/master/lexers/embedded",
lexerOption,
"Look here for inspiration: https://github.com/alecthomas/chroma/tree/master/lexers/embedded",
)
}
@ -220,7 +219,7 @@ func parseStatusBarStyle(styleOption string) (m.StatusBarOption, error) {
return m.STATUSBAR_STYLE_BOLD, nil
}
return 0, fmt.Errorf("good ones are inverse, plain and bold")
return 0, fmt.Errorf("Good ones are inverse, plain and bold")
}
func parseUnprintableStyle(styleOption string) (m.UnprintableStyle, error) {
@ -252,7 +251,7 @@ func parseShiftAmount(shiftAmount string) (uint, error) {
}
if value < 1 {
return 0, fmt.Errorf("Shift amount must be at least 1, was %d", value)
return 0, fmt.Errorf("Shift amount must be at least 1")
}
// Let's add an upper bound as well if / when requested