goc
goc copied to clipboard
支持设定service name
build时候支持设置service_name,不只是使用可执行文件作为name
- 补充说明一下这么做的原因,以便评估是否需要
- build 不是唯一会编译的命令,还有 install/run
抱歉前段时间有点忙,现在才回复。
- 项目部署的服务的文件名都是一样的,需要指定一个服务名来区分不同的微服务进程
- 已经在run和intsall补上
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: socket515
To complete the pull request process, please assign lyyyuna
You can assign the PR to them by writing /assign @lyyyuna
in a comment when ready.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
- 补充说明一下这么做的原因,以便评估是否需要
- build 不是唯一会编译的命令,还有 install/run
@socket515 下次回复直接加新留言就行,不要 edit,不然没通知。
对于 flag 名字,建议换一个,这个容易引起误解,并且在 help 中说明 flag 未指定时,service 的默认值是什么。
关于flag的名字,profile中也是用service
,所以flag使用这个
Codecov Report
Merging #199 (fb2789e) into master (45aee23) will increase coverage by
2.79%
. The diff coverage is80.00%
.
@@ Coverage Diff @@
## master #199 +/- ##
==========================================
+ Coverage 68.48% 71.27% +2.79%
==========================================
Files 34 34
Lines 1745 2012 +267
==========================================
+ Hits 1195 1434 +239
- Misses 445 472 +27
- Partials 105 106 +1
Flag | Coverage Δ | |
---|---|---|
e2e-1.11.x | ? |
|
e2e-1.12.x | ? |
|
e2e-1.13.x | ? |
|
e2e-1.14.x | ? |
|
e2e-1.15.x | ? |
|
e2e-1.16.x | ? |
|
unittest-1.13.x | 71.17% <80.00%> (+2.69%) |
:arrow_up: |
unittest-1.14.x | 71.17% <80.00%> (+2.69%) |
:arrow_up: |
unittest-1.15.x | 71.27% <80.00%> (+2.79%) |
:arrow_up: |
unittest-1.16.x | 71.17% <80.00%> (+2.69%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
cmd/run.go | 6.12% <0.00%> (+1.24%) |
:arrow_up: |
pkg/cover/instrument.go | 20.83% <ø> (+1.78%) |
:arrow_up: |
cmd/build.go | 67.64% <100.00%> (+4.31%) |
:arrow_up: |
cmd/commonflags.go | 90.90% <100.00%> (-3.04%) |
:arrow_down: |
cmd/install.go | 66.66% <100.00%> (+4.59%) |
:arrow_up: |
pkg/cover/cover.go | 72.15% <100.00%> (+2.53%) |
:arrow_up: |
pkg/cover/delta.go | 87.09% <0.00%> (-2.27%) |
:arrow_down: |
pkg/build/run.go | 0.00% <0.00%> (ø) |
|
pkg/qiniu/mock.go | 100.00% <0.00%> (ø) |
|
... and 30 more |
以名字为启动参数的需求
这里能不能补充点详细的信息呢,比如给个例子。@maxiloEmmmm
@CarlJi 没事了 谢谢, 没仔细看代码 v2的extra可以满足 我通过环境变量注入即可
@CarlJi extra可能会被多个同宿client污染 感觉还是需要service name 例子大概是 switch os.args(0) case...
Codecov Report
Merging #199 (fb2789e) into master (45aee23) will increase coverage by
2.79%
. The diff coverage is80.00%
.
Additional details and impacted files
@@ Coverage Diff @@
## master #199 +/- ##
==========================================
+ Coverage 68.48% 71.27% +2.79%
==========================================
Files 34 34
Lines 1745 2012 +267
==========================================
+ Hits 1195 1434 +239
- Misses 445 472 +27
- Partials 105 106 +1
Flag | Coverage Δ | |
---|---|---|
e2e-1.11.x | ∅ <ø> (∅) |
|
e2e-1.12.x | ∅ <ø> (∅) |
|
e2e-1.13.x | ∅ <ø> (∅) |
|
e2e-1.14.x | ∅ <ø> (∅) |
|
e2e-1.15.x | ∅ <ø> (∅) |
|
e2e-1.16.x | ∅ <ø> (∅) |
|
unittest-1.13.x | 71.17% <80.00%> (+2.69%) |
:arrow_up: |
unittest-1.14.x | 71.17% <80.00%> (+2.69%) |
:arrow_up: |
unittest-1.15.x | 71.27% <80.00%> (+2.79%) |
:arrow_up: |
unittest-1.16.x | 71.17% <80.00%> (+2.69%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
cmd/run.go | 6.12% <0.00%> (+1.24%) |
:arrow_up: |
pkg/cover/instrument.go | 20.83% <ø> (+1.78%) |
:arrow_up: |
cmd/build.go | 67.64% <100.00%> (+4.31%) |
:arrow_up: |
cmd/commonflags.go | 90.90% <100.00%> (-3.04%) |
:arrow_down: |
cmd/install.go | 66.66% <100.00%> (+4.59%) |
:arrow_up: |
pkg/cover/cover.go | 72.15% <100.00%> (+2.53%) |
:arrow_up: |
pkg/cover/delta.go | 87.09% <0.00%> (-2.27%) |
:arrow_down: |
pkg/build/run.go | 0.00% <0.00%> (ø) |
|
pkg/qiniu/mock.go | 100.00% <0.00%> (ø) |
|
... and 30 more |