MCPcopy Index your code
hub / github.com/koding/kite / handleGetPass

Function handleGetPass

handlers.go:137–145  ·  view source on GitHub ↗

handleGetPass reads a line of input from a terminal without local echo.

(r *Request)

Source from the content-addressed store, hash-verified

135
136// handleGetPass reads a line of input from a terminal without local echo.
137func 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.
148func handleNotifyDarwin(r *Request) (interface{}, error) {

Callers

nothing calls this directly

Calls 2

MustStringMethod · 0.80
OneMethod · 0.80

Tested by

no test coverage detected