1 // Copyright 2014 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
12 GOARCH
string `json:",omitempty"` // target architecture
13 GOOS
string `json:",omitempty"` // target operating system
14 GOROOT
string `json:",omitempty"` // Go root
15 GOPATH
string `json:",omitempty"` // Go path
16 CgoEnabled
bool `json:",omitempty"` // whether cgo can be used
17 UseAllFiles
bool `json:",omitempty"` // use files regardless of +build lines, file names
18 Compiler
string `json:",omitempty"` // compiler to assume when computing target paths
19 BuildTags
[]string `json:",omitempty"` // build constraints to match in +build lines
20 ReleaseTags
[]string `json:",omitempty"` // releases the current release is compatible with
21 InstallSuffix
string `json:",omitempty"` // suffix to use in the name of the install dir
24 func newContext(c
*build
.Context
) *Context
{
30 CgoEnabled
: c
.CgoEnabled
,
31 UseAllFiles
: c
.UseAllFiles
,
33 BuildTags
: c
.BuildTags
,
34 ReleaseTags
: c
.ReleaseTags
,
35 InstallSuffix
: c
.InstallSuffix
,