Add terminal pkg

This commit is contained in:
dwrz
2026-10-23 01:23:24 +00:00
parent febdd6d07b
commit bb45a0b1fa
+1 -1
View File
@@ -30,6 +30,7 @@ type Size struct {
func New(fd uintptr) (*Terminal, error) { func New(fd uintptr) (*Terminal, error) {
var t = &Terminal{ var t = &Terminal{
fd: fd,
termios: &syscall.Termios{}, termios: &syscall.Termios{},
} }
@@ -82,7 +83,6 @@ func (t *Terminal) SetRaw() error {
return nil return nil
} }
// Size returns the zero-indexed size of the terminal.
func (t *Terminal) Size() (*Size, error) { func (t *Terminal) Size() (*Size, error) {
var size = &Size{} var size = &Size{}
if _, _, err := syscall.Syscall( if _, _, err := syscall.Syscall(