Commit 36ce197c authored by Russ Cox's avatar Russ Cox

cmd/go: split out cmd/go/internal/fmt

This is one CL in a long sequence of changes to break up the
go command from one package into a plausible group of packages.

This sequence is concerned only with moving code, not changing
or cleaning up code. There will still be more cleanup after this sequence.

The entire sequence will be submitted together: it is not a goal
for the tree to build at every step.

For #18653.

Change-Id: I8e325d75f553b5d0b6224b56a705d2e2cb895de4
Reviewed-on: https://go-review.googlesource.com/36199Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
parent 4efe9250
......@@ -2,22 +2,23 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
package fmt
import (
"os"
"path/filepath"
"cmd/go/internal/base"
"cmd/go/internal/cfg"
"cmd/go/internal/load"
"cmd/go/internal/str"
"os"
"path/filepath"
)
func init() {
cfg.AddBuildFlagsNX(&cmdFmt.Flag)
cfg.AddBuildFlagsNX(&CmdFmt.Flag)
}
var cmdFmt = &base.Command{
var CmdFmt = &base.Command{
Run: runFmt,
UsageLine: "fmt [-n] [-x] [packages]",
Short: "run gofmt on package sources",
......
......@@ -15,6 +15,7 @@ import (
"cmd/go/internal/base"
"cmd/go/internal/cfg"
fmtcmd "cmd/go/internal/fmt"
"cmd/go/internal/help"
"cmd/go/internal/test"
"cmd/go/internal/work"
......@@ -28,7 +29,7 @@ func init() {
cmdEnv,
cmdBug,
cmdFix,
cmdFmt,
fmtcmd.CmdFmt,
cmdGenerate,
cmdGet,
work.CmdInstall,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment