MCPcopy Create free account
hub / github.com/rabbitstack/fibratus / GetColumns

Function GetColumns

pkg/util/term/term.go:85–91  ·  view source on GitHub ↗

GetColumns gets the number of character columns.

()

Source from the content-addressed store, hash-verified

83
84// GetColumns gets the number of character columns.
85func GetColumns() int {
86 bufferInfo, err := getScreenBufferInfo(syscall.Handle(os.Stdout.Fd()))
87 if err != nil {
88 return 0
89 }
90 return int(bufferInfo.rect.right)
91}
92
93// showCursor shows/hides the cursor.
94func showCursor(cons syscall.Handle, visible bool) {

Callers 1

NewFunction · 0.92

Calls 2

getScreenBufferInfoFunction · 0.85
HandleMethod · 0.80

Tested by

no test coverage detected