Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incomplete support for interface encoding/binary.AppendByteOrder #2

Merged
merged 2 commits into from
Oct 18, 2023

Conversation

dolmen
Copy link
Member

@dolmen dolmen commented Oct 18, 2023

This should compile:

var _ interface {
	binary.ByteOrder
	binary.AppendByteOrder // added in Go 1.19
} = endian.Native

However it didn't for "unknown" architectures (those unknown at code generation time).

This fixes others.go and adds others_go1.19.go to handle the go1.19+ features (binary.AppendByteOrder).

@dolmen dolmen added the hacktoberfest-accepted Hacktoberfest label Oct 18, 2023
@dolmen dolmen self-assigned this Oct 18, 2023
The test pass on the supported architectures, but should fail on
unknown architectures (handled by others.go).
Unknown architectures (where byte order is determined at runtime) get
support of AppendByteOrder interface (added in Go 1.19) in addition to
ByteOrder interface.
@dolmen dolmen merged commit 2a1c367 into master Oct 18, 2023
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant