This commit is contained in:
lyyyuna 2020-06-05 10:17:51 +08:00
parent bd16f920c8
commit 72fab79b6a
2 changed files with 5 additions and 5 deletions

View File

@ -41,13 +41,13 @@ To pass origial go build flags to goc command, place them after "--", see exampl
# Build the current binary with cover variables injected. The binary will be generated in the current folder.
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
# Build the current binary with cover variables injected, and redirect output to /to/this/path
# Build the current binary with cover variables injected, and redirect output to /to/this/path.
goc build -- -o /to/this/path
# Build the current binary with cover variables injected, and set necessary build flags: -ldflags "-extldflags -static" -tags="embed kodo"
# Build the current binary with cover variables injected, and set necessary build flags: -ldflags "-extldflags -static" -tags="embed kodo".
goc build -- -ldflags "-extldflags -static" -tags="embed kodo"
`,
Run: func(cmd *cobra.Command, args []string) {

View File

@ -40,10 +40,10 @@ To pass origial go build flags to goc command, place them after "--", see exampl
# Install all binaries with cover variables injected. The binary will be installed in $GOPATH/bin or $HOME/go/bin if directory existed.
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
# Install the current binary with cover variables injected, and set necessary build flags: -ldflags "-extldflags -static" -tags="embed kodo"
# Install the current binary with cover variables injected, and set necessary build flags: -ldflags "-extldflags -static" -tags="embed kodo".
goc build -- -ldflags "-extldflags -static" -tags="embed kodo"
`,
Run: func(cmd *cobra.Command, args []string) {