From a719d10e22c5534043464a718906331e1e896e53 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Thu, 18 May 2023 19:30:44 +0200 Subject: [PATCH] termstatus: remove unused parameter from helpers --- internal/ui/termstatus/status.go | 4 ++-- internal/ui/termstatus/terminal_unix.go | 4 ++-- internal/ui/termstatus/terminal_windows.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/ui/termstatus/status.go b/internal/ui/termstatus/status.go index 5b310ec80..6e8ddfe7c 100644 --- a/internal/ui/termstatus/status.go +++ b/internal/ui/termstatus/status.go @@ -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. t.canUpdateStatus = true t.fd = d.Fd() - t.clearCurrentLine = clearCurrentLine(wr, t.fd) - t.moveCursorUp = moveCursorUp(wr, t.fd) + t.clearCurrentLine = clearCurrentLine(t.fd) + t.moveCursorUp = moveCursorUp(t.fd) } return t diff --git a/internal/ui/termstatus/terminal_unix.go b/internal/ui/termstatus/terminal_unix.go index 719016939..e112be233 100644 --- a/internal/ui/termstatus/terminal_unix.go +++ b/internal/ui/termstatus/terminal_unix.go @@ -12,12 +12,12 @@ import ( // clearCurrentLine removes all characters from the current line and resets the // 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 } // 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 } diff --git a/internal/ui/termstatus/terminal_windows.go b/internal/ui/termstatus/terminal_windows.go index c7919a7b7..7bf5b0a37 100644 --- a/internal/ui/termstatus/terminal_windows.go +++ b/internal/ui/termstatus/terminal_windows.go @@ -15,7 +15,7 @@ import ( // clearCurrentLine removes all characters from the current line and resets the // 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 if isWindowsTerminal(fd) { 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. -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 if isWindowsTerminal(fd) { return windowsMoveCursorUp