approval_windows.go 255 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//go:build windows

package agent

import (
	"os"

	"golang.org/x/sys/windows"
)

// flushStdin clears any buffered console input on Windows.
func flushStdin(_ int) {
	handle := windows.Handle(os.Stdin.Fd())
	_ = windows.FlushConsoleInputBuffer(handle)
}