1 Star 0 Fork 0

LonelyPale / goutils

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
net_test.go 304 Bytes
一键复制 编辑 原始数据 按行查看 历史
LonelyPale 提交于 2021-06-04 15:32 . update mac
package goutils
import (
"encoding/binary"
"fmt"
"testing"
)
func TestMac(t *testing.T) {
//bytes := []byte{0x78, 0x56, 0x34, 0x12}
bytes := []byte{0x0, 0x0, 0x0, 0x12}
fmt.Printf("0x%x\n", binary.LittleEndian.Uint32(bytes))
fmt.Printf("0x%x\n", binary.BigEndian.Uint32(bytes))
t.Log(Mac())
}
Go
1
https://gitee.com/lonelypalegit/goutils.git
git@gitee.com:lonelypalegit/goutils.git
lonelypalegit
goutils
goutils
master

搜索帮助