Преглед изворни кода

Debug logging for pre-Enter phase

master
Matt Baer пре 9 година
родитељ
комит
a8480d6d64
1 измењених фајлова са 6 додато и 0 уклоњено
  1. +6
    -0
      telnet.go

+ 6
- 0
telnet.go Прегледај датотеку

@@ -117,6 +117,12 @@ func waitForEnter(c net.Conn) {
output(c, fmt.Sprintf("%sPress Enter to continue...%s\n", colBRed, noCol)) output(c, fmt.Sprintf("%sPress Enter to continue...%s\n", colBRed, noCol))
for { for {
n, err := c.Read(b) 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 { if bytes.IndexRune(b[0:n], '\n') > -1 {
break break
} }


Loading…
Откажи
Сачувај