Source File
winsize_unix.go
Belonging Package
github.com/creack/pty
//go:build !windows// +build !windowspackage ptyimport ()// Winsize describes the terminal size.type Winsize struct {Rows uint16 // ws_row: Number of rows (in cells).Cols uint16 // ws_col: Number of columns (in cells).X uint16 // ws_xpixel: Width in pixels.Y uint16 // ws_ypixel: Height in pixels.}// Setsize resizes t to s.func ( *os.File, *Winsize) error {//nolint:gosec // Expected unsafe pointer for Syscall call.return ioctl(, syscall.TIOCSWINSZ, uintptr(unsafe.Pointer()))}// GetsizeFull returns the full terminal size description.func ( *os.File) ( *Winsize, error) {var Winsize//nolint:gosec // Expected unsafe pointer for Syscall call.if := ioctl(, syscall.TIOCGWINSZ, uintptr(unsafe.Pointer(&))); != nil {return nil,}return &, nil}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |