The highest tagged major version is
v13.
package
Version:
v12.46.0
Opens a new window with list of versions in this module.
Published: May 16, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package window provides methods for working terminal window
GetHeight returns window height
height := GetHeight()
if height == -1 {
fmt.Println("Can't detect window size")
return
}
fmt.Printf("Window height: %d\n", height)
Output:
GetSize returns window width and height
width, height := GetSize()
if width == -1 && height == -1 {
fmt.Println("Can't detect window size")
return
}
fmt.Printf("Window size: %d x %d\n", width, height)
Output:
GetWidth returns window width
width := GetWidth()
if width == -1 {
fmt.Println("Can't detect window size")
return
}
fmt.Printf("Window width: %d\n", width)
Output:
Source Files
¶
Click to show internal directories.
Click to hide internal directories.