1 Star 0 Fork 0

Ursa Major / gocode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
context.go 804 Bytes
一键复制 编辑 原始数据 按行查看 历史
Matthew Dempsky 提交于 2016-05-17 23:54 . gocode: transparent gb support
package gbimporter
import "go/build"
// PackedContext is a copy of build.Context without the func fields.
//
// TODO(mdempsky): Not sure this belongs here.
type PackedContext struct {
GOARCH string
GOOS string
GOROOT string
GOPATH string
CgoEnabled bool
UseAllFiles bool
Compiler string
BuildTags []string
ReleaseTags []string
InstallSuffix string
}
func PackContext(ctx *build.Context) PackedContext {
return PackedContext{
GOARCH: ctx.GOARCH,
GOOS: ctx.GOOS,
GOROOT: ctx.GOROOT,
GOPATH: ctx.GOPATH,
CgoEnabled: ctx.CgoEnabled,
UseAllFiles: ctx.UseAllFiles,
Compiler: ctx.Compiler,
BuildTags: ctx.BuildTags,
ReleaseTags: ctx.ReleaseTags,
InstallSuffix: ctx.InstallSuffix,
}
}
1
https://gitee.com/sky1458/gocode.git
git@gitee.com:sky1458/gocode.git
sky1458
gocode
gocode
466551c8e799

搜索帮助