Documentation
¶
Overview ¶
Copyright 2020 The GoPlus Authors (goplus.org)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 The GoPlus Authors (goplus.org)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 The GoPlus Authors (goplus.org)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Build ¶
type Build struct {
Pkgs ast.Package // Pkg list parsed from "go list -json ./..." command
NewGOPATH string // the new GOPATH
OriGOPATH string // the original GOPATH
WorkingDir string // the working directory
TmpDir string // the temporary directory to build the project
TmpWorkingDir string // the working directory in the temporary directory, which is corresponding to the current directory in the project directory
Target string // the binary name that go build generate
// keep compatible with go commands:
// gop build [-o output] [-i] [build flags] [packages]
// gop install [-i] [build flags] [packages]
BuildFlags string // Build flags
Packages string // Packages that needs to build
}
Build is to describe the building/installing process of a gop build/install
func NewBuild ¶
func NewBuild(buildflags string, args []string, workingDir string, outputDir string) (*Build, error)
NewBuild creates a Build struct which can build from gop temporary directory, and generate binary in current working directory
func NewInstall ¶
NewInstall creates a Build struct which can install from goc temporary directory
func (*Build) CreateTmpWorkingDir ¶
CreateTmpWorkingDir moves the projects into a temporary directory