Skip to content

Commit

Permalink
Fix linter issues on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
richardwilkes committed Dec 6, 2024
1 parent 3686fd6 commit 355f409
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions i18n/localization_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Expand Down
2 changes: 1 addition & 1 deletion xio/term/terminal_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 355f409

Please sign in to comment.