We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2ff7073 + fddc34e commit 4793886Copy full SHA for 4793886
term.go
@@ -14,6 +14,8 @@ import (
14
)
15
16
// ErrInvalidState is returned if the state of the terminal is invalid.
17
+//
18
+// Deprecated: ErrInvalidState is no longer used.
19
var ErrInvalidState = errors.New("Invalid terminal state")
20
21
// State represents the state of the terminal.
@@ -55,7 +57,7 @@ func IsTerminal(fd uintptr) bool {
55
57
// to a previous state.
56
58
func RestoreTerminal(fd uintptr, state *State) error {
59
if state == nil {
- return ErrInvalidState
60
+ return errors.New("invalid terminal state")
61
}
62
return tcset(fd, &state.termios)
63
0 commit comments