diff --git a/main.go b/main.go index 0903eb8..7bb2305 100644 --- a/main.go +++ b/main.go @@ -194,8 +194,8 @@ func menuHandler(ctx context.Context, conn net.Conn, w *gaio.Watcher) { } if res.Operation == gaio.OpRead && res.Size > 0 && res.Conn == conn { log.Printf("received on inChan: conn: %v, buffer size: %v\n", res.Conn.RemoteAddr(), res.Size) - log.Println("menu receive: ", strings.TrimSpace(string(res.Buffer[:res.Size-2]))) - switch string(strings.TrimSpace(string(res.Buffer[:res.Size-2]))) { + log.Println("menu receive: ", strings.TrimSpace(string(res.Buffer[:res.Size-1]))) + switch string(strings.TrimSpace(string(res.Buffer[:res.Size-1]))) { case "welcome": welcomeStr, err := screenHandler("welcome", nil)