From 355f4091f65e9a2cc239f7e41a794a4cfe46e9e0 Mon Sep 17 00:00:00 2001 From: Richard Wilkes Date: Fri, 6 Dec 2024 13:11:21 -0800 Subject: [PATCH] Fix linter issues on Windows --- i18n/localization_windows.go | 4 ++-- xio/term/terminal_other.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/i18n/localization_windows.go b/i18n/localization_windows.go index 189c47d..7318eaa 100644 --- a/i18n/localization_windows.go +++ b/i18n/localization_windows.go @@ -20,9 +20,9 @@ func Locale() string { kernel32 := syscall.NewLazyDLL("kernel32.dll") proc := kernel32.NewProc("GetUserDefaultLocaleName") buffer := make([]uint16, 128) - if ret, _, _ := proc.Call(uintptr(unsafe.Pointer(&buffer[0])), uintptr(len(buffer))); ret == 0 { + if ret, _, _ := proc.Call(uintptr(unsafe.Pointer(&buffer[0])), uintptr(len(buffer))); ret == 0 { //nolint:errcheck // ret is the error code proc = kernel32.NewProc("GetSystemDefaultLocaleName") - if ret, _, _ = proc.Call(uintptr(unsafe.Pointer(&buffer[0])), uintptr(len(buffer))); ret == 0 { + if ret, _, _ = proc.Call(uintptr(unsafe.Pointer(&buffer[0])), uintptr(len(buffer))); ret == 0 { //nolint:errcheck // ret is the error code return "en_US.UTF-8" } } diff --git a/xio/term/terminal_other.go b/xio/term/terminal_other.go index 651ed94..978d8c5 100644 --- a/xio/term/terminal_other.go +++ b/xio/term/terminal_other.go @@ -16,6 +16,6 @@ import ( ) // IsTerminal returns true if the writer's file descriptor is a terminal. -func IsTerminal(f io.Writer) bool { +func IsTerminal(_ io.Writer) bool { return false }