Skip to content

Commit f4d07c6

Browse files
authored
Merge pull request #62 from CarlJi/0703
doc: add Tips into readme
2 parents 7d2d49c + dac7a84 commit f4d07c6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ Goc can collect code coverages at runtime for your long-run golang applications.
4646
...
4747
```
4848
49+
## Tips
50+
51+
1. To understand the execution details of goc tool, you can use the `--debug` flag. Also we appreciate if you can provide such logs when submitting a bug to us.
52+
53+
2. By default, the covered service will listen a random port in order to communicate with the goc server. this may not be suitable in [docker](https://docs.docker.com/engine/reference/commandline/run/#publish-or-expose-port--p---expose) or [kubernetes](https://kubernetes.io/docs/concepts/services-networking/service/#defining-a-service) environment since the port must be exposed explicitly in order to be accessible by others in such environment. For this kind of scenario, you can use `--agentport` flag to specific a fixed port when calling `goc build` or `goc install`.
54+
55+
3. To use a remote goc server, you can use `--center` flag to compile the target service with `goc build` or `goc install` command.
56+
4957
## RoadMap
5058
- [x] Support code coverage collection for system testing.
5159
- [x] Support code coverage counters clear for the services under test at runtime.

cmd/commonflags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func addBasicFlags(cmdset *pflag.FlagSet) {
2727
func addCommonFlags(cmdset *pflag.FlagSet) {
2828
addBasicFlags(cmdset)
2929
cmdset.StringVar(&mode, "mode", "count", "coverage mode: set, count, atomic")
30-
cmdset.StringVar(&agentPort, "agentport", "", "specify fixed port for registered service communicate with goc server. if not provided, using a random port")
30+
cmdset.StringVar(&agentPort, "agentport", "", "specify fixed port for registered service communicate with goc server. if not provided, using a random one")
3131
cmdset.StringVar(&buildFlags, "buildflags", "", "specify the build flags")
3232
// bind to viper
3333
viper.BindPFlags(cmdset)

0 commit comments

Comments
 (0)