Skip to content

Commit

Permalink
Fix break line after password input (loadimpact#1703) (#1749)
Browse files Browse the repository at this point in the history
* Fix break line after password input (loadimpact#1703)

* PasswordField type assertion

* Form PasswordField type assertion
  • Loading branch information
paroar committed Dec 7, 2020
1 parent cfedc92 commit 420dd41
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/form.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ func (f Form) Run(r io.Reader, w io.Writer) (map[string]interface{}, error) {

color.Set(color.FgCyan)
s, err := field.GetContents(r)

if _, ok := field.(PasswordField); ok {
fmt.Fprint(w, "\n")
}

color.Unset()
if err != nil {
return nil, err
Expand Down

0 comments on commit 420dd41

Please sign in to comment.