编译前看下
arm-linux-gnueabihf-gcc -fuse-ld=gold -Wl,--version
是不是支持gold 连接 ,如果不支持,就得更换编译器了。gcc-7 的应该就没有问题
因为go just only support the gold linker!
export GOARCH=arm
export GOOS="linux"
export GOARM=7 #armv6, armv7 armv8....
export CGO_ENABLED=1
export CC=arm-linux-gnueabi-gcc
go build target
edged-memory-capacity-bytes: It is the capacity of memory capacity of edge node which is allocatable to pods that will be scheduled on the node.
生成依赖
go mod init
go mod download
下载依赖
go mod tidy
同步依赖包,添加需要的,移除多余的
go mod vendor
将依赖包放入vendor