Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions cmd/commonflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ var (
mode string
debugGoc bool
buildFlags string
// packages string
appArgs string

goRunExecFlag string
goRunArguments string
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion pkg/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -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("|")
Expand Down