Files
chess/internal/client/command/pass_native.go
T
lixen e1fa5242e3
test / test (push) Canceled after 0s
test / e2e (push) Canceled after 0s
v0.15.0 password recovery, phone layout, CLI pager, embed policy fixes
2026-10-19 18:15:31 -04:00

20 lines
352 B
Go

//go:build !js && !wasm
package command
import (
"github.com/lixenwraith/chess/internal/client/display"
"golang.org/x/term"
)
func readPassword(prompt string) (string, error) {
display.Write(prompt)
bytePassword, err := term.ReadPassword(0) // 0 is stdin
display.Line()
if err != nil {
return "", err
}
return string(bytePassword), nil
}