IsVersionMismatch returns true if the error is a reliable indication of a version mismatch that we might want to alert the user about.
(err error)
| 75 | // IsVersionMismatch returns true if the error is a reliable indication of a |
| 76 | // version mismatch that we might want to alert the user about. |
| 77 | func IsVersionMismatch(err error) bool { |
| 78 | return errors.Is(err, ErrTooOldVersion) || errors.Is(err, ErrUnknownMagic) |
| 79 | } |
| 80 | |
| 81 | func readHello(c io.Reader) (Hello, error) { |
| 82 | header := make([]byte, 4) |