Add terminal pkg
This commit is contained in:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user