From 3de6ec5a2dec27551837d522e607d8ec9d849dfb Mon Sep 17 00:00:00 2001 From: jichangjun Date: Sat, 27 Jun 2020 13:24:57 +0800 Subject: [PATCH] doc: be consistent and remove noise --- cmd/build.go | 2 +- cmd/commonflags.go | 3 --- cmd/install.go | 2 +- cmd/run.go | 3 ++- pkg/github/github.go | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/cmd/build.go b/cmd/build.go index 3a835c6..cf86204 100644 --- a/cmd/build.go +++ b/cmd/build.go @@ -34,7 +34,7 @@ Build command will copy the project code and its necessary dependencies to a tem `, Example: ` # Build the current binary with cover variables injected. The binary will be generated in the current folder. -goc build +goc build . # Build the current binary with cover variables injected, and set the registry center to http://127.0.0.1:7777. goc build --center=http://127.0.0.1:7777 diff --git a/cmd/commonflags.go b/cmd/commonflags.go index 65a6bce..e36647b 100644 --- a/cmd/commonflags.go +++ b/cmd/commonflags.go @@ -11,8 +11,6 @@ var ( mode string debugGoc bool buildFlags string - // packages string - appArgs string goRunExecFlag string goRunArguments string @@ -41,7 +39,6 @@ func addBuildFlags(cmdset *pflag.FlagSet) { func addRunFlags(cmdset *pflag.FlagSet) { addBuildFlags(cmdset) - cmdset.StringVar(&appArgs, "appargs", "", "specify the application's arguments") cmdset.StringVar(&goRunExecFlag, "exec", "", "same as -exec flag in 'go run' command") cmdset.StringVar(&goRunArguments, "arguments", "", "same as 'arguments' in 'go run' command") // bind to viper diff --git a/cmd/install.go b/cmd/install.go index e173715..4dc48b9 100644 --- a/cmd/install.go +++ b/cmd/install.go @@ -33,7 +33,7 @@ Install command will copy the project code and its necessary dependencies to a t `, Example: ` # Install all binaries with cover variables injected. The binary will be installed in $GOPATH/bin or $HOME/go/bin if directory existed. -goc install --packages="./..." +goc install ./... # Install the current binary with cover variables injected, and set the registry center to http://127.0.0.1:7777. goc install --center=http://127.0.0.1:7777 diff --git a/cmd/run.go b/cmd/run.go index 1dc28ae..f3ac9fb 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -33,8 +33,9 @@ var runCmd = &cobra.Command{ Short: "Run covers and runs the named main Go package", Long: `Run covers and runs the named main Go package, It is exactly behave as 'go run .' in addition of some internal goc features.`, - Example: ` + Example: ` goc run . +goc run . [--buildflags] [--exec] [--arguments] `, Run: func(cmd *cobra.Command, args []string) { wd, err := os.Getwd() diff --git a/pkg/github/github.go b/pkg/github/github.go index 76fd990..bbefbf0 100644 --- a/pkg/github/github.go +++ b/pkg/github/github.go @@ -165,7 +165,7 @@ func (c *PrComment) GetPrChangedFiles() (files []string, err error) { func GenCommentContent(commentPrefix string, delta cover.DeltaCovList) string { var buf bytes.Buffer table := tablewriter.NewWriter(&buf) - table.SetHeader([]string{"File", "BASE Coverage", "New Coverage", "Delta"}) + table.SetHeader([]string{"File", "Base Coverage", "New Coverage", "Delta"}) table.SetAutoFormatHeaders(false) table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false}) table.SetCenterSeparator("|")