mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-11-27 23:11:20 +08:00
Fix staticcheck errors on Windows.
This commit is contained in:
parent
a91935ee93
commit
2c30cf9806
|
@ -1,3 +1,5 @@
|
|||
//go:build !windows && !plan9
|
||||
|
||||
package term
|
||||
|
||||
import (
|
||||
|
|
|
@ -71,9 +71,9 @@ func (r *reader) Close() {
|
|||
if err != nil {
|
||||
log.Println("SetEvent:", err)
|
||||
}
|
||||
r.mutex.Lock()
|
||||
//lint:ignore SA2001 We only lock the mutex to make sure that ReadEvent has
|
||||
//exited, so we unlock it immediately.
|
||||
r.mutex.Lock()
|
||||
r.mutex.Unlock()
|
||||
err = windows.CloseHandle(r.stopEvent)
|
||||
if err != nil {
|
||||
|
|
|
@ -3,5 +3,5 @@ package testutil
|
|||
// Umask sets the umask for the duration of the test, and restores it afterwards.
|
||||
func Umask(c Cleanuper, m int) {
|
||||
save := umask(m)
|
||||
c.Cleanup(func() { umask(save) })
|
||||
c.Cleanup(func() { _ = umask(save) })
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user