Replace lots of unused parameters with _

The parameters are required by the implemented function signature or interface.
This commit is contained in:
Michael Eischer
2023-05-18 19:27:38 +02:00
parent d1a5ec7839
commit 472bf5184f
19 changed files with 30 additions and 30 deletions

View File

@@ -15,7 +15,7 @@ const (
// posixClearCurrentLine removes all characters from the current line and resets the
// cursor position to the first column.
func posixClearCurrentLine(wr io.Writer, fd uintptr) {
func posixClearCurrentLine(wr io.Writer, _ uintptr) {
// clear current line
_, err := wr.Write([]byte(posixControlMoveCursorHome + posixControlClearLine))
if err != nil {
@@ -25,7 +25,7 @@ func posixClearCurrentLine(wr io.Writer, fd uintptr) {
}
// posixMoveCursorUp moves the cursor to the line n lines above the current one.
func posixMoveCursorUp(wr io.Writer, fd uintptr, n int) {
func posixMoveCursorUp(wr io.Writer, _ uintptr, n int) {
data := []byte(posixControlMoveCursorHome)
data = append(data, bytes.Repeat([]byte(posixControlMoveCursorUp), n)...)
_, err := wr.Write(data)

View File

@@ -45,7 +45,7 @@ var (
// windowsClearCurrentLine removes all characters from the current line and
// resets the cursor position to the first column.
func windowsClearCurrentLine(wr io.Writer, fd uintptr) {
func windowsClearCurrentLine(_ io.Writer, fd uintptr) {
var info windows.ConsoleScreenBufferInfo
windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info)
@@ -61,7 +61,7 @@ func windowsClearCurrentLine(wr io.Writer, fd uintptr) {
}
// windowsMoveCursorUp moves the cursor to the line n lines above the current one.
func windowsMoveCursorUp(wr io.Writer, fd uintptr, n int) {
func windowsMoveCursorUp(_ io.Writer, fd uintptr, n int) {
var info windows.ConsoleScreenBufferInfo
windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info)