summaryrefslogtreecommitdiffstats
path: root/internal/utils/tty_windows.go
blob: f40dbdab0844e287a8eb33eb0cdee7dc74c71edd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//go:build windows

package utils

import "os"

func OpenTTY() (*os.File, error) {
	conin, err := os.OpenFile("CONIN$", os.O_RDWR, 0)
	if err != nil {
		return nil, err
	}
	return conin, nil
}