()
| 42 | } |
| 43 | |
| 44 | func (s *shellReader) readPasswordErr() (string, error) { |
| 45 | prompt := "" |
| 46 | if s.buf.Len() > 0 { |
| 47 | prompt = s.buf.String() |
| 48 | s.buf.Truncate(0) |
| 49 | } |
| 50 | password, err := s.scanner.ReadPassword(prompt) |
| 51 | return string(password), err |
| 52 | } |
| 53 | |
| 54 | func (s *shellReader) readPassword() string { |
| 55 | password, _ := s.readPasswordErr() |
no test coverage detected