We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 43d0a6e + 51e7095 commit 1da7a13Copy full SHA for 1da7a13
1 file changed
term_windows.go
@@ -1,7 +1,7 @@
1
package term
2
3
import (
4
- "fmt"
+ "errors"
5
"io"
6
"os"
7
"os/signal"
@@ -94,16 +94,14 @@ func getWinsize(fd uintptr) (*Winsize, error) {
94
return nil, err
95
}
96
97
- winsize := &Winsize{
+ return &Winsize{
98
Width: uint16(info.Window.Right - info.Window.Left + 1),
99
Height: uint16(info.Window.Bottom - info.Window.Top + 1),
100
- }
101
-
102
- return winsize, nil
+ }, nil
103
104
105
func setWinsize(fd uintptr, ws *Winsize) error {
106
- return fmt.Errorf("not implemented on Windows")
+ return errors.New("not implemented on Windows")
107
108
109
func isTerminal(fd uintptr) bool {
0 commit comments