DevOps研发效能
媒体矩阵
开源中国APP
授权协议 Apache-2.0
开发语言 Google Go 查看源码 »
操作系统 跨平台
软件类型 开源软件
所属分类 开发工具
开源组织
地区 不详
投 递 者 gophernow
适用人群 未知
收录时间 2019-05-23

软件简介

Gos 自称为 “Armed Golang(加强版的 Go)”,定位是原生 go 命令的一个“加强版”解决方案。

据官方介绍可以使用 gos 代替 go:

go get => gos get
go build => gos build
go run => gos run
go ... => gos ...

因为 gos 兼容所有的 go 命令,并且还额外增加了搭载智能 GOPROXY 的 go mod/get,它会自动区分私有和公共仓库,并会智能使用 GOPROXY 下载丢失的软件包。

gos 还有一些额外的命令来增强开发体验:

  cross      用于进行敏捷和快速的交叉编译
  proto      用于进行快速简便的原型文件编译

使用 gos cross 进行简单交叉编译的示例代码:

# Compile Linux platform binaries for the current system architecture
# For example, if your computer are amd64, it will compile main.go into the binary of linux/amd64 architecture.
gos cross main.go linux

# Specify the build platform and architecture
gos cross main.go linux amd64
gos cross main.go linux arm
gos cross main.go linux 386
gos cross main.go windows amd64
gos cross main.go darwin 386

# Compiling binary files for all architectures on the specified platform
gos cross main.go linux all
gos cross main.go windows all

# Compiling binary files for all platforms on the specified architecture
gos cross main.go all amd64

# Trying to compile binary files for all platforms and architectures
gos cross all all
展开阅读全文

代码

的 Gitee 指数为
超过 的项目

评论

点击加入讨论🔥(21) 发布并加入讨论🔥
暂无内容
发表了博客
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
发表了问答
{{o.pubDate | formatDate}}

{{formatAllHtml(o.title)}}

{{parseInt(o.replyCount) | bigNumberTransform}}
{{parseInt(o.viewCount) | bigNumberTransform}}
没有更多内容
暂无内容
暂无内容
21 评论
54 收藏
分享
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部