okami.mom/ultraviolet

git clone https://git.nkp.pet/okami.mom/ultraviolet

Ayman Bagabasfeat: add cross-platform console I/O interface (#78)6ea2266

main
633 B26 linesraw
1//go:build !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !aix && !windows
2// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!aix,!windows
3
4package uv
5
6import (
7	"context"
8	"os"
9	"os/signal"
10)
11
12func openTTY() (*os.File, *os.File, error) {
13	return nil, nil, ErrPlatformNotSupported
14}
15
16func suspend() error {
17	return ErrPlatformNotSupported
18}
19
20func notifyWinch(c chan os.Signal, sigs ...os.Signal) {
21	signal.Notify(c, sigs...)
22}
23
24func notifyWinchContext(ctx context.Context, sigs ...os.Signal) (context.Context, context.CancelFunc) {
25	return signal.NotifyContext(ctx, sigs...)
26}