Repository: qiniu/goc
Pull request #76 (2020-07-16 13:00:34)

optimize statement and encapsulate logic of #67

qiniu-bot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/qiniu/goc/pull/76#" title="Author self-approved">tongjingran</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **memoryliu**
You can assign the PR to them by writing `/assign @memoryliu` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=qiniu%2Fgoc).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/qiniu/goc/blob/master/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["memoryliu"]} -->
codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **decrease** coverage by `2.68%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   61.52%   58.84%   -2.69%     
==========================================
  Files          33       32       -1     
  Lines        1679     1679              
==========================================
- Hits         1033      988      -45     
- Misses        501      557      +56     
+ Partials      145      134      -11     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.84% <100.00%> (+0.04%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <100.00%> (ø)` | |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (ø)` | |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `69.01% <100.00%> (-4.56%)` | :arrow_down: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `11.11% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `12.00% <0.00%> (-52.00%)` | :arrow_down: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `0.00% <0.00%> (-43.75%)` | :arrow_down: |
| [goc.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Z29jLmdv) | | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **decrease** coverage by `2.68%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   61.52%   58.84%   -2.69%     
==========================================
  Files          33       32       -1     
  Lines        1679     1679              
==========================================
- Hits         1033      988      -45     
- Misses        501      557      +56     
+ Partials      145      134      -11     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.84% <100.00%> (+0.04%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <100.00%> (ø)` | |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (ø)` | |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `69.01% <100.00%> (-4.56%)` | :arrow_down: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `11.11% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `12.00% <0.00%> (-52.00%)` | :arrow_down: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `0.00% <0.00%> (-43.75%)` | :arrow_down: |
| [goc.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Z29jLmdv) | | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **increase** coverage by `0.04%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   61.52%   61.57%   +0.04%     
==========================================
  Files          33       33              
  Lines        1679     1681       +2     
==========================================
+ Hits         1033     1035       +2     
  Misses        501      501              
  Partials      145      145              
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `23.08% <42.85%> (+0.38%)` | :arrow_up: |
| #unittest | `58.84% <100.00%> (+0.04%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <100.00%> (ø)` | |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (ø)` | |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `73.94% <100.00%> (+0.37%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **increase** coverage by `0.04%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   61.52%   61.57%   +0.04%     
==========================================
  Files          33       33              
  Lines        1679     1681       +2     
==========================================
+ Hits         1033     1035       +2     
  Misses        501      501              
  Partials      145      145              
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `23.08% <42.85%> (+0.38%)` | :arrow_up: |
| #unittest | `58.84% <100.00%> (+0.04%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <100.00%> (ø)` | |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (ø)` | |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `73.94% <100.00%> (+0.37%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **increase** coverage by `0.04%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   61.52%   61.57%   +0.04%     
==========================================
  Files          33       33              
  Lines        1679     1681       +2     
==========================================
+ Hits         1033     1035       +2     
  Misses        501      501              
  Partials      145      145              
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `23.08% <42.85%> (+0.38%)` | :arrow_up: |
| #unittest | `58.84% <100.00%> (+0.04%)` | :arrow_up: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <100.00%> (ø)` | |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (ø)` | |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `73.94% <100.00%> (+0.37%)` | :arrow_up: |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **decrease** coverage by `2.81%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   61.52%   58.70%   -2.82%     
==========================================
  Files          33       32       -1     
  Lines        1679     1688       +9     
==========================================
- Hits         1033      991      -42     
- Misses        501      563      +62     
+ Partials      145      134      -11     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.70% <100.00%> (-0.09%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <100.00%> (ø)` | |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (ø)` | |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `69.23% <100.00%> (-4.35%)` | :arrow_down: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `11.11% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `14.70% <0.00%> (-49.30%)` | :arrow_down: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `0.00% <0.00%> (-43.75%)` | :arrow_down: |
| [cmd/list.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2xpc3QuZ28=) | `33.33% <0.00%> (-4.17%)` | :arrow_down: |
| [cmd/commonflags.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2NvbW1vbmZsYWdzLmdv) | `90.47% <0.00%> (ø)` | |
| ... and [1 more](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **increase** coverage by `7.11%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   61.52%   68.63%   +7.11%     
==========================================
  Files          33       33              
  Lines        1679     1690      +11     
==========================================
+ Hits         1033     1160     +127     
+ Misses        501      373     -128     
- Partials      145      157      +12     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.47% <40.38%> (+18.78%)` | :arrow_up: |
| #unittest | `58.70% <100.00%> (-0.09%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `72.00% <100.00%> (+44.00%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `72.88% <100.00%> (+6.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `79.02% <100.00%> (+5.44%)` | :arrow_up: |
| [cmd/commonflags.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2NvbW1vbmZsYWdzLmdv) | `90.47% <0.00%> (ø)` | |
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `74.73% <0.00%> (+2.10%)` | :arrow_up: |
| [pkg/build/install.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2luc3RhbGwuZ28=) | `69.23% <0.00%> (+5.12%)` | :arrow_up: |
| [pkg/build/tmpfolder.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3RtcGZvbGRlci5nbw==) | `69.14% <0.00%> (+6.38%)` | :arrow_up: |
| [pkg/cover/delta.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2RlbHRhLmdv) | `93.54% <0.00%> (+6.45%)` | :arrow_up: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **increase** coverage by `7.11%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   61.52%   68.63%   +7.11%     
==========================================
  Files          33       33              
  Lines        1679     1690      +11     
==========================================
+ Hits         1033     1160     +127     
+ Misses        501      373     -128     
- Partials      145      157      +12     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.47% <40.38%> (+18.78%)` | :arrow_up: |
| #unittest | `58.70% <100.00%> (-0.09%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `72.00% <100.00%> (+44.00%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `72.88% <100.00%> (+6.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `79.02% <100.00%> (+5.44%)` | :arrow_up: |
| [cmd/commonflags.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2NvbW1vbmZsYWdzLmdv) | `90.47% <0.00%> (ø)` | |
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `74.73% <0.00%> (+2.10%)` | :arrow_up: |
| [pkg/build/install.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2luc3RhbGwuZ28=) | `69.23% <0.00%> (+5.12%)` | :arrow_up: |
| [pkg/build/tmpfolder.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3RtcGZvbGRlci5nbw==) | `69.14% <0.00%> (+6.38%)` | :arrow_up: |
| [pkg/cover/delta.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2RlbHRhLmdv) | `93.54% <0.00%> (+6.45%)` | :arrow_up: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **decrease** coverage by `2.81%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
- Coverage   61.52%   58.70%   -2.82%     
==========================================
  Files          33       32       -1     
  Lines        1679     1688       +9     
==========================================
- Hits         1033      991      -42     
- Misses        501      563      +62     
+ Partials      145      134      -11     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `?` | |
| #unittest | `58.70% <100.00%> (-0.09%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `28.00% <100.00%> (ø)` | |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `66.10% <100.00%> (ø)` | |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `69.23% <100.00%> (-4.35%)` | :arrow_down: |
| [cmd/run.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3J1bi5nbw==) | `11.11% <0.00%> (-55.56%)` | :arrow_down: |
| [cmd/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3NlcnZlci5nbw==) | `50.00% <0.00%> (-50.00%)` | :arrow_down: |
| [cmd/root.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Jvb3QuZ28=) | `14.70% <0.00%> (-49.30%)` | :arrow_down: |
| [pkg/build/run.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3J1bi5nbw==) | `0.00% <0.00%> (-43.75%)` | :arrow_down: |
| [cmd/list.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2xpc3QuZ28=) | `33.33% <0.00%> (-4.17%)` | :arrow_down: |
| [cmd/commonflags.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2NvbW1vbmZsYWdzLmdv) | `90.47% <0.00%> (ø)` | |
| ... and [1 more](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **increase** coverage by `7.11%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   61.52%   68.63%   +7.11%     
==========================================
  Files          33       33              
  Lines        1679     1690      +11     
==========================================
+ Hits         1033     1160     +127     
+ Misses        501      373     -128     
- Partials      145      157      +12     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.47% <40.38%> (+18.78%)` | :arrow_up: |
| #unittest | `58.70% <100.00%> (-0.09%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `72.00% <100.00%> (+44.00%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `72.88% <100.00%> (+6.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `79.02% <100.00%> (+5.44%)` | :arrow_up: |
| [cmd/commonflags.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2NvbW1vbmZsYWdzLmdv) | `90.47% <0.00%> (ø)` | |
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `74.73% <0.00%> (+2.10%)` | :arrow_up: |
| [pkg/build/install.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2luc3RhbGwuZ28=) | `69.23% <0.00%> (+5.12%)` | :arrow_up: |
| [pkg/build/tmpfolder.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3RtcGZvbGRlci5nbw==) | `69.14% <0.00%> (+6.38%)` | :arrow_up: |
| [pkg/cover/delta.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2RlbHRhLmdv) | `93.54% <0.00%> (+6.45%)` | :arrow_up: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **increase** coverage by `7.11%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   61.52%   68.63%   +7.11%     
==========================================
  Files          33       33              
  Lines        1679     1690      +11     
==========================================
+ Hits         1033     1160     +127     
+ Misses        501      373     -128     
- Partials      145      157      +12     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.47% <40.38%> (+18.78%)` | :arrow_up: |
| #unittest | `58.70% <100.00%> (-0.09%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `72.00% <100.00%> (+44.00%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `72.88% <100.00%> (+6.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `79.02% <100.00%> (+5.44%)` | :arrow_up: |
| [cmd/commonflags.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2NvbW1vbmZsYWdzLmdv) | `90.47% <0.00%> (ø)` | |
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `74.73% <0.00%> (+2.10%)` | :arrow_up: |
| [pkg/build/install.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2luc3RhbGwuZ28=) | `69.23% <0.00%> (+5.12%)` | :arrow_up: |
| [pkg/build/tmpfolder.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3RtcGZvbGRlci5nbw==) | `69.14% <0.00%> (+6.38%)` | :arrow_up: |
| [pkg/cover/delta.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2RlbHRhLmdv) | `93.54% <0.00%> (+6.45%)` | :arrow_up: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **increase** coverage by `7.11%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   61.52%   68.63%   +7.11%     
==========================================
  Files          33       33              
  Lines        1679     1690      +11     
==========================================
+ Hits         1033     1160     +127     
+ Misses        501      373     -128     
- Partials      145      157      +12     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.47% <40.38%> (+18.78%)` | :arrow_up: |
| #unittest | `58.70% <100.00%> (-0.09%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `72.00% <100.00%> (+44.00%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `72.88% <100.00%> (+6.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `79.02% <100.00%> (+5.44%)` | :arrow_up: |
| [cmd/commonflags.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2NvbW1vbmZsYWdzLmdv) | `90.47% <0.00%> (ø)` | |
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `74.73% <0.00%> (+2.10%)` | :arrow_up: |
| [pkg/build/install.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2luc3RhbGwuZ28=) | `69.23% <0.00%> (+5.12%)` | :arrow_up: |
| [pkg/build/tmpfolder.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3RtcGZvbGRlci5nbw==) | `69.14% <0.00%> (+6.38%)` | :arrow_up: |
| [pkg/cover/delta.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2RlbHRhLmdv) | `93.54% <0.00%> (+6.45%)` | :arrow_up: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **increase** coverage by `7.11%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   61.52%   68.63%   +7.11%     
==========================================
  Files          33       33              
  Lines        1679     1690      +11     
==========================================
+ Hits         1033     1160     +127     
+ Misses        501      373     -128     
- Partials      145      157      +12     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.47% <40.38%> (+18.78%)` | :arrow_up: |
| #unittest | `58.70% <100.00%> (-0.09%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `72.00% <100.00%> (+44.00%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `72.88% <100.00%> (+6.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `79.02% <100.00%> (+5.44%)` | :arrow_up: |
| [cmd/commonflags.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2NvbW1vbmZsYWdzLmdv) | `90.47% <0.00%> (ø)` | |
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `74.73% <0.00%> (+2.10%)` | :arrow_up: |
| [pkg/build/install.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2luc3RhbGwuZ28=) | `69.23% <0.00%> (+5.12%)` | :arrow_up: |
| [pkg/build/tmpfolder.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3RtcGZvbGRlci5nbw==) | `69.14% <0.00%> (+6.38%)` | :arrow_up: |
| [pkg/cover/delta.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2RlbHRhLmdv) | `93.54% <0.00%> (+6.45%)` | :arrow_up: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **increase** coverage by `7.11%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   61.52%   68.63%   +7.11%     
==========================================
  Files          33       33              
  Lines        1679     1690      +11     
==========================================
+ Hits         1033     1160     +127     
+ Misses        501      373     -128     
- Partials      145      157      +12     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.47% <40.38%> (+18.78%)` | :arrow_up: |
| #unittest | `58.70% <100.00%> (-0.09%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `72.00% <100.00%> (+44.00%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `72.88% <100.00%> (+6.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `79.02% <100.00%> (+5.44%)` | :arrow_up: |
| [cmd/commonflags.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2NvbW1vbmZsYWdzLmdv) | `90.47% <0.00%> (ø)` | |
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `74.73% <0.00%> (+2.10%)` | :arrow_up: |
| [pkg/build/install.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2luc3RhbGwuZ28=) | `69.23% <0.00%> (+5.12%)` | :arrow_up: |
| [pkg/build/tmpfolder.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3RtcGZvbGRlci5nbw==) | `69.14% <0.00%> (+6.38%)` | :arrow_up: |
| [pkg/cover/delta.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2RlbHRhLmdv) | `93.54% <0.00%> (+6.45%)` | :arrow_up: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree-more) | |

codecov[bot]: # [Codecov](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=h1) Report
> Merging [#76](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=desc) into [master](https://codecov.io/gh/qiniu/goc/commit/273ccbfbf21b73dcb1c899256ce51042647c89ca&el=desc) will **increase** coverage by `7.11%`.
> The diff coverage is `100.00%`.

[![Impacted file tree graph](https://codecov.io/gh/qiniu/goc/pull/76/graphs/tree.svg?width=650&height=150&src=pr&token=7AHPDDLXQ3)](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master      #76      +/-   ##
==========================================
+ Coverage   61.52%   68.63%   +7.11%     
==========================================
  Files          33       33              
  Lines        1679     1690      +11     
==========================================
+ Hits         1033     1160     +127     
+ Misses        501      373     -128     
- Partials      145      157      +12     
```

| Flag | Coverage Δ | |
|---|---|---|
| #e2e | `41.47% <40.38%> (+18.78%)` | :arrow_up: |
| #unittest | `58.70% <100.00%> (-0.09%)` | :arrow_down: |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/qiniu/goc/pull/76?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [cmd/profile.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL3Byb2ZpbGUuZ28=) | `72.00% <100.00%> (+44.00%)` | :arrow_up: |
| [pkg/cover/client.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NsaWVudC5nbw==) | `72.88% <100.00%> (+6.77%)` | :arrow_up: |
| [pkg/cover/server.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL3NlcnZlci5nbw==) | `79.02% <100.00%> (+5.44%)` | :arrow_up: |
| [cmd/commonflags.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-Y21kL2NvbW1vbmZsYWdzLmdv) | `90.47% <0.00%> (ø)` | |
| [pkg/cover/cover.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2NvdmVyLmdv) | `74.73% <0.00%> (+2.10%)` | :arrow_up: |
| [pkg/build/install.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL2luc3RhbGwuZ28=) | `69.23% <0.00%> (+5.12%)` | :arrow_up: |
| [pkg/build/tmpfolder.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2J1aWxkL3RtcGZvbGRlci5nbw==) | `69.14% <0.00%> (+6.38%)` | :arrow_up: |
| [pkg/cover/delta.go](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree#diff-cGtnL2NvdmVyL2RlbHRhLmdv) | `93.54% <0.00%> (+6.45%)` | :arrow_up: |
| ... and [13 more](https://codecov.io/gh/qiniu/goc/pull/76/diff?src=pr&el=tree-more) | |


Patch:
diff --git a/cmd/profile.go b/cmd/profile.go
index 1050928..4d9fa9d 100644
--- a/cmd/profile.go
+++ b/cmd/profile.go
@@ -38,10 +38,10 @@ goc profile
 # Get coverage counter from specified register center, the result output to specified file.
 goc profile --center=http://192.168.1.1:8080 --output=./coverage.cov
 
-# Get coverage counter of several specified services. You can get all available service names from command 'goc list'. Use 'service' and 'address' flag at the same time is illegal.
+# Get coverage counter of several specified services. You can get all available service names from command 'goc list'. Use 'service' and 'address' flag at the same time may cause ambiguity, please use them separately.
 goc profile --service=service1,service2,service3
 
-# Get coverage counter of several specified addresses. You can get all available addresses from command 'goc list'. Use 'service' and 'address' flag at the same time is illegal.
+# Get coverage counter of several specified addresses. You can get all available addresses from command 'goc list'. Use 'service' and 'address' flag at the same time may cause ambiguity, please use them separately.
 goc profile --address=address1,address2,address3
 
 # Force to get the coverage counter of all the available services you want.
@@ -81,8 +81,8 @@ var addrList []string
 
 func init() {
 	profileCmd.Flags().StringVarP(&output, "output", "o", "", "download cover profile")
-	profileCmd.Flags().StringSliceVarP(&svrList, "service", "", nil, "get the cover profile of these services, you can get all available service names from command `goc list`, use this flag and 'address' flag at the same time is illegal.")
-	profileCmd.Flags().StringSliceVarP(&addrList, "address", "", nil, "get the cover profile of these addresses, you can get all available addresses from command `goc list`, use this flag and 'service' flag at the same time is illegal.")
+	profileCmd.Flags().StringSliceVarP(&svrList, "service", "", nil, "get the cover profile of these services, you can get all available service names from command `goc list`, use this flag and 'address' flag at the same time may cause ambiguity, please use them separately.")
+	profileCmd.Flags().StringSliceVarP(&addrList, "address", "", nil, "get the cover profile of these addresses, you can get all available addresses from command `goc list`, use this flag and 'service' flag at the same time may cause ambiguity, please use them separately.")
 	profileCmd.Flags().BoolVarP(&force, "force", "f", false, "force to get the coverage counter of all the available services you want")
 	addBasicFlags(profileCmd.Flags())
 	rootCmd.AddCommand(profileCmd)
diff --git a/pkg/cover/client.go b/pkg/cover/client.go
index 2c8f030..7bdbb44 100644
--- a/pkg/cover/client.go
+++ b/pkg/cover/client.go
@@ -92,7 +92,7 @@ func (c *client) ListServices() ([]byte, error) {
 func (c *client) Profile(param ProfileParam) ([]byte, error) {
 	u := fmt.Sprintf("%s%s?force=%s", c.Host, CoverProfileAPI, strconv.FormatBool(param.Force))
 	if len(param.Service) != 0 && len(param.Address) != 0 {
-		return nil, fmt.Errorf("use 'service' and 'address' flag at the same time is illegal")
+		return nil, fmt.Errorf("use 'service' flag and 'address' flag at the same time may cause ambiguity, please use them separately")
 	}
 
 	for _, svr := range param.Service {
diff --git a/pkg/cover/server.go b/pkg/cover/server.go
index 10da691..3b36122 100644
--- a/pkg/cover/server.go
+++ b/pkg/cover/server.go
@@ -138,35 +138,32 @@ func profile(c *gin.Context) {
 		c.JSON(http.StatusExpectationFailed, gin.H{"error": "invalid param"})
 		return
 	}
-	svrList := c.QueryArray("service")
-	addrList := c.QueryArray("address")
-	svrsAll := DefaultStore.GetAll()
-	svrsUnderTest, err := getSvrUnderTest(svrList, addrList, force, svrsAll)
+	serviceList := removeDuplicateElement(c.QueryArray("service"))
+	addressList := removeDuplicateElement(c.QueryArray("address"))
+	allInfos := DefaultStore.GetAll()
+	filterAddrList, err := filterAddrs(serviceList, addressList, force, allInfos)
 	if err != nil {
 		c.JSON(http.StatusExpectationFailed, gin.H{"error": err.Error()})
+		return
 	}
 
 	var mergedProfiles = make([][]*cover.Profile, 0)
-	for _, svrs := range svrsUnderTest {
-		for _, addr := range svrs {
-			pp, err := NewWorker(addr).Profile(ProfileParam{})
-			if err != nil {
-				if force {
-					continue
-				}
-				c.JSON(http.StatusExpectationFailed, gin.H{"error": err.Error()})
-				return
-			}
-			profile, err := convertProfile(pp)
-			if err != nil {
-				if force {
-					continue
-				}
-				c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
-				return
+	for _, addr := range filterAddrList {
+		pp, err := NewWorker(addr).Profile(ProfileParam{})
+		if err != nil {
+			if force {
+				log.Warnf("get profile from [%s] failed, error: %s", addr, err.Error())
+				continue
 			}
-			mergedProfiles = append(mergedProfiles, profile)
+			c.JSON(http.StatusExpectationFailed, gin.H{"error": err.Error()})
+			return
+		}
+		profile, err := convertProfile(pp)
+		if err != nil {
+			c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
+			return
 		}
+		mergedProfiles = append(mergedProfiles, profile)
 	}
 
 	if len(mergedProfiles) == 0 {
@@ -235,48 +232,53 @@ func contains(arr []string, str string) bool {
 	return false
 }
 
-// getSvrUnderTest get service map by service and address list
-func getSvrUnderTest(svrList, addrList []string, force bool, svrsAll map[string][]string) (svrsUnderTest map[string][]string, err error) {
-	svrsUnderTest = map[string][]string{}
-	if len(svrList) != 0 && len(addrList) != 0 {
-		return nil, fmt.Errorf("use this flag and 'address' flag at the same time is illegal")
+// filterAddrs filter address list by given service and address list
+func filterAddrs(serviceList, addressList []string, force bool, allInfos map[string][]string) (filterAddrList []string, err error) {
+	addressAll := []string{}
+	for _, addr := range allInfos {
+		addressAll = append(addressAll, addr...)
 	}
-	// Return all servers when all param is nil
-	if len(svrList) == 0 && len(addrList) == 0 {
-		return svrsAll, nil
-	} else {
-		// Add matched services to map
-		if len(svrList) != 0 {
-			for _, name := range svrList {
-				if addr, ok := svrsAll[name]; ok {
-					svrsUnderTest[name] = addr
-					continue // jump to match the next service
-				}
-				if !force {
-					return nil, fmt.Errorf("service [%s] not found", name)
-				}
-			}
+	if len(serviceList) != 0 && len(addressList) != 0 {
+		return nil, fmt.Errorf("use 'service' flag and 'address' flag at the same time may cause ambiguity, please use them separately")
+	}
+	// Add matched services to map
+	for _, name := range serviceList {
+		if addr, ok := allInfos[name]; ok {
+			filterAddrList = append(filterAddrList, addr...)
+			continue // jump to match the next service
 		}
-		// Add matched addresses to map
-		if len(addrList) != 0 {
-		I:
-			for _, addr := range addrList {
-				for svr, addrs := range svrsAll {
-					if contains(svrsUnderTest[svr], addr) {
-						continue I // The address is duplicate, jump over
-					}
-					for _, a := range addrs {
-						if a == addr {
-							svrsUnderTest[svr] = append(svrsUnderTest[svr], a)
-							continue I // jump to match the next address
-						}
-					}
-				}
-				if !force {
-					return nil, fmt.Errorf("address [%s] not found", addr)
-				}
-			}
+		if !force {
+			return nil, fmt.Errorf("service [%s] not found", name)
+		}
+		log.Warnf("service [%s] not found", name)
+	}
+	// Add matched addresses to map
+	for _, addr := range addressList {
+		if contains(addressAll, addr) {
+			filterAddrList = append(filterAddrList, addr)
+			continue
+		}
+		if !force {
+			return nil, fmt.Errorf("address [%s] not found", addr)
+		}
+		log.Warnf("address [%s] not found", addr)
+	}
+	if len(addressList) == 0 && len(serviceList) == 0 {
+		filterAddrList = addressAll
+	}
+	// Return all servers when all param is nil
+	return filterAddrList, nil
+}
+
+// removeDuplicateElement remove duplicate element in slice
+func removeDuplicateElement(addrs []string) []string {
+	result := make([]string, 0, len(addrs))
+	temp := map[string]struct{}{}
+	for _, item := range addrs {
+		if _, ok := temp[item]; !ok {
+			temp[item] = struct{}{}
+			result = append(result, item)
 		}
 	}
-	return svrsUnderTest, nil
+	return result
 }


Test patch:
diff --git a/pkg/cover/client_test.go b/pkg/cover/client_test.go
index 9bff493..687eb1c 100644
--- a/pkg/cover/client_test.go
+++ b/pkg/cover/client_test.go
@@ -68,7 +68,7 @@ func TestClientAction(t *testing.T) {
 		{
 			service: Service{Name: "serviceOK", Address: profileSuccessMockSvr.URL},
 			param:   ProfileParam{Force: false, Service: []string{"serviceOK"}, Address: []string{profileSuccessMockSvr.URL}},
-			res:     "use 'service' and 'address' flag at the same time is illegal",
+			res:     "use 'service' flag and 'address' flag at the same time may cause ambiguity, please use them separately",
 		},
 		{
 			service: Service{Name: "serviceOK", Address: profileSuccessMockSvr.URL},
@@ -94,11 +94,6 @@ func TestClientAction(t *testing.T) {
 			service: Service{Name: "serviceErr", Address: profileErrMockSvr.URL},
 			res:     "bad mode line: error",
 		},
-		{
-			service: Service{Name: "serviceErr", Address: profileErrMockSvr.URL},
-			param:   ProfileParam{Force: true},
-			res:     "no profiles",
-		},
 		{
 			service: Service{Name: "serviceNotExist", Address: "http://172.0.0.2:7777"},
 			res:     "connection refused",
diff --git a/pkg/cover/server_test.go b/pkg/cover/server_test.go
index 1e6d928..61f65ed 100644
--- a/pkg/cover/server_test.go
+++ b/pkg/cover/server_test.go
@@ -10,51 +10,69 @@ func TestContains(t *testing.T) {
 	assert.Equal(t, contains([]string{"a", "b"}, "c"), false)
 }
 
-func TestGetSvrUnderTest(t *testing.T) {
+func TestFilterAddrs(t *testing.T) {
 	svrAll := map[string][]string{
 		"service1": {"http://127.0.0.1:7777", "http://127.0.0.1:8888"},
 		"service2": {"http://127.0.0.1:9999"},
 	}
+	addrAll := []string{}
+	for _, addr := range svrAll {
+		addrAll = append(addrAll, addr...)
+	}
 	items := []struct {
 		svrList  []string
 		addrList []string
 		force    bool
 		err      string
-		svrRes   map[string][]string
+		addrRes  []string
 	}{
 		{
 			svrList:  []string{"service1"},
 			addrList: []string{"http://127.0.0.1:7777"},
-			err:      "use this flag and 'address' flag at the same time is illegal",
+			err:      "use 'service' flag and 'address' flag at the same time may cause ambiguity, please use them separately",
 		},
 		{
-			svrRes: svrAll,
+			addrRes: addrAll,
 		},
 		{
 			svrList: []string{"service1", "unknown"},
 			err:     "service [unknown] not found",
 		},
 		{
-			svrList: []string{"service1", "service1", "service2", "unknown"},
+			svrList: []string{"service1", "service2", "unknown"},
+			force:   true,
+			addrRes: addrAll,
+		},
+		{
+			svrList: []string{"unknown"},
 			force:   true,
-			svrRes:  svrAll,
 		},
 		{
 			addrList: []string{"http://127.0.0.1:7777", "http://127.0.0.2:7777"},
 			err:      "address [http://127.0.0.2:7777] not found",
 		},
 		{
-			addrList: []string{"http://127.0.0.1:7777", "http://127.0.0.1:7777", "http://127.0.0.1:9999", "http://127.0.0.2:7777"},
+			addrList: []string{"http://127.0.0.1:7777", "http://127.0.0.1:9999", "http://127.0.0.2:7777"},
 			force:    true,
-			svrRes:   map[string][]string{"service1": {"http://127.0.0.1:7777"}, "service2": {"http://127.0.0.1:9999"}},
+			addrRes:  []string{"http://127.0.0.1:7777", "http://127.0.0.1:9999"},
 		},
 	}
 	for _, item := range items {
-		svrs, err := getSvrUnderTest(item.svrList, item.addrList, item.force, svrAll)
+		addrs, err := filterAddrs(item.svrList, item.addrList, item.force, svrAll)
 		if err != nil {
 			assert.Equal(t, err.Error(), item.err)
 		} else {
-			assert.Equal(t, svrs, item.svrRes)
+			if len(addrs) == 0 {
+				assert.Equal(t, addrs, item.addrRes)
+			}
+			for _, a := range addrs {
+				assert.Contains(t, item.addrRes, a)
+			}
 		}
 	}
 }
+
+func TestRemoveDuplicateElement(t *testing.T) {
+	strArr := []string{"a", "a", "b"}
+	assert.Equal(t, removeDuplicateElement(strArr), []string{"a", "b"})
+}