changeset 4:b8545eea86b4

Use proper separator on multipass reads.
author Paul Fisher <paul@pfish.zone>
date Sat, 24 Oct 2015 23:16:42 -0400
parents ec4ded022025
children 882f913f4e89
files multipass-checkpassword.go
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/multipass-checkpassword.go	Sat Oct 24 22:36:33 2015 -0400
+++ b/multipass-checkpassword.go	Sat Oct 24 23:16:42 2015 -0400
@@ -17,12 +17,12 @@
 func main() {
 	infile := os.NewFile(3, "")
 	reader := bufio.NewReader(os.Stdin)
-	username, err := reader.ReadString('\n')
+	username, err := reader.ReadString('\0')
 	if err != nil {
 		os.Exit(InternalError)
 	}
 	username = username[:len(username)-1]
-	pass, err := reader.ReadString('\n')
+	pass, err := reader.ReadString('\0')
 	if err != nil {
 		os.Exit(InternalError)
 	}