Merge pull request #47 from CarlJi/0627
doc: be consistent and remove noise
This commit is contained in:
commit
da04bb484c
@ -34,7 +34,7 @@ Build command will copy the project code and its necessary dependencies to a tem
|
|||||||
`,
|
`,
|
||||||
Example: `
|
Example: `
|
||||||
# Build the current binary with cover variables injected. The binary will be generated in the current folder.
|
# 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.
|
# 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
|
goc build --center=http://127.0.0.1:7777
|
||||||
|
@ -11,8 +11,6 @@ var (
|
|||||||
mode string
|
mode string
|
||||||
debugGoc bool
|
debugGoc bool
|
||||||
buildFlags string
|
buildFlags string
|
||||||
// packages string
|
|
||||||
appArgs string
|
|
||||||
|
|
||||||
goRunExecFlag string
|
goRunExecFlag string
|
||||||
goRunArguments string
|
goRunArguments string
|
||||||
@ -41,7 +39,6 @@ func addBuildFlags(cmdset *pflag.FlagSet) {
|
|||||||
|
|
||||||
func addRunFlags(cmdset *pflag.FlagSet) {
|
func addRunFlags(cmdset *pflag.FlagSet) {
|
||||||
addBuildFlags(cmdset)
|
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(&goRunExecFlag, "exec", "", "same as -exec flag in 'go run' command")
|
||||||
cmdset.StringVar(&goRunArguments, "arguments", "", "same as 'arguments' in 'go run' command")
|
cmdset.StringVar(&goRunArguments, "arguments", "", "same as 'arguments' in 'go run' command")
|
||||||
// bind to viper
|
// bind to viper
|
||||||
|
@ -33,7 +33,7 @@ Install command will copy the project code and its necessary dependencies to a t
|
|||||||
`,
|
`,
|
||||||
Example: `
|
Example: `
|
||||||
# Install all binaries with cover variables injected. The binary will be installed in $GOPATH/bin or $HOME/go/bin if directory existed.
|
# 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.
|
# 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
|
goc install --center=http://127.0.0.1:7777
|
||||||
|
@ -35,6 +35,7 @@ var runCmd = &cobra.Command{
|
|||||||
It is exactly behave as 'go run .' in addition of some internal goc features.`,
|
It is exactly behave as 'go run .' in addition of some internal goc features.`,
|
||||||
Example: `
|
Example: `
|
||||||
goc run .
|
goc run .
|
||||||
|
goc run . [--buildflags] [--exec] [--arguments]
|
||||||
`,
|
`,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
wd, err := os.Getwd()
|
wd, err := os.Getwd()
|
||||||
|
@ -165,7 +165,7 @@ func (c *PrComment) GetPrChangedFiles() (files []string, err error) {
|
|||||||
func GenCommentContent(commentPrefix string, delta cover.DeltaCovList) string {
|
func GenCommentContent(commentPrefix string, delta cover.DeltaCovList) string {
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
table := tablewriter.NewWriter(&buf)
|
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.SetAutoFormatHeaders(false)
|
||||||
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
|
table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false})
|
||||||
table.SetCenterSeparator("|")
|
table.SetCenterSeparator("|")
|
||||||
|
Loading…
Reference in New Issue
Block a user