mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add integration tests for feed creation
This commit is contained in:
parent
f072439b79
commit
39b03cc393
46 changed files with 860 additions and 37 deletions
11
vendor/golang.org/x/crypto/ssh/terminal/util_windows.go
generated
vendored
11
vendor/golang.org/x/crypto/ssh/terminal/util_windows.go
generated
vendored
|
@ -17,6 +17,8 @@
|
|||
package terminal
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
|
@ -71,13 +73,6 @@ func GetSize(fd int) (width, height int, err error) {
|
|||
return int(info.Size.X), int(info.Size.Y), nil
|
||||
}
|
||||
|
||||
// passwordReader is an io.Reader that reads from a specific Windows HANDLE.
|
||||
type passwordReader int
|
||||
|
||||
func (r passwordReader) Read(buf []byte) (int, error) {
|
||||
return windows.Read(windows.Handle(r), buf)
|
||||
}
|
||||
|
||||
// ReadPassword reads a line of input from a terminal without local echo. This
|
||||
// is commonly used for inputting passwords and other sensitive data. The slice
|
||||
// returned does not include the \n.
|
||||
|
@ -98,5 +93,5 @@ func ReadPassword(fd int) ([]byte, error) {
|
|||
windows.SetConsoleMode(windows.Handle(fd), old)
|
||||
}()
|
||||
|
||||
return readPasswordLine(passwordReader(fd))
|
||||
return readPasswordLine(os.NewFile(uintptr(fd), "stdin"))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue