GetColumns gets the number of character columns.
()
| 83 | |
| 84 | // GetColumns gets the number of character columns. |
| 85 | func 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. |
| 94 | func showCursor(cons syscall.Handle, visible bool) { |
no test coverage detected