handleGetPass reads a line of input from a terminal without local echo.
(r *Request)
| 135 | |
| 136 | // handleGetPass reads a line of input from a terminal without local echo. |
| 137 | func handleGetPass(r *Request) (interface{}, error) { |
| 138 | fmt.Print(r.Args.One().MustString()) |
| 139 | data, err := terminal.ReadPassword(int(os.Stdin.Fd())) // stdin |
| 140 | fmt.Println() |
| 141 | if err != nil { |
| 142 | return nil, err |
| 143 | } |
| 144 | return string(data), nil |
| 145 | } |
| 146 | |
| 147 | // handleNotifyDarwin displays a desktop notification on OS X. |
| 148 | func handleNotifyDarwin(r *Request) (interface{}, error) { |
nothing calls this directly
no test coverage detected