Add terminal pkg
This commit is contained in:
@@ -30,6 +30,7 @@ type Size struct {
|
||||
|
||||
func New(fd uintptr) (*Terminal, error) {
|
||||
var t = &Terminal{
|
||||
fd: fd,
|
||||
termios: &syscall.Termios{},
|
||||
}
|
||||
|
||||
@@ -82,7 +83,6 @@ func (t *Terminal) SetRaw() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Size returns the zero-indexed size of the terminal.
|
||||
func (t *Terminal) Size() (*Size, error) {
|
||||
var size = &Size{}
|
||||
if _, _, err := syscall.Syscall(
|
||||
|
||||
Reference in New Issue
Block a user