...
Source file src/pkg/cmd/go/internal/list/context.go
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 ReleaseTags []string `json:",omitempty"`
21 InstallSuffix string `json:",omitempty"`
22 }
23
24 func newContext(c *build.Context) *Context {
25 return &Context{
26 GOARCH: c.GOARCH,
27 GOOS: c.GOOS,
28 GOROOT: c.GOROOT,
29 GOPATH: c.GOPATH,
30 CgoEnabled: c.CgoEnabled,
31 UseAllFiles: c.UseAllFiles,
32 Compiler: c.Compiler,
33 BuildTags: c.BuildTags,
34 ReleaseTags: c.ReleaseTags,
35 InstallSuffix: c.InstallSuffix,
36 }
37 }
38
View as plain text