mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
1 parent
91eb014f17
commit
1f80d14f3f
685 files changed
+143450
-17228
No files matched your search
+28
@@ -0,0 +1,28 @@
|
||||
// +build !windows,!plan9,!solaris,!appengine
|
||||
|
||||
package flags
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
type winsize struct {
|
||||
row, col uint16
|
||||
xpixel, ypixel uint16
|
||||
}
|
||||
|
||||
func getTerminalColumns() int {
|
||||
ws := winsize{}
|
||||
|
||||
if tIOCGWINSZ != 0 {
|
||||
syscall.Syscall(syscall.SYS_IOCTL,
|
||||
uintptr(0),
|
||||
uintptr(tIOCGWINSZ),
|
||||
uintptr(unsafe.Pointer(&ws)))
|
||||
|
||||
return int(ws.col)
|
||||
}
|
||||
|
||||
return 80
|
||||
}
|
||||
Reference in new issue
Block a user