trimspace on piped passwords

This commit is contained in:
Daniel Oaks 2019-02-03 08:08:12 +10:00
parent 6f2b610736
commit 6667585605
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ func getPassword() string {
}
reader := bufio.NewReader(os.Stdin)
text, _ := reader.ReadString('\n')
return text
return strings.TrimSpace(text)
}
func main() {