~mna/zztermtest

433827703ce5aca1a2db0c978894287d215a86a7 — Martin Angers 2 years ago b209bce master
continue on timeout error
1 files changed, 10 insertions(+), 0 deletions(-)

M main.go
M main.go => main.go +10 -0
@@ 1,6 1,7 @@
package main

import (
	"errors"
	"flag"
	"fmt"
	"io"


@@ 66,6 67,9 @@ func csiMode(rw io.ReadWriter) {
	for {
		k, err := input.ReadKey(rw)
		if err != nil {
			if errors.As(err, &zzterm.TimeoutError{}) {
				continue
			}
			log.Panic(err)
		}



@@ 119,6 123,9 @@ func echoMode(rw io.ReadWriter) {
	for {
		k, err := input.ReadKey(rw)
		if err != nil {
			if errors.As(err, &zzterm.TimeoutError{}) {
				continue
			}
			log.Panic(err)
		}
		count++


@@ 164,6 171,9 @@ func infoMode(rw io.ReadWriter) {
	for {
		k, err := input.ReadKey(rw)
		if err != nil {
			if errors.As(err, &zzterm.TimeoutError{}) {
				continue
			}
			log.Panic(err)
		}
		count++