Documentation ¶
Overview ¶
Package byteorder detects byte order of runtime system.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get detects and returns the byte order of runtime system. Return type: binary.ByteOrder interface. Possible values: binary.LittleEndian and binary.BigEndian. See https://godoc.org/encoding/binary#pkg-variables for more information.
Example ¶
package main import ( "encoding/binary" "log" "github.com/northbright/byteorder" ) func main() { order := byteorder.Get() log.Printf("Byte Order: ") if order == binary.LittleEndian { log.Printf("Little Endian") } else { log.Printf("Big Endian") } }
Output:
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.