...
1
2
3
4
5 package list
6
7 import (
8 "go/build"
9 )
10
11 type Context struct {
12 GOARCH string `json:",omitempty"`
13 GOOS string `json:",omitempty"`
14 GOROOT string `json:",omitempty"`
15 GOPATH string `json:",omitempty"`
16 CgoEnabled bool `json:",omitempty"`
17 UseAllFiles bool `json:",omitempty"`
18 Compiler string `json:",omitempty"`
19 BuildTags []string `json:",omitempty"`
20 ToolTags []string `json:",omitempty"`
21 ReleaseTags []string `json:",omitempty"`
22 InstallSuffix string `json:",omitempty"`
23 }
24
25 func newContext(c *build.Context) *Context {
26 return &Context{
27 GOARCH: c.GOARCH,
28 GOOS: c.GOOS,
29 GOROOT: c.GOROOT,
30 GOPATH: c.GOPATH,
31 CgoEnabled: c.CgoEnabled,
32 UseAllFiles: c.UseAllFiles,
33 Compiler: c.Compiler,
34 BuildTags: c.BuildTags,
35 ToolTags: c.ToolTags,
36 ReleaseTags: c.ReleaseTags,
37 InstallSuffix: c.InstallSuffix,
38 }
39 }
40
View as plain text