termstatus: remove unused parameter from helpers

This commit is contained in:
Michael Eischer 2023-05-18 19:30:44 +02:00
parent b0a01ae68a
commit a719d10e22
3 changed files with 6 additions and 6 deletions

View file

@ -74,8 +74,8 @@ func New(wr io.Writer, errWriter io.Writer, disableStatus bool) *Terminal {
// only use the fancy status code when we're running on a real terminal. // only use the fancy status code when we're running on a real terminal.
t.canUpdateStatus = true t.canUpdateStatus = true
t.fd = d.Fd() t.fd = d.Fd()
t.clearCurrentLine = clearCurrentLine(wr, t.fd) t.clearCurrentLine = clearCurrentLine(t.fd)
t.moveCursorUp = moveCursorUp(wr, t.fd) t.moveCursorUp = moveCursorUp(t.fd)
} }
return t return t

View file

@ -12,12 +12,12 @@ import (
// clearCurrentLine removes all characters from the current line and resets the // clearCurrentLine removes all characters from the current line and resets the
// cursor position to the first column. // cursor position to the first column.
func clearCurrentLine(wr io.Writer, fd uintptr) func(io.Writer, uintptr) { func clearCurrentLine(_ uintptr) func(io.Writer, uintptr) {
return posixClearCurrentLine return posixClearCurrentLine
} }
// moveCursorUp moves the cursor to the line n lines above the current one. // moveCursorUp moves the cursor to the line n lines above the current one.
func moveCursorUp(wr io.Writer, fd uintptr) func(io.Writer, uintptr, int) { func moveCursorUp(_ uintptr) func(io.Writer, uintptr, int) {
return posixMoveCursorUp return posixMoveCursorUp
} }

View file

@ -15,7 +15,7 @@ import (
// clearCurrentLine removes all characters from the current line and resets the // clearCurrentLine removes all characters from the current line and resets the
// cursor position to the first column. // cursor position to the first column.
func clearCurrentLine(wr io.Writer, fd uintptr) func(io.Writer, uintptr) { func clearCurrentLine(fd uintptr) func(io.Writer, uintptr) {
// easy case, the terminal is cmd or psh, without redirection // easy case, the terminal is cmd or psh, without redirection
if isWindowsTerminal(fd) { if isWindowsTerminal(fd) {
return windowsClearCurrentLine return windowsClearCurrentLine
@ -26,7 +26,7 @@ func clearCurrentLine(wr io.Writer, fd uintptr) func(io.Writer, uintptr) {
} }
// moveCursorUp moves the cursor to the line n lines above the current one. // moveCursorUp moves the cursor to the line n lines above the current one.
func moveCursorUp(wr io.Writer, fd uintptr) func(io.Writer, uintptr, int) { func moveCursorUp(fd uintptr) func(io.Writer, uintptr, int) {
// easy case, the terminal is cmd or psh, without redirection // easy case, the terminal is cmd or psh, without redirection
if isWindowsTerminal(fd) { if isWindowsTerminal(fd) {
return windowsMoveCursorUp return windowsMoveCursorUp