The error handling in the tests for the wire package were recently
updated to make use of the new errors.Is and errors.As standard library
functions introduced in Go 1.13, but they were only updated mechanically
as opposed to being updated to use the new capabilities of errors.Is
checking for a specific error code as opposed to just the error type.
Consequently, this updates the tests to remove all of the additional
type checking via errors.As and instead look for the exact expected
error code via errors.Is. This change is desirable since only examining
the type of error doesn't prove that the test is actually hitting the
specific error it intends too, rather only that it is hitting an error
of the same type.
It also corrects a couple of tests and error returns that were
discovered to be incorrect in the process.
This contains the following upstream commits:
- ca4e9b82d6
- 9935fe5dba
- d009185a56
The merge commit modifies the protocol versions and the wire default
user agent version accordingly along with other minor changes in terms
of copyright dates and comment changes.