comparison multipass-checkpassword.go @ 5:882f913f4e89

Replace '\0' with correct 0 value.
author Paul Fisher <paul@pfish.zone>
date Sat, 24 Oct 2015 23:19:20 -0400
parents b8545eea86b4
children 10613f0f4737
comparison
equal deleted inserted replaced
4:b8545eea86b4 5:882f913f4e89
15 ) 15 )
16 16
17 func main() { 17 func main() {
18 infile := os.NewFile(3, "") 18 infile := os.NewFile(3, "")
19 reader := bufio.NewReader(os.Stdin) 19 reader := bufio.NewReader(os.Stdin)
20 username, err := reader.ReadString('\0') 20 username, err := reader.ReadString(0)
21 if err != nil { 21 if err != nil {
22 os.Exit(InternalError) 22 os.Exit(InternalError)
23 } 23 }
24 username = username[:len(username)-1] 24 username = username[:len(username)-1]
25 pass, err := reader.ReadString('\0') 25 pass, err := reader.ReadString(0)
26 if err != nil { 26 if err != nil {
27 os.Exit(InternalError) 27 os.Exit(InternalError)
28 } 28 }
29 pass = pass[:len(pass)-1] 29 pass = pass[:len(pass)-1]
30 infile.Close() 30 infile.Close()