Skip to content

Commit

Permalink
Fix break line after password input (loadimpact#1703) (grafana#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 authored and salem84 committed Feb 3, 2021
1 parent ee847c4 commit bec53d6
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 bec53d6

Please sign in to comment.