Remove "double" formatting

This commit is contained in:
Stefan Haller 2024-08-23 20:15:56 +02:00
parent 24841f22f1
commit 63aa32c521
2 changed files with 5 additions and 8 deletions

View file

@ -131,11 +131,9 @@ func (self *HandlerCreator) inputPrompt(prompt *config.CustomCommandPrompt, wrap
func (self *HandlerCreator) generateFindSuggestionsFunc(prompt *config.CustomCommandPrompt) (func(string) []*types.Suggestion, error) {
if prompt.Suggestions.Preset != "" && prompt.Suggestions.Command != "" {
return nil, fmt.Errorf(
fmt.Sprintf(
"Custom command prompt cannot have both a preset and a command for suggestions. Preset: '%s', Command: '%s'",
prompt.Suggestions.Preset,
prompt.Suggestions.Command,
),
"Custom command prompt cannot have both a preset and a command for suggestions. Preset: '%s', Command: '%s'",
prompt.Suggestions.Preset,
prompt.Suggestions.Command,
)
} else if prompt.Suggestions.Preset != "" {
return self.getPresetSuggestionsFn(prompt.Suggestions.Preset)