post inicial
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
//go:build !linux
|
||||
|
||||
package term
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"io"
|
||||
"os"
|
||||
)
|
||||
|
||||
// ErrNotTerminal indica que la entrada no es un terminal interactivo.
|
||||
var ErrNotTerminal = errors.New("input is not an interactive terminal")
|
||||
|
||||
// IsTerminal siempre es false fuera de Linux (plataforma no soportada).
|
||||
func IsTerminal(f *os.File) bool { return false }
|
||||
|
||||
// ReadPassword no está disponible fuera de Linux.
|
||||
func ReadPassword(in *os.File, out io.Writer, prompt string) (string, error) {
|
||||
return "", ErrNotTerminal
|
||||
}
|
||||
|
||||
// DisableEcho no está disponible fuera de Linux.
|
||||
func DisableEcho(f *os.File) (func(), error) { return nil, ErrNotTerminal }
|
||||
Reference in New Issue
Block a user