In Go v1.19 and before, resolveUDPAddr("localhost:2000") returns an IP with a a 16-byte representation of the 4 byte localhost, which is 0x7f, 0x0, 0x0, 0x1 (127.0.0.1) AND prepended with ::FFFF:
However in Go v1.20 this will return the 4 byte representation WITHOUT being prepended with ::FFFF:
0x7f, 0x0, 0x0, 0x1
Description of changes:
Convert the 4 byte representation of localhost to 16 byte if not already.
Update Readme to state that the SDK is compatible with Go 1.16 and above.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue #, if available: Unit tests starting failing in Go v1.20 https://github.com/aws/aws-xray-sdk-go/actions/runs/4198915049/jobs/7283153601
This is due to the Assertion of the TestGetDaemonEndpointsForHostname1 test, which ends up checking if the following equates:
In Go v1.19 and before, resolveUDPAddr("localhost:2000") returns an IP with a a 16-byte representation of the 4 byte localhost, which is
0x7f, 0x0, 0x0, 0x1
(127.0.0.1) AND prepended with::FFFF:
However in Go v1.20 this will return the 4 byte representation WITHOUT being prepended with
::FFFF:
Description of changes: Convert the 4 byte representation of localhost to 16 byte if not already. Update Readme to state that the SDK is compatible with Go 1.16 and above.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.