天天看点

Kratos2.0 在windows 电脑上进行liunx发布

  • 将环境变量设置为liunx
    set GOARCH=amd64
    set GOOS=linux
    set GOHOSTOS=liunx      
  • 重新编译生成pb
    go mod tidy 
    go mod vendor 
    go generate ./...      
  • 输出发布文件
    go build -o c:/ ./...      

stay hungry stay foolish!