Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
R=golang-dev, bradfitz, r CC=golang-dev https://golang.org/cl/5141051
- Loading branch information
Showing
14 changed files
with
743 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright 2009 The Go Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style | ||
# license that can be found in the LICENSE file. | ||
|
||
include ../../Make.inc | ||
|
||
TARG=go | ||
GOFILES=\ | ||
build.go\ | ||
clean.go\ | ||
fix.go\ | ||
get.go\ | ||
fmt.go\ | ||
help.go\ | ||
list.go\ | ||
main.go\ | ||
test.go\ | ||
version.go\ | ||
vet.go\ | ||
|
||
include ../../Make.cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright 2011 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package main | ||
|
||
var cmdBuild = &Command{ | ||
Run: runBuild, | ||
UsageLine: "build [-n] [-v] [importpath...]", | ||
Short: "compile and install packages and dependencies", | ||
Long: ` | ||
Build compiles the packages named by the import paths, | ||
along with their dependencies, but it does not install the results. | ||
The -n flag prints the commands but does not run them. | ||
The -v flag prints the commands. | ||
For more about import paths, see 'go help importpath'. | ||
See also: go install, go get, go clean. | ||
`, | ||
} | ||
|
||
var buildN = cmdBuild.Flag.Bool("n", false, "") | ||
var buildV = cmdBuild.Flag.Bool("v", false, "") | ||
|
||
func runBuild(cmd *Command, args []string) { | ||
args = importPaths(args) | ||
_ = args | ||
panic("build not implemented") | ||
} | ||
|
||
var cmdInstall = &Command{ | ||
Run: runInstall, | ||
UsageLine: "install [-n] [-v] [importpath...]", | ||
Short: "install packages and dependencies", | ||
Long: ` | ||
Install compiles and installs the packages named by the import paths, | ||
along with their dependencies. | ||
The -n flag prints the commands but does not run them. | ||
The -v flag prints the commands. | ||
For more about import paths, see 'go help importpath'. | ||
See also: go build, go get, go clean. | ||
`, | ||
} | ||
|
||
var installN = cmdInstall.Flag.Bool("n", false, "") | ||
var installV = cmdInstall.Flag.Bool("v", false, "") | ||
|
||
func runInstall(cmd *Command, args []string) { | ||
args = importPaths(args) | ||
_ = args | ||
panic("install not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright 2011 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package main | ||
|
||
var cmdClean = &Command{ | ||
Run: runClean, | ||
UsageLine: "clean [-nuke] [importpath...]", | ||
Short: "remove intermediate objects", | ||
Long: ` | ||
Clean removes intermediate object files generated during | ||
the compilation of the packages named by the import paths, | ||
but by default it does not remove the installed package binaries. | ||
The -nuke flag causes clean to remove the installed package binaries too. | ||
TODO: Clean does not clean dependencies of the packages. | ||
TODO: Rename -nuke. | ||
For more about import paths, see 'go help importpath'. | ||
`, | ||
} | ||
|
||
var cleanNuke = cmdClean.Flag.Bool("nuke", false, "") | ||
|
||
func runClean(cmd *Command, args []string) { | ||
args = importPaths(args) | ||
_ = args | ||
panic("nuke not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright 2011 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
/* | ||
Go is a tool for managing Go source code. | ||
Usage: go command [arguments] | ||
The commands are: | ||
build compile and install packages and dependencies | ||
clean remove intermediate objects | ||
fix run gofix on packages | ||
fmt run gofmt -w on packages | ||
get download and install packages and dependencies | ||
install install packages and dependencies | ||
list list packages | ||
test test packages | ||
version print Go version | ||
vet run govet on packages | ||
Use "go help [command]" for more information about a command. | ||
Additional help topics: | ||
gopath GOPATH environment variable | ||
importpath description of import paths | ||
remote remote import path syntax | ||
Use "go help [topic]" for more information about that topic. | ||
*/ | ||
package documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2011 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package main | ||
|
||
var cmdFix = &Command{ | ||
Run: runFix, | ||
UsageLine: "fix [importpath...]", | ||
Short: "run gofix on packages", | ||
Long: ` | ||
Fix runs the gofix command on the packages named by the import paths. | ||
For more about gofix, see 'godoc gofix'. | ||
For more about import paths, see 'go help importpath'. | ||
To run gofix with specific options, run gofix itself. | ||
See also: go fmt, go vet. | ||
`, | ||
} | ||
|
||
func runFix(cmd *Command, args []string) { | ||
args = importPaths(args) | ||
_ = args | ||
panic("fix not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2011 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package main | ||
|
||
var cmdFmt = &Command{ | ||
Run: runFmt, | ||
UsageLine: "fmt [importpath...]", | ||
Short: "run gofmt -w on packages", | ||
Long: ` | ||
Fmt runs the command 'gofmt -w' on the packages named by the import paths. | ||
For more about gofmt, see 'godoc gofmt'. | ||
For more about import paths, see 'go help importpath'. | ||
To run gofmt with specific options, run gofmt itself. | ||
See also: go fix, go vet. | ||
`, | ||
} | ||
|
||
func runFmt(cmd *Command, args []string) { | ||
args = importPaths(args) | ||
_ = args | ||
panic("fmt not implemented") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Copyright 2011 The Go Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style | ||
// license that can be found in the LICENSE file. | ||
|
||
package main | ||
|
||
var cmdGet = &Command{ | ||
Run: runGet, | ||
UsageLine: "get [importpath...]", | ||
Short: "download and install packages and dependencies", | ||
Long: ` | ||
Get downloads and installs the packages named by the import paths, | ||
along with their dependencies. | ||
After downloading the code, 'go get' looks for a tag beginning | ||
with "go." that corresponds to the local Go version. | ||
For Go "release.r58" it looks for a tag named "go.r58". | ||
For "weekly.2011-06-03" it looks for "go.weekly.2011-06-03". | ||
If the specific "go.X" tag is not found, it uses the latest earlier | ||
version it can find. Otherwise, it uses the default version for | ||
the version control system: HEAD for git, tip for Mercurial, | ||
and so on. | ||
TODO: Explain versions better. | ||
For more about import paths, see 'go help importpath'. | ||
For more about how 'go get' finds source code to | ||
download, see 'go help remote'. | ||
See also: go build, go install, go clean. | ||
`, | ||
} | ||
|
||
func runGet(cmd *Command, args []string) { | ||
args = importPaths(args) | ||
_ = args | ||
panic("get not implemented") | ||
} |
Oops, something went wrong.