First read
https://commandcenter.blogspot.com/2012/04/byte-order-fallacy.html

then see

https://go.dev/play/p/4ESm6nOwgtY

-rob






On Thu, Aug 10, 2023 at 8:46 PM Stephen Illingworth <
stephen.illingwo...@gmail.com> wrote:

> Hello,
>
> I want to detect the implementation of binary.ByteOrder. ie. whether it is
> Little Endian or Big Endian.
>
> Normally, you would do this with a type assertion or a type switch but in
> the case of the binary package the little/big endian implementations are
> not exported.
>
> The only way that I can see to distinguish between the implementations is
> to test the value returned by String(). Am I missing something here or
> should I continue to use String()?
>
> Regards
> Stephen
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/67469c8a-b1aa-4976-8f4a-2b4458d28214n%40googlegroups.com
> <https://groups.google.com/d/msgid/golang-nuts/67469c8a-b1aa-4976-8f4a-2b4458d28214n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOXNBZTm3q-XFAcVrY1oDjMviSAY%2B_B9x9qySAc0AKn5yTX_rQ%40mail.gmail.com.

Reply via email to