Selaa lähdekoodia

Debug logging for pre-Enter phase

master
Matt Baer 9 vuotta sitten
vanhempi
commit
a8480d6d64
1 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  1. +6
    -0
      telnet.go

+ 6
- 0
telnet.go Näytä tiedosto

@@ -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
}


Ladataan…
Peruuta
Tallenna