echo deb http://security.debian.org/debian-security buster/updates main >> /etc/apt/sources.list sudo apt-key adv --keyserver hkp://keyserver.ubuntu.
package main import ( "sync" "testing" ) type Person struct { Age int } var ( personPool = sync.Pool{ New: func() interface{}
// 创建锁文件 lockFile := "./lock.pid" lock, err := os.Create(lockFile) if err != nil { log.Fatal("创建文件锁失败", err) } defer os.Remove(lockFile) defer lo
1. 安装 gcc-mingw-w64 apt-get install gcc-mingw-w64 2. 跨平台编译 生成 64位 exe 可执行文件. env CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC=x86_64-w64-mingw32-gcc g
go env -w GOPROXY=https://goproxy.cn,direct • 阿里云 配置如下: export GOPROXY=https://mirrors.aliyun.com/goproxy/ • nexus社区提供的 配置如下: export GOPROXY=https:/