- fixes printf: non-constant format string in call to fmt.Printf
- fixes SA1032: arguments have the wrong order
- disables testifylint
This commit is contained in:
Michael Yang
2024-08-13 13:40:37 -07:00
parent 4c4fe3f87f
commit 2697d7f5aa
5 changed files with 70 additions and 75 deletions

View File

@@ -98,7 +98,7 @@ func (i *Instance) Readline() (string, error) {
showPlaceholder := !i.Pasting || i.Prompt.UseAlt
if buf.IsEmpty() && showPlaceholder {
ph := i.Prompt.placeholder()
fmt.Printf(ColorGrey + ph + fmt.Sprintf(CursorLeftN, len(ph)) + ColorDefault)
fmt.Print(ColorGrey + ph + CursorLeftN(len(ph)) + ColorDefault)
}
r, err := i.Terminal.Read()