Browse Source

Debug logging for pre-Enter phase

master
Matt Baer 9 years ago
parent
commit
a8480d6d64
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      telnet.go

+ 6
- 0
telnet.go View File

@@ -117,6 +117,12 @@ func waitForEnter(c net.Conn) {
output(c, fmt.Sprintf("%sPress Enter to continue...%s\n", colBRed, noCol))
for {
n, err := c.Read(b)

if debugging {
fmt.Print(b[0:n])
fmt.Printf("\n%d: %s\n", n, b[0:n])
}

if bytes.IndexRune(b[0:n], '\n') > -1 {
break
}


Loading…
Cancel
Save