go sys 源码

  • 2022-07-15
  • 浏览 (922)

golang sys 代码

文件路径:/src/vendor/golang.org/x/net/lif/sys.go

// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build solaris
// +build solaris

package lif

import "unsafe"

var nativeEndian binaryByteOrder

func init() {
	i := uint32(1)
	b := (*[4]byte)(unsafe.Pointer(&i))
	if b[0] == 1 {
		nativeEndian = littleEndian
	} else {
		nativeEndian = bigEndian
	}
}

相关信息

go 源码目录

相关文章

go address 源码

go binary 源码

go lif 源码

go link 源码

go syscall 源码

go zsys_solaris_amd64 源码

0  赞