...

Source file src/vendor/golang.org/x/net/lif/sys.go

Documentation: vendor/golang.org/x/net/lif

     1  // Copyright 2017 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  //go:build solaris
     6  
     7  package lif
     8  
     9  import "unsafe"
    10  
    11  var nativeEndian binaryByteOrder
    12  
    13  func init() {
    14  	i := uint32(1)
    15  	b := (*[4]byte)(unsafe.Pointer(&i))
    16  	if b[0] == 1 {
    17  		nativeEndian = littleEndian
    18  	} else {
    19  		nativeEndian = bigEndian
    20  	}
    21  }
    22  

View as plain text