The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Package terminalstate preserves the host's kernel TTY state across an
embedded terminal UI, including failures before its event loop starts.
It does not read input, close borrowed files or reset terminal protocols.
type Guard struct {
// contains filtered or unexported fields
}
Guard borrows terminal files; keeping them referenced prevents a finalizer
from closing/reusing a descriptor before restoration. It never opens /dev/tty.
Capture must run before a UI takes raw mode. Pipes and absent files are
ignored; a terminal whose state cannot be saved fails before ownership changes.
Restore is a backstop for upstream Run early-error paths that leave ECHO,
ICANON or ISIG disabled. A completed normal UI restoration is harmless to repeat.
Failed network delivery of mouse/keyboard reset sequences is a separate issue.