You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by zh...@apache.org on 2021/09/04 15:57:32 UTC

[dubbo-go-samples] branch compress updated (1ca99fb -> dcc91f4)

This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a change to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git.


 discard 1ca99fb  add test ppt file
    omit cce405e  Pls. --> Pls
    omit 63d0718  Merge branch 'master' of https://github.com/apache/dubbo-go-samples
    omit c6e88ca  mod imports (#169)
    omit 65d5100  added Chinese readme for tracing/grpc (#133)
    omit 5cb956f  fix: add grpc provider reference in codes generated by protoc-gen-dubbo (#127)
    omit 761b21b  update: add `openzipkin`,`version` intro to dubbo-go readme, fix quote of openzipkin readme (#120)
    omit 99da212  Feature/openzipkin (#119)
    omit 98d2df2  Ftr: add rest test case (#103)
    omit 9c9ad16  Merge branch 'master' of https://github.com/apache/dubbo-go-samples
    omit 88deacb  add: game api (#111)
    omit 9ced87c  upgrade dubbo-go & dubbo-go-hessian2 version
    omit 7e99b8a  fix: fix seata sample, make it work properly (#108)
    omit 7f9cdba  Fix  multi registry (#1) (#100)
    omit 3a225ba  Merge pull request #99 from PhilYue/feature/version
    omit 0a5e6b9  add readme of game (#97)
    omit a3095a7  update: readme
    omit d8fc0b5  update: tests version provider
    omit 840de34  update: 1. clean code 2. add readme of multiple version sample
    omit 53531d0  add: dubbo-go version sample
    omit 8b45913  Merge pull request #14 from apache/master
    omit faf28eb  Merge pull request #98 from Mulavar/fix-spelling-mistake
    omit 92b845c  fix(readme_zh.md): fix spelling mistake
    omit 05c90ac  Merge pull request #13 from apache/master
    omit 05f9a9f  invoke grpc service
    omit 1a1fc07  Merge pull request #12 from apache/master
    omit 951f4d0  up:mod优化 (#94)
    omit afdf605  Merge pull request #11 from apache/master
    omit df4dea7  clean up integration test (#92)
    omit 5652f00  remove shop examples, since it's dup with chain and shopping-order (#90)
    omit df067ac  enhance tls examples (#91)
    omit b664144  Router example enhance (#89)
    omit 78d2391  Ftr:  add the module of shopping-order (#82)
    omit 9e229ad  Merge pull request #88 from beiwei30/router-examples
    omit bfdd177  disable condition router example's CI
    omit a32a59c  fix grammar.
    omit 071cd3c  enhance router examples
    omit 970d11c  Merge pull request #9 from apache/master
    omit 6ad773a  Merge pull request #87 from beiwei30/group-run-configs
    omit aa80cf4  ftr: group run config files into sub-directories
    omit f3205e5  Merge pull request #85 from beiwei30/multi-zone
    omit a5cce3d  disable generic integration test
    omit efb5eb4  multi-zone example
    omit 8cf5780  fix directory problem.
    omit a9611d5  Merge pull request #80 from apache/fix/Id
    omit 867e84a  Id -> ID
    omit 09fe57d  Merge pull request #79 from zfkun/game
    omit fd8dba7  add:game samples
    omit af52517  Merge pull request #8 from apache/master
    omit 091a70a  Merge pull request #68 from cjphaha/tls
    omit 96a7667  Merge pull request #78 from xiaoliu10/fix_zk_configcenter
    omit 26ee38d  Merge pull request #77 from zhaoyunxing92/generic
    omit 903836b  1. fix zk configcenter can not found zk node
    omit f710bd4  up:mv it to the 3rd import block
    omit 72d67bc  up:mv it to the 3rd import block
    omit 529412a  add:generic samples
    omit 6915bbb  mod Id to ID
    omit f09c490  del blank line go-server/pkg/user.go
    omit 02a9c8c  Merge pull request #70 from milerL/nacos
    omit 5565f5c  Merge pull request #75 from zhaoyunxing92/multi-registry
    omit 4a7e053  up:语法问题
    omit 4b1439a  up:更新导报问题
    omit f7604ca  add:multi registry
    omit 800b322  Merge pull request #73 from xiaoliu10/upgrade_seata_version
    omit 3e892e3  mod refmt go-client/pkg/user
    omit 6cc79ea  mod problems in pr
    omit 7d40940  Merge pull request #72 from beiwei30/hello-world
    omit 07edb96  Upgrade the Seata version to adapt the Getty WritePkg method to increase the return value
    omit d9304c9  Upgrade the Seata version to adapt the Getty WritePkg method to increase the return value
    omit 0ab36fc  fix: issue#71
    omit 76f2b1c  修改:修复registry/nacos示例无法正常使用的问题,调整client.yml和server.yml方便阅读
    omit 807bb2d  Merge pull request #7 from apache/master
    omit ac38818  adjust import sequence in nacos
    omit 7f64aed  add apache license & mod folder
    omit 84c0a7e  add tls sample
    omit 101f7e9  Merge pull request #52 from yakecanlee/feature/add-sample
    omit 1fca0de  fix helloworld sample
    omit bacaeed  fix error imports
    omit 49f45a6  fix helloworld java sample
    omit 8ec9fbe  adjust imports and readme
    omit 0f65d0b  group the imports
    omit aeab8f8  add readme_zh for samples
    omit 38ed266  add run configuration for samples
    omit 33eafbe  add readme and run configuration for rest sample
    omit 8863839  add readme for group
    omit 71cf228  add readme for generic and helloworld
    omit a804655  Merge pull request #62 from beiwei30/configcenter
    omit 12a139c  fix: regroup import for nacos configcenter
    omit 502c238  fix: regroup imports
    omit e5999a2  Merge pull request #66 from beiwei30/filter
    omit ae3feca  Merge pull request #64 from beiwei30/docker
    omit 219ffe3  Merge pull request #63 from beiwei30/direct
    omit d75c0be  enable IT for configcenter/zookeeper and filter/sentinel
    omit aacfd85  fix: make integration test work for custom filter, correct dir
    omit a01ac0a  fix: README for filter samples
    omit cf6167f  fix: revise README
    omit b620ba6  fix: group import, add run files
    omit 6113e69  fix: add run configs for docker
    omit f9e711f  fix: regroup import
    omit ec9f630  fix: regroup imports
    omit 109653f  Merge pull request #6 from apache/master
    omit 7df670e  configcenter readme, import and run files
    omit b970ee8  Merge pull request #57 from beiwei30/config-api
    omit a300659  Merge pull request #61 from zhaoyunxing92/master
    omit 42fa80e  up:调整import顺序
    omit e575e56  Merge pull request #59 from PhilYue/feature/direct/readme
    omit 9efee02  Merge pull request #5 from apache/master
    omit a25270e  修复语法错误
    omit b004549  add:metric readme
    omit 41d83f4  Add: fix the .run for direct
    omit 80d6086  Add: .run for direct
    omit 47c5008  Doc: improving README and README_zh
    omit 176cbe4  Mod: clear out the unneeded config
    omit f7bd0b1  Merge pull request #55 from beiwei30/async
    omit 9806c48  Merge pull request #58 from beiwei30/context
    omit bb4b680  Doc: formatting docs of README_zh
    omit 2f4856d  optmize imports
    omit c5d7635  optimize imports
    omit a17295c  Doc: formatting docs of README and cleaning
    omit 4bfdc91  Doc: formatting docs of README
    omit 28f6443  Doc: improving docs of README
    omit 207264e  Doc: adding direct README_zh and cleaning
    omit ca13cd8  fix: regroup import
    omit 302ab73  add:metric文档
    omit ca1e14b  feat: add run configs, and regroup import
    omit 195b985  fix: regroup imports
    omit 7f05bde  fix: add run configs, bump up dubbo-go version, revise README
    omit d7687f2  Doc: adding direct README
    omit 97e33bb  Merge pull request #4 from apache/master
    omit 52644af  Merge pull request #53 from zhaoyunxing92/master
    omit 58e82e7  add README
    omit eb2e0ee  Merge pull request #3 from apache/master
    omit 566af02  add run configurations and fix client issue.
    omit 725de98  Merge pull request #54 from beiwei30/chain
    omit ae86a09  group var declaration
    omit 58c828b  optimize imports
    omit 2525e05  add apache license header
    omit d2bf83e  add "chain" example
    omit cb325dd  Merge pull request #2 from apache/master
    omit b393262  add:metric文档
    omit df451eb  Merge pull request #51 from LaurenceLiZhixin/fix/etcd
    omit cb3b01b  Merge pull request #49 from lauyang/patch-2
    omit a594672  fix: add provide_by
    omit c6e5758  Update README_zh.md
    omit 6be9874  Merge pull request #48 from dk-lockdown/master
    omit 497cc48  upgrade seata-golang version
    omit bb7a0d6  Merge pull request #43 from LaurenceLiZhixin/ftr/docker
    omit 4b3fb3b  Merge pull request #44 from LaurenceLiZhixin/ftr/config-api
    omit 2b4f2ac  Merge pull request #45 from LaurenceLiZhixin/fix/consul-readme
    omit fe189cd  Merge pull request #46 from LaurenceLiZhixin/ftr/context
    omit dedc754  fix: add consul readme
    omit a3d14e6  fix: add zh readme
    omit 0b01f9d  fix: add zh readme
    omit 6632817  fix: add cn readme
    omit 5c609cb  Merge pull request #47 from cityiron/1.5.6-test
    omit e614f74  update dubbogo to 1.5 latest commit
    omit 92e0a93  ftr: context sample
    omit ae13df4  fix: consul readme
    omit c5b09e7  ftr:config api
    omit f96fe82  ftr: add docker
    omit 425b1a2  Merge pull request #41 from beiwei30/attachment-run-config
    omit 224f018  Merge pull request #40 from beiwei30/translate
    omit 5e69c94  provide run configuration for attachment sample
    omit f19b59f  provide HOWTO, and translate all docs into Chinese.
    omit 91c2483  Merge pull request #39 from beiwei30/docs
    omit 8f37179  enhance docs
    omit 885db97  Merge pull request #38 from zhaoyunxing92/master
    omit 6f5c173  add:.run file
    omit 7bbd016  Merge pull request #37 from beiwei30/attachment
    omit b5867ec  add zh_CN README
    omit f896ca7  comment sentinel tempararily
    omit aef62db  adjust sentinel version
    omit 1b1db7b  bump up sentinel-go version to v1.0.2
    omit e452c22  add CI badge
    omit 7257826  add attachment sample
    omit 1e9b072  Merge branch '1.5.5'
    omit de91c00  merge master
    omit df07a3e  merge master
    omit 86a6f7b  Merge pull request #24 from fangyincheng/fix-2.7
    omit 329248b  Merge pull request #32 from LaurenceLiZhixin/fix/grpcStreamBug
    omit 5ac5646  Merge pull request #31 from louyuting/20201227-update-sentinel-go
    omit 145b86c  fix: fix dubbo grpc stream bug
    omit 469fe78  upgrade sentinel go to 1.0.1
    omit 49609b5  refact generic/java
    omit ac5b159  resolve conflicts
    omit a2ec4b1  Merge pull request #17 from apache/1.5.5
    omit 0c6af36  update version for release
    omit d439511  update version
    omit c7048b9  update version
    omit 7f02dae  resolve conflicts
    omit dd4be5b  add java for general
    omit 3e66db1  Merge pull request #27 from apache/fix_mod
    omit ab98b4e  resolve conflict
    omit 8736511  fix: go mod tidy error
    omit 95b1fae  fix router problem
    omit 740f2f7  Merge pull request #25 from georgehao/1.5.5
    omit 37850bb  Merge pull request #23 from cityiron/fix-sd-file
    omit fa829be  Merge branch '1.5.5' into 1.5.5-georgehao
    omit 1b1fa1f  Merge branch '1.5.5' into fix-sd-file
    omit 2fd951f  remove sd/consul
    omit bb10e58  merge
    omit 3274111  add provid_by
    omit ed77fa5  feat: add registry/servicediscovery/etcd client.yaml add provide_by
    omit 657cf27  modify consul demo to support makefile (#22)
    omit 061030c  test
    omit dd84b14  Merge pull request #21 from LaurenceLiZhixin/1.5.5
    omit 44bd9a5  Merge pull request #20 from cityiron/seata-sample
    omit 398f653  fix: change pb.go
    omit 9d10173  fix: use protobuf 1.3.2 to generate proper pb.go
    omit de843d1  fix: re cicd
    omit 92c0711  fix: dubbo-go repository path
    omit 12e1125  add integrate
    omit ff07427  change client name equals provider
    omit 1d00fc6  remove seata mod
    omit 7a992b8  Merge pull request #16 from pantianying/sentinel-filter
    omit e8b3c67  fix: delete unused gosum
    omit 0f66623  fix: change grpc and sentinel version
    omit 5f5e8e7  fix bug
    omit a735fdc  add script on integrate
    omit f53386f  fix router case
    omit 44fda64  seata sample run
    omit a031c0f  fix sd/zookeeper case
    omit 83f126f  Merge remote-tracking branch 'apache-dubbo-go-samples/1.5.5' into 1.5.5
    omit 1680468  add sd/zookeeper case
    omit cfd2c00  Update dubbo-go version
    omit 1aa054f  Update dubbo-go version
    omit 0723cca  fix test problem
    omit dad13c6  update version num
    omit f2c5cc5  update pkg
    omit 498e589  Merge pull request #19 from mark4z/master
    omit 8dea98d  add sd/zookeeper case
    omit 321a312  fix integration
    omit 7db7587  fix integration
    omit 70662bb  Update dubbo-go version
    omit b8c2ea5  Update dubbo-go version
    omit d6ef2ef  fix test problem
    omit 6860d94  update version num
    omit d419676  add integration test
    omit 68f9cb6  add sentinel-filter sample
    omit 1061538  Merge pull request #15 from zouyx/master
    omit 69ee55b  remove multi-registry case
    omit 32974b3  remove router/tag case and fix zookeeper service discovery case
    omit 4323b16  remove configcenter/zookeeper case
    omit fca4c3c  fix test problem
    omit c6c8223  fix test problem
    omit 19490a7  fix test problem
    omit 700b171  fix test problem
    omit 43bfcd5  add configcenter/zookeeper case
    omit cc6e794  change log level
    omit 8935e9f  add more test case
    omit 0ba46db  update pkg
    omit b1cc35c  Merge pull request #13 from zouyx/master
    omit 90d7aec  change log level
    omit ecb1e84  fix test problem
    omit 23f4ccb  remove test
    omit e948015  change test method
    omit 718b4f1  fix test problem
    omit 1add7c8  add exit code for test
    omit 6436108  add exit code for test
    omit 6223164  Test return exit code when panic
    omit a2ed46c  Fix Makefile bug
    omit 1882fd2  change stop to clean step
    omit a9808d8  delete useless files
    omit 9e52237  1.change log level for async dir 2.revert makefile
    omit 7c52339  1.delete useless dir 2.add _ "github.com/apache/dubbo-go/metadata/service/inmemory" for all test dir 3.change log level to error
    omit 2d36800  fix problems
    omit eb0aecd  add more test case
    omit 2e433b3  add more test case
    omit a7d4e82  add more test case
    omit a333952  add more test case
    omit 2533021  add more test case
    omit 22493e1  add more test case
    omit 0207628  update test case
    omit 5d585d2  update test case
    omit 08417eb  fix problems
    omit bf718cd  fix problems
    omit 027d614  add general test
    omit e00e54e  add general test
    omit ac06aa4  Merge branch 'master-apache-dubbo-go-samples'
    omit 19caad0  Merge branch 'master-apache-dubbo-go-samples'
    omit 919222d  fix problems
    omit b902b00  Merge remote-tracking branch 'origin/master'
    omit 4c0d8df  Merge branch 'feature/addTravis'
    omit ff7ed65  add github action
    omit 7bf5670  Update blank.yml
    omit d1e1b08  add github action
    omit f385cbc  add github action
    omit 66eaa87  Create blank.yml
    omit 904a232  Merge pull request #12 from zouyx/master
    omit 2793183  fix bug
    omit fd1ccfd  fix problems
    omit 795ef6c  rename package
    omit 92319db  fix package problem
    omit d7773ce  add travis
    omit 6a87059  make grpc work with integration test
    omit db32d44  make general/dubbo work with integration test
    omit eca144a  make integration test work for router/condition
    omit e11dab6  enhance makefile
    omit 1eb5b31  enhance makefile to allow replace variables in conf yaml files.
    omit 8630dff  servicediscovery/zookeeper
    omit 4e372b2  make registry/servicediscovery/nacos work with integration test
    omit 9979a21  make registry/servicediscovery/file work with integration test
    omit 4e25961  correct registry/servicediscovery/etcd
    omit 218caa4  add a FIXME
    omit e5909a9  refresh dubbo-go to snapshot, make servicediscovery/etcd works.
    omit 4d34a4f  make integration test works for registry/nacos
    omit 33a0f2e  make integration test work for registry/etcd
    omit 5ce065e  reformat helloworld
    omit 339e5ff  make integration test work for multi-registry
    omit 208abb7  enhance makefile
    omit c25e8aa  rename dir
    omit 104c314  make integration test work for metric and zone
    omit 62b7282  fix PID
    omit c666d1c  Merge pull request #10 from zouyx/feature/fixAutoTest
    omit 34dfe3d  Merge pull request #9 from apache/tag_router
    omit 6f8cda7  Fix: fmt codes
    omit 84f4936  Fix: fmt codes
    omit 7406106  Fix: lost a pkg in general
    omit 953673d  Add: tag router examples
    omit ed3f3d1  Merge pull request #8 from zouyx/feature/fixAutoTest
    omit 9607e80  change test steps
    omit 33a5de3  change dir
    omit ba5f0fd  start integrate test
    omit 25f33f8  remove problems code
    omit f3de20f  delete
    omit 7b9e32f  travis add Make
    omit e0e2fbe  make integration test works for metrics
    omit 47811fd  clean up useless code
    omit 2142d1e  make integration test works for filter/tpslimit
    omit 5c07bf5  make integration test works for fiter/custom_filter
    omit f19feed  Merge pull request #7 from zhangshen023/consul_service_discovery
    omit f2dfc66  make integration test work for configcenter/zookeeper
    omit aeb1750  remove useless java dirs
    omit 20e4f90  make integration test works for nacos
    omit cdbddd8  clean up imports
    omit a591c09  make integration test works for configcenter/apollo
    omit e42f3d2  make integration test works for async
    omit b1fa2c6  make integration test works for direct
    omit b3fdafb  make IT works for generic samples
    omit f71bec1  code optimization
    omit 3722ee2  format import
    omit 1680a19  Merge pull request #3 from LaurenceLiZhixin/feat/grpc-stream-support
    omit 680f884  fix:import block
    omit 5536f32  consul service discovery sample
    omit 0da9873  update README, remove 'dubbo' sub dir from 'helloworld'
    omit 681e209  use makefile for helloworld client and server
    omit 4f72d63  enhance config and package name
    omit 7983c93  enhance makefile
    omit 39f5571  integration test for helloworld service
    omit 653c445  Merge pull request #5 from zouyx/feature/fixAutoTest
    omit 15a68f6  enable issues
    omit 28bb1f0  Merge pull request #4 from zouyx/feature/fixAutoTest
    omit c8444c5  Create .asf.yaml
    omit 7e1b8b1  feat: add grpc stream sample
    omit eba7616  Merge pull request #2 from zouyx/feature/fixAutoTest
    omit 744819c  Merge pull request #1 from zouyx/feature/fixAutoTest
     add 62367b3  Merge pull request #1 from zouyx/feature/fixAutoTest
     add 327e16c  Merge pull request #2 from zouyx/feature/fixAutoTest
     add ca6e66c  Create .asf.yaml
     add adc5872  Merge pull request #4 from zouyx/feature/fixAutoTest
     add 6250197  enable issues
     add 285dc81  Merge pull request #5 from zouyx/feature/fixAutoTest
     add 198faaf  feat: add grpc stream sample
     add 9b85b42  fix:import block
     add befeee3  Merge pull request #3 from LaurenceLiZhixin/feat/grpc-stream-support
     add 6a59417  format import
     add da89cd8  consul service discovery sample
     add a5d7cb8  code optimization
     add e2a30f0  Merge pull request #7 from zhangshen023/consul_service_discovery
     add d6bb136  fix bug
     add 4b81bff  integration test for helloworld service
     add edf050e  enhance makefile
     add 58fb84b  enhance config and package name
     add 4346c49  use makefile for helloworld client and server
     add ed46acc  update README, remove 'dubbo' sub dir from 'helloworld'
     add 2825696  make IT works for generic samples
     add f61bb7f  make integration test works for direct
     add 6952ae2  make integration test works for async
     add 807a28c  make integration test works for configcenter/apollo
     add 653871b  clean up imports
     add 2f08ee6  make integration test works for nacos
     add 0b7b136  remove useless java dirs
     add d68eaf6  make integration test work for configcenter/zookeeper
     add c453c5e  make integration test works for fiter/custom_filter
     add ed55826  make integration test works for filter/tpslimit
     add b6e8d28  clean up useless code
     add 86f06e2  make integration test works for metrics
     add 4656ad4  travis add Make
     add e5449a1  delete
     add 8a1b407  remove problems code
     add ebb3c60  start integrate test
     add eac5647  change dir
     add 3083eed  change test steps
     add 723530b  fix PID
     add 6e1323f  make integration test work for metric and zone
     add f2ce2dd  rename dir
     add aa17eaa  enhance makefile
     add 6fb39f7  make integration test work for multi-registry
     add 680525b  reformat helloworld
     add 709879b  make integration test work for registry/etcd
     add 4e611c4  make integration test works for registry/nacos
     add dafa9ce  refresh dubbo-go to snapshot, make servicediscovery/etcd works.
     add fe2dbd2  add a FIXME
     add 5c12aaa  correct registry/servicediscovery/etcd
     add 062fd67  make registry/servicediscovery/file work with integration test
     add af44f46  make registry/servicediscovery/nacos work with integration test
     add d9b6eb1  servicediscovery/zookeeper
     add 9ac78ce  enhance makefile to allow replace variables in conf yaml files.
     add 497fd36  enhance makefile
     add 62eaba8  make integration test work for router/condition
     add 242b0ab  make general/dubbo work with integration test
     add 92396ef  make grpc work with integration test
     add c603517  add travis
     add 9d3257a  fix package problem
     add 603bca5  rename package
     add 596bf96  fix problems
     add 477cdb4  add github action
     add 60032e0  add github action
     add 9fe11cc  add github action
     add c06ff0b  Merge branch 'feature/addTravis'
     add e179a3b  Create blank.yml
     add 54b33d6  Update blank.yml
     add 05f5174  Merge remote-tracking branch 'origin/master'
     add b352f67  fix problems
     add 6d7960d  Merge pull request #8 from zouyx/feature/fixAutoTest
     add b7fab58  Add: tag router examples
     add c70347b  Fix: lost a pkg in general
     add 49f7ade  Fix: fmt codes
     add f4c360c  Fix: fmt codes
     add 0fa373a  Merge pull request #9 from apache/tag_router
     add 8bd4d9a  Merge pull request #10 from zouyx/feature/fixAutoTest
     add ade3126  Merge branch 'master-apache-dubbo-go-samples'
     add 3682b10  Merge pull request #12 from zouyx/master
     add 83ce5a6  Merge branch 'master-apache-dubbo-go-samples'
     add 18dd683  add general test
     add 46032d4  add general test
     add 9ee0bfb  fix problems
     add 61eb4c4  fix problems
     add b420a9f  update test case
     add d512a10  update test case
     add 6d3fe90  add more test case
     add 72d11e2  add more test case
     add 4fc6fc5  add more test case
     add c4ae316  add more test case
     add 16d67f1  add more test case
     add a2d0cf7  add more test case
     add c25845d  fix problems
     add 5e263ff  1.delete useless dir 2.add _ "github.com/apache/dubbo-go/metadata/service/inmemory" for all test dir 3.change log level to error
     add 37950d9  1.change log level for async dir 2.revert makefile
     add e65e2fa  delete useless files
     add 30e5459  change stop to clean step
     add e3d9744  Fix Makefile bug
     add 343a747  Test return exit code when panic
     add 036ca8e  add exit code for test
     add ff553f9  add exit code for test
     add 1fa6bf5  fix test problem
     add 12ad93f  change test method
     add e24a813  remove test
     add acc07e3  fix test problem
     add 91a25c0  change log level
     add 9d406ae  Merge pull request #13 from zouyx/master
     add 4bed1c6  add more test case
     add 1c64d17  change log level
     add 48733d8  add configcenter/zookeeper case
     add 897d981  fix test problem
     add ef67824  fix test problem
     add 824afd8  fix test problem
     add 79d0a1d  fix test problem
     add ccb9654  remove configcenter/zookeeper case
     add 36dc561  remove router/tag case and fix zookeeper service discovery case
     add 2a2f12d  remove multi-registry case
     add 89edc98  Merge pull request #15 from zouyx/master
     add d65d87b  fix integration
     add aebeabb  fix integration
     add 6e6b603  Merge pull request #19 from mark4z/master
     add e7993aa  add sentinel-filter sample
     add 5a80174  add integration test
     add f417877  add script on integrate
     add 54c84a1  fix bug
     add ecc57cb  Merge pull request #16 from pantianying/sentinel-filter
     add 4b50b47  test
     add 2a4b05a  add java for general
     add f6f3286  update pkg
     add 4daefd8  update version num
     add d49f133  fix test problem
     add a1acc23  Update dubbo-go version
     add eb28097  Update dubbo-go version
     add 89907b1  add sd/zookeeper case
     add 2e25d47  update pkg
     add d02874c  update version num
     add 01f19a5  fix test problem
     add abcb43d  Update dubbo-go version
     add e4533a2  Update dubbo-go version
     add 30886bf  add sd/zookeeper case
     add 475054a  Merge remote-tracking branch 'apache-dubbo-go-samples/1.5.5' into 1.5.5
     add 6462b49  fix sd/zookeeper case
     add 8eaedb5  fix router case
     add 2bf0361  fix: go mod tidy error
     add 6ff698e  seata sample run
     add 5e8cc73  remove seata mod
     add ab051f5  change client name equals provider
     add d18040a  add integrate
     add 7c23577  add provid_by
     add d76e545  Merge pull request #20 from cityiron/seata-sample
     add e956b7d  fix: change grpc and sentinel version
     add c76bb8d  fix: delete unused gosum
     add 8268f52  fix: dubbo-go repository path
     add 201992b  fix: re cicd
     add 8c9c239  fix: use protobuf 1.3.2 to generate proper pb.go
     add 5dbaa66  fix: change pb.go
     add cc40470  Merge pull request #21 from LaurenceLiZhixin/1.5.5
     add bc81e94  modify consul demo to support makefile (#22)
     add 7464a65  merge
     add a19f63d  remove sd/consul
     add 279e46b  Merge branch '1.5.5' into fix-sd-file
     add 4884e9c  Merge pull request #23 from cityiron/fix-sd-file
     add 845616f  feat: add registry/servicediscovery/etcd client.yaml add provide_by
     add 2a1c857  Merge branch '1.5.5' into 1.5.5-georgehao
     add b436635  Merge pull request #25 from georgehao/1.5.5
     add 98a15f7  fix router problem
     add 099b960  resolve conflict
     add 1107469  Merge pull request #27 from apache/fix_mod
     add 5ce1f6c  resolve conflicts
     add 3d13bd4  update version
     add 033d650  update version
     add 7f38c96  update version for release
     add 7074301  resolve conflicts
     add 28719de  refact generic/java
     add 50760ee  Merge pull request #24 from fangyincheng/fix-2.7
     add ac30af9  Merge pull request #17 from apache/1.5.5
     add 086e2da  upgrade sentinel go to 1.0.1
     add aadb7e4  Merge pull request #31 from louyuting/20201227-update-sentinel-go
     add dd6c19a  fix: fix dubbo grpc stream bug
     add 2b35ff3  Merge pull request #32 from LaurenceLiZhixin/fix/grpcStreamBug
     add ec4fd0b  merge master
     add b6b347a  merge master
     add 2702e17  Merge branch '1.5.5'
     add 1035c4c  add CI badge
     add f7e0f1a  bump up sentinel-go version to v1.0.2
     add 1f1383d  adjust sentinel version
     add 9b0e1d4  comment sentinel tempararily
     add 3ad64bc  add attachment sample
     add cb715b0  add zh_CN README
     add c25fdc1  Merge pull request #37 from beiwei30/attachment
     add 1c10231  add:.run file
     add ff81b51  Merge pull request #38 from zhaoyunxing92/master
     add 68fbd91  enhance docs
     add ca1fc7d  Merge pull request #39 from beiwei30/docs
     add a2b55f3  provide HOWTO, and translate all docs into Chinese.
     add 0d6018d  Merge pull request #40 from beiwei30/translate
     add 0b02894  provide run configuration for attachment sample
     add ee77fea  Merge pull request #41 from beiwei30/attachment-run-config
     add 1830d30  update dubbogo to 1.5 latest commit
     add 8f4f72b  Merge pull request #47 from cityiron/1.5.6-test
     add 999598f  ftr: context sample
     add 40ce18a  fix: add zh readme
     add 479842f  Merge pull request #46 from LaurenceLiZhixin/ftr/context
     add f4a3715  fix: consul readme
     add 3dd5ad5  fix: add consul readme
     add 3f83dde  Merge pull request #45 from LaurenceLiZhixin/fix/consul-readme
     add fb1b45a  ftr:config api
     add ec253ca  fix: add zh readme
     add 55939ee  Merge pull request #44 from LaurenceLiZhixin/ftr/config-api
     add 761bd1e  ftr: add docker
     add 9328bc0  fix: add cn readme
     add 2e150f5  Merge pull request #43 from LaurenceLiZhixin/ftr/docker
     add 8e3c649  upgrade seata-golang version
     add 0aa1018  Merge pull request #48 from dk-lockdown/master
     add 2f36b6c  Update README_zh.md
     add 3cf6831  Merge pull request #49 from lauyang/patch-2
     add b9df170  fix: add provide_by
     add 9b21628  Merge pull request #51 from LaurenceLiZhixin/fix/etcd
     add f962482  add "chain" example
     add ae6f22a  add apache license header
     add 27238a8  optimize imports
     add a4c5ac2  group var declaration
     add 19c6ece  Merge pull request #54 from beiwei30/chain
     add 8ef9122  add:metric文档
     add dac4b01  Merge pull request #53 from zhaoyunxing92/master
     add db3d56f  feat: add run configs, and regroup import
     add 362078c  optmize imports
     add 7bfb13c  Merge pull request #58 from beiwei30/context
     add c0c8b1c  add run configurations and fix client issue.
     add e8a63fc  add README
     add 2244de1  add:metric文档
     add d6b7714  fix: regroup import
     add c5ced7e  optimize imports
     add 2cccc5f  Merge pull request #55 from beiwei30/async
     add 4af0861  Merge pull request #2 from apache/master
     add e095b64  Merge pull request #3 from apache/master
     add 3686193  Merge pull request #4 from apache/master
     add 9415d1d  Doc: adding direct README
     add 360cb8c  Doc: adding direct README_zh and cleaning
     add a01f1fb  Doc: improving docs of README
     add 1bfa500  Doc: formatting docs of README
     add 0503b4d  Doc: formatting docs of README and cleaning
     add 423bc4e  Doc: formatting docs of README_zh
     add fe1f172  Mod: clear out the unneeded config
     add 394d750  Doc: improving README and README_zh
     add d733e75  Add: .run for direct
     add 4a404ce  Add: fix the .run for direct
     add b8b8ad1  Merge pull request #59 from PhilYue/feature/direct/readme
     add 3468f70  add:metric readme
     add a2bd763  修复语法错误
     add 4a8de47  up:调整import顺序
     add 8addde5  Merge pull request #61 from zhaoyunxing92/master
     add 7cd9182  fix: add run configs, bump up dubbo-go version, revise README
     add faaf7b8  fix: regroup imports
     add 7402ac2  Merge pull request #57 from beiwei30/config-api
     add f3de1c8  fix: regroup imports
     add 14a8acb  Merge pull request #63 from beiwei30/direct
     add 93f99d5  fix: regroup import
     add 7299549  fix: add run configs for docker
     add 50f0fb9  Merge pull request #64 from beiwei30/docker
     add 3685f2d  fix: group import, add run files
     add 215f989  fix: README for filter samples
     add 2319ef1  fix: make integration test work for custom filter, correct dir
     add 0c42094  enable IT for configcenter/zookeeper and filter/sentinel
     add d1503cb  Merge pull request #66 from beiwei30/filter
     add a851232  configcenter readme, import and run files
     add 7a7c27b  fix: revise README
     add 137145d  fix: regroup imports
     add 8e0f74a  fix: regroup import for nacos configcenter
     add e281731  Merge pull request #62 from beiwei30/configcenter
     add f5d3e75  add readme for generic and helloworld
     add 1fdf6ef  add readme for group
     add be3e097  add readme and run configuration for rest sample
     add 78fc2b7  add run configuration for samples
     add d426a71  add readme_zh for samples
     add 84d1727  group the imports
     add 6f91bf3  adjust imports and readme
     add 3723770  fix helloworld java sample
     add da9260c  fix error imports
     add f17c5dc  fix helloworld sample
     add 6f73a0d  Merge pull request #52 from yakecanlee/feature/add-sample
     add 4e8bc84  adjust import sequence in nacos
     add 9ea75d6  fix: issue#71
     add 9665c73  Merge pull request #72 from beiwei30/hello-world
     add 6821dca  Upgrade the Seata version to adapt the Getty WritePkg method to increase the return value
     add eec3ea3  Upgrade the Seata version to adapt the Getty WritePkg method to increase the return value
     add a61d1cc  Merge pull request #73 from xiaoliu10/upgrade_seata_version
     add 2ce35f2  add:multi registry
     add adf3d22  up:更新导报问题
     add f0e3617  up:语法问题
     add ed5605e  Merge pull request #75 from zhaoyunxing92/multi-registry
     add 68855a6  修改:修复registry/nacos示例无法正常使用的问题,调整client.yml和server.yml方便阅读
     add 5dca1e3  Merge pull request #70 from milerL/nacos
     add 84568ca  add:generic samples
     add 06dd051  up:mv it to the 3rd import block
     add f86ffa7  up:mv it to the 3rd import block
     add ef0d643  Merge pull request #77 from zhaoyunxing92/generic
     add 698f8e4  1. fix zk configcenter can not found zk node
     add 03877ff  Merge pull request #78 from xiaoliu10/fix_zk_configcenter
     add 5b923d2  add tls sample
     add f9d1b04  add apache license & mod folder
     add 5da14b9  mod problems in pr
     add bb434be  mod refmt go-client/pkg/user
     add 5df9ea3  del blank line go-server/pkg/user.go
     add 4da3ca4  mod Id to ID
     add c082df6  Merge pull request #68 from cjphaha/tls
     add ad99803  add:game samples
     add 02974be  Merge pull request #79 from zfkun/game
     add 0b1c591  Id -> ID
     add c5a9d63  Merge pull request #80 from apache/fix/Id
     add 0a1091c  fix directory problem.
     add f8ac602  multi-zone example
     add 249bfe2  disable generic integration test
     add d6e9ebf  Merge pull request #85 from beiwei30/multi-zone
     add 4959f53  ftr: group run config files into sub-directories
     add cbdc1bc  Merge pull request #87 from beiwei30/group-run-configs
     add 246bb3d  enhance router examples
     add 95ac445  fix grammar.
     add 446ef6a  disable condition router example's CI
     add 50ef8f5  Merge pull request #88 from beiwei30/router-examples
     add debbddd  Ftr:  add the module of shopping-order (#82)
     add 388020a  Router example enhance (#89)
     add f3938f5  enhance tls examples (#91)
     add 72cf27b  remove shop examples, since it's dup with chain and shopping-order (#90)
     add ff9a60a  clean up integration test (#92)
     add e17966a  up:mod优化 (#94)
     add e5d8522  invoke grpc service
     new b16311f  upgrade dubbo-go & dubbo-go-hessian2 version
     add 77a8add  fix(readme_zh.md): fix spelling mistake
     add 92edb26  Merge pull request #98 from Mulavar/fix-spelling-mistake
     add b3966dd  add readme of game (#97)
     add 80bae47  Merge pull request #5 from apache/master
     add 8256684  Merge pull request #6 from apache/master
     add 59cffbc  Merge pull request #7 from apache/master
     add 5fe1952  Merge pull request #8 from apache/master
     add 61b33e8  Merge pull request #9 from apache/master
     add fe86d2e  Merge pull request #11 from apache/master
     add 7e05bc4  Merge pull request #12 from apache/master
     add e74efd3  Merge pull request #13 from apache/master
     add f42dcbd  Merge pull request #14 from apache/master
     add 788d9af  add: dubbo-go version sample
     add 9c4c5bb  update: 1. clean code 2. add readme of multiple version sample
     add d25c96d  update: tests version provider
     add 7f000ce  update: readme
     add 1e5d014  Merge pull request #99 from PhilYue/feature/version
     add d48adc8  Fix  multi registry (#1) (#100)
     add c89e24a  fix: fix seata sample, make it work properly (#108)
     new d3073eb  add: game api (#111)
     new e5ff594  Merge branch 'master' of https://github.com/apache/dubbo-go-samples
     new 90edfdd  Ftr: add rest test case (#103)
     new c178568  Feature/openzipkin (#119)
     new 2bbf31f  update: add `openzipkin`,`version` intro to dubbo-go readme, fix quote of openzipkin readme (#120)
     new f19f6f6  fix: add grpc provider reference in codes generated by protoc-gen-dubbo (#127)
     new 6743ffe  added Chinese readme for tracing/grpc (#133)
     new 82a3725  mod imports (#169)
     new b093904  Merge branch 'master' of https://github.com/apache/dubbo-go-samples
     new 397f160  Pls. --> Pls
     new dcc91f4  add test ppt file

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (1ca99fb)
            \
             N -- N -- N   refs/heads/compress (dcc91f4)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 12 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .images/test.pptx | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 .images/test.pptx

[dubbo-go-samples] 11/12: Pls. --> Pls

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit 397f1606180db4d90a3e272afd839edf1331b0db
Author: AlexStocks <al...@foxmail.com>
AuthorDate: Sat Jul 24 22:09:28 2021 +0800

    Pls. --> Pls
---
 README.md | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 9da44f2..11ad476 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
 ## What It Contains
 
 * async: An async example.
-* attachment: An attachment example, to show how to use attachment to pass user data from the client to the server.  
+* attachment: An attachment example, to show how to use attachment to pass user data from the client to the server.
 * chain: Show an example of calling chain
 * config-api: Use API to config Dubbo-go
 * configcenter: Uses of different config centers, including zookeeper, apollo and nacos at present.
@@ -33,11 +33,11 @@
 
 ## How To Run
 
-Pls. refer [How To Run](HOWTO.md) for the instructions.
+Pls refer [How To Run](HOWTO.md) for the instructions.
 
 ## How to contribute
 
 If you want to add more samples, pls. read on:
-1. Create new sub directory and give it an appropriate name for your new sample. Pls. follow the layout of the existing sample if you are not sure how to organize your code.
-2. Make sure your sample work as expected before submit PR, and make sure GitHub CI passes after PR is submitted. Pls. refer to the existing sample on how to test the sample.   
-3. Pls. provide README.md to explain your samples.
+1. Create new sub directory and give it an appropriate name for your new sample. Pls follow the layout of the existing sample if you are not sure how to organize your code.
+2. Make sure your sample work as expected before submit PR, and make sure GitHub CI passes after PR is submitted. Pls refer to the existing sample on how to test the sample.
+3. Pls provide README.md to explain your samples.

[dubbo-go-samples] 08/12: added Chinese readme for tracing/grpc (#133)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit 6743ffe1c3052dad774ed9b7d464bd82b5e8d747
Author: Chenming Shi <cl...@gmail.com>
AuthorDate: Mon Jun 14 18:11:48 2021 +0800

    added Chinese readme for tracing/grpc (#133)
    
    Co-authored-by: Chenming Shi <cs...@ChenmingdeMacBook-Pro.local>
---
 tracing/grpc/README_zh.md | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/tracing/grpc/README_zh.md b/tracing/grpc/README_zh.md
new file mode 100644
index 0000000..f3b426d
--- /dev/null
+++ b/tracing/grpc/README_zh.md
@@ -0,0 +1,43 @@
+### 1. 利用docker运行jaeger
+
+[jaeger-getting-started](https://www.jaegertracing.io/docs/1.17/getting-started/)
+
+使用 [all-in-one](https://hub.docker.com/r/jaegertracing/all-in-one) 镜像
+
+### 2. 启动zookeeper
+
+### 3. 启动服务端
+
+设置Jaeger环境变量
+```
+CONF_PROVIDER_FILE_PATH=xxxxxxxxxxxxx
+JAEGER_AGENT_PORT=32769
+JAEGER_AGENT_HOST=localhost
+JAEGER_SERVICE_NAME=GrpcServer
+JAEGER_SAMPLER_PARAM=1
+```
+
+具体细节详见:[jaeger-environment-variables](https://github.com/jaegertracing/jaeger-client-go#environment-variables)
+
+另:
+- JAEGER_SAMPLER_PARAM必须要设置成```1```,意味着100%的请求会被用于取样,如果是```0.9```就是90%会被取样
+- JAEGER_AGENT_PORT=32769,32769是docker发布的端口,这个端口会被映射到6831,golang客户端需要使用6831来发送追踪数据。
+
+然后运行服务端。
+
+### 4. 运行客户端
+
+设置Jaeger环境变量
+```
+CONF_PROVIDER_FILE_PATH=xxxxxxxxxxxxx
+JAEGER_AGENT_PORT=32769
+JAEGER_AGENT_HOST=localhost
+JAEGER_SERVICE_NAME=GrpcServer
+JAEGER_SAMPLER_PARAM=1
+```
+
+然后启动客户端,见[README](https://github.com/dubbogo/dubbo-samples/blob/master/golang/README.md)。
+
+### 5. 在JAEGER-UI中查看追踪数据
+
+打开[http://localhost:32768/search](http://localhost:32768/search)
\ No newline at end of file

[dubbo-go-samples] 09/12: mod imports (#169)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit 82a372532cd7388d160a39238965c4f4340c5113
Author: 氕氘氚 <cj...@163.com>
AuthorDate: Tue Jul 13 13:20:57 2021 +0800

    mod imports (#169)
---
 async/go-client/cmd/client.go                      |  1 +
 async/go-client/pkg/user.go                        |  1 +
 async/go-server/pkg/user.go                        |  1 +
 async/go-server/tests/integration/main_test.go     |  1 +
 .../tests/integration/userprovider_test.go         |  2 +
 attachment/go-client/cmd/client.go                 | 11 ++--
 attachment/go-server/cmd/server.go                 |  8 +--
 attachment/go-server/pkg/user.go                   |  6 +--
 .../go-server/tests/integration/main_test.go       | 13 ++---
 .../tests/integration/userprovider_test.go         |  2 +
 chain/backend/cmd/server.go                        |  8 +--
 chain/backend/tests/integration/main_test.go       | 12 ++---
 chain/backend/tests/integration/services_test.go   |  1 +
 chain/frontend/cmd/client.go                       |  8 +--
 chain/middle/cmd/server.go                         |  8 +--
 chain/middle/tests/integration/main_test.go        | 12 ++---
 chain/middle/tests/integration/services_test.go    |  4 +-
 config-api/go-client/cmd/client.go                 |  1 +
 config-api/go-server/pkg/user.go                   |  1 +
 .../go-server/tests/integration/main_test.go       |  2 -
 .../tests/integration/userprovider_test.go         |  1 +
 configcenter/apollo/go-client/cmd/client.go        |  1 +
 configcenter/apollo/go-server/cmd/server.go        |  2 -
 configcenter/apollo/go-server/pkg/user.go          |  1 +
 configcenter/nacos/go-client/cmd/client.go         |  1 +
 configcenter/nacos/go-server/pkg/user.go           |  1 +
 configcenter/zookeeper/go-client/cmd/client.go     |  1 +
 configcenter/zookeeper/go-server/pkg/user.go       |  1 +
 context/go-client/cmd/client.go                    |  1 +
 context/go-server/pkg/user.go                      |  1 +
 .../tests/integration/userprovider_test.go         |  2 +
 direct/go-client/cmd/client.go                     |  1 +
 direct/go-server/pkg/user.go                       |  1 +
 .../tests/integration/userprovider_test.go         |  3 +-
 docker/go-client/cmd/client.go                     |  1 +
 docker/go-server/pkg/user.go                       |  1 +
 filter/custom/go-client/cmd/client.go              |  1 +
 filter/custom/go-server/pkg/custom_filter.go       |  1 +
 filter/custom/go-server/pkg/user.go                |  1 +
 .../tests/integration/userprovider_test.go         |  1 +
 filter/sentinel/go-client/cmd/client.go            |  2 +
 filter/sentinel/go-server/cmd/server.go            |  1 +
 filter/sentinel/go-server/pkg/user.go              |  1 +
 .../tests/integration/userprovider_test.go         |  1 +
 filter/tpslimit/go-server/pkg/limit_strategy.go    |  1 +
 filter/tpslimit/go-server/pkg/user.go              |  1 +
 game/go-server-game/cmd/server.go                  | 42 ++++++++--------
 game/go-server-game/pkg/consumer.go                |  6 ++-
 game/go-server-game/pkg/provider.go                | 16 +++---
 .../tests/integration/gameprovider_test.go         | 10 ++--
 game/go-server-game/tests/integration/main_test.go | 40 +++++++--------
 game/go-server-gate/cmd/server.go                  | 58 +++++++++++-----------
 game/go-server-gate/pkg/consumer.go                |  9 ++--
 game/go-server-gate/pkg/provider.go                | 11 ++--
 .../tests/integration/gateprovider_test.go         | 10 ++--
 game/go-server-gate/tests/integration/main_test.go | 40 +++++++--------
 game/pkg/consumer/game/basketball.go               |  7 ++-
 game/pkg/consumer/gate/basketball.go               |  7 ++-
 game/pkg/pojo/info.go                              |  2 +-
 general/dubbo/go-client/cmd/client.go              | 13 ++---
 general/dubbo/go-server/cmd/server.go              | 18 +++----
 general/dubbo/go-server/pkg/user_provider.go       |  9 ++--
 .../dubbo/go-server/tests/integration/main_test.go | 21 ++++----
 .../tests/integration/userprovider_test.go         |  9 +++-
 general/grpc/go-client/cmd/client.go               |  1 +
 general/grpc/go-server/cmd/server.go               |  2 +-
 general/grpc/go-server/pkg/greeter.go              |  3 ++
 .../go-server/tests/integration/greeter_test.go    |  2 +-
 .../grpc/go-server/tests/integration/main_test.go  | 11 ++--
 general/grpc/protobuf/helloworld.pb.go             | 11 ++--
 general/grpc/stream/go-client/app/client.go        |  1 +
 general/grpc/stream/go-client/app/helloworld.pb.go | 11 ++--
 general/grpc/stream/go-server/app/helloworld.pb.go | 12 +++--
 general/grpc/unary/go-client/app/client.go         |  1 +
 general/grpc/unary/go-client/app/helloworld.pb.go  | 11 ++--
 general/grpc/unary/go-server/app/greeter.go        |  1 -
 general/grpc/unary/go-server/app/helloworld.pb.go  | 11 ++--
 general/jsonrpc/go-client/app/client.go            | 14 ++----
 general/jsonrpc/go-server/app/server.go            |  8 ++-
 general/jsonrpc/go-server/app/user_provider.go     |  5 +-
 general/jsonrpc/go-server/app/user_provider1.go    |  5 +-
 general/jsonrpc/go-server/app/user_provider2.go    |  5 +-
 general/rest/go-client/cmd/client.go               | 12 ++---
 general/rest/go-server/cmd/server.go               | 12 ++---
 general/rest/go-server/pkg/user_provider.go        |  7 ++-
 general/rest/go-server/pkg/user_provider1.go       |  7 ++-
 general/rest/go-server/pkg/user_provider2.go       |  7 ++-
 .../tests/integration/userprovider_test.go         |  4 +-
 generic/go-client/cmd/client.go                    | 11 ++--
 generic/go-server/cmd/server.go                    |  3 +-
 generic/go-server/pkg/user.go                      |  6 +--
 generic/go-server/tests/integration/main_test.go   | 12 ++---
 .../tests/integration/userprovider_test.go         |  4 +-
 group/go-client/cmd/client.go                      | 11 ++--
 group/go-server-group-a/pkg/user.go                |  1 +
 .../tests/integration/main_test.go                 |  3 +-
 .../tests/integration/userprovider_test.go         |  1 +
 group/go-server-group-b/pkg/user.go                |  1 +
 .../tests/integration/main_test.go                 |  3 +-
 helloworld/go-client/cmd/client.go                 |  1 +
 metric/go-client/cmd/client.go                     |  1 +
 metric/go-server/cmd/server.go                     |  4 +-
 metric/go-server/pkg/user.go                       |  9 ++--
 metric/go-server/tests/integration/main_test.go    | 17 +++----
 .../tests/integration/userprovider_test.go         |  1 +
 multi-registry/go-client/cmd/client.go             |  2 +-
 multi-registry/go-server/cmd/server.go             |  1 -
 multi-registry/go-server/pkg/user.go               |  6 +--
 .../go-server/tests/integration/main_test.go       | 14 +++---
 .../tests/integration/userprovider_test.go         |  1 +
 multi-zone/go-client/cmd/client.go                 |  2 +-
 .../go-client/tests/integration/main_test.go       | 14 +++---
 .../tests/integration/userprovider_test.go         |  9 +++-
 multi-zone/go-server-hz/pkg/user.go                |  1 +
 .../tests/integration/userprovider_test.go         |  1 +
 multi-zone/go-server-sh/pkg/user.go                |  1 +
 .../go-server-sh/tests/integration/main_test.go    |  2 -
 .../tests/integration/userprovider_test.go         |  1 +
 openzipkin/go-client/cmd/client.go                 | 11 ++--
 openzipkin/go-server-a/cmd/server.go               |  4 +-
 openzipkin/go-server-a/pkg/user.go                 |  1 +
 .../go-server-a/tests/integration/main_test.go     |  3 +-
 .../tests/integration/userprovider_test.go         |  1 +
 openzipkin/go-server-b/cmd/server.go               |  5 +-
 openzipkin/go-server-b/pkg/user.go                 |  1 +
 .../go-server-b/tests/integration/main_test.go     |  3 +-
 registry/etcd/go-client/cmd/client.go              | 11 ++--
 registry/etcd/go-server/cmd/server.go              |  6 ++-
 registry/etcd/go-server/pkg/user.go                |  6 +--
 .../etcd/go-server/tests/integration/main_test.go  | 17 +++----
 .../tests/integration/userprovider_test.go         |  1 +
 registry/nacos/go-client/cmd/client.go             | 11 ++--
 registry/nacos/go-server/pkg/user.go               |  6 +--
 .../nacos/go-server/tests/integration/main_test.go | 17 +++----
 .../tests/integration/userprovider_test.go         |  1 +
 .../consul/go-client/cmd/client.go                 | 20 ++++----
 .../consul/go-server/cmd/server.go                 | 25 ++++------
 .../consul/go-server/pkg/pojo/user.go              |  2 -
 .../go-server/tests/integration/main_test.go       |  1 -
 .../tests/integration/userprovider_test.go         |  1 +
 .../servicediscovery/etcd/go-client/cmd/client.go  | 12 ++---
 .../servicediscovery/etcd/go-server/cmd/server.go  |  6 ++-
 .../servicediscovery/etcd/go-server/pkg/user.go    |  6 +--
 .../etcd/go-server/tests/integration/main_test.go  | 15 +++---
 .../tests/integration/userprovider_test.go         |  1 +
 .../servicediscovery/file/go-client/cmd/client.go  | 12 ++---
 .../servicediscovery/file/go-server/cmd/server.go  |  6 ++-
 .../servicediscovery/file/go-server/pkg/user.go    |  6 +--
 .../file/go-server/tests/integration/main_test.go  | 15 +++---
 .../tests/integration/userprovider_test.go         |  1 +
 .../servicediscovery/nacos/go-client/cmd/client.go | 12 ++---
 .../servicediscovery/nacos/go-server/cmd/server.go |  6 ++-
 .../servicediscovery/nacos/go-server/pkg/user.go   |  6 +--
 .../nacos/go-server/tests/integration/main_test.go | 15 +++---
 .../tests/integration/userprovider_test.go         |  1 +
 .../zookeeper/go-client/cmd/client.go              | 12 ++---
 .../zookeeper/go-server/cmd/server.go              |  6 ++-
 .../zookeeper/go-server/pkg/user.go                |  6 +--
 .../go-server/tests/integration/main_test.go       | 17 +++----
 .../tests/integration/userprovider_test.go         |  1 +
 router/condition/go-client/cmd/client.go           |  3 +-
 .../go-server/tests/integration/main_test.go       | 15 +++---
 .../tests/integration/userprovider_test.go         |  1 +
 router/tag/go-client/cmd/client.go                 |  1 +
 .../tag/go-server/tests/integration/main_test.go   | 14 +++---
 .../tests/integration/userprovider_test.go         |  1 +
 seata/client/app/client.go                         | 17 +++----
 seata/client/app/svc/svc.go                        |  1 +
 seata/order-svc/app/dao/dao.go                     |  5 +-
 seata/order-svc/app/order_svc.go                   |  1 +
 seata/order-svc/app/server.go                      | 19 ++++---
 seata/product-svc/app/dao/dao.go                   |  1 +
 seata/product-svc/app/product_svc.go               |  1 +
 seata/product-svc/app/server.go                    | 19 ++++---
 shopping-order/go-client/cmd/client.go             |  1 +
 shopping-order/go-client/pkg/svc.go                |  1 +
 shopping-order/go-server-order/cmd/order_svc.go    |  1 +
 shopping-order/go-server-order/cmd/server.go       |  2 +
 shopping-order/go-server-order/pkg/dao/dao.go      |  1 +
 .../go-server-product/cmd/product_svc.go           |  1 +
 shopping-order/go-server-product/cmd/server.go     |  2 +
 tls/go-client/cmd/client.go                        |  4 +-
 tls/go-server/cmd/server.go                        |  4 +-
 tls/go-server/pkg/user.go                          |  2 +-
 tls/go-server/tests/integration/main_test.go       |  1 +
 tracing/dubbo/go-client/app/client.go              | 23 ++++-----
 tracing/dubbo/go-server/app/server.go              | 22 ++++----
 tracing/dubbo/go-server/app/user.go                |  9 ++--
 tracing/grpc/go-client/app/client.go               | 12 ++---
 tracing/grpc/go-client/app/hello.go                |  6 +--
 tracing/grpc/go-client/app/helloworld.pb.go        | 13 ++---
 tracing/grpc/go-server/app/helloworld.pb.go        | 12 ++---
 tracing/grpc/go-server/app/server.go               |  1 +
 tracing/jsonrpc/go-client/app/client.go            | 23 ++++-----
 tracing/jsonrpc/go-server/app/server.go            | 20 ++++----
 tracing/jsonrpc/go-server/app/user_provider.go     |  6 +--
 tracing/jsonrpc/go-server/app/user_provider1.go    |  5 +-
 tracing/jsonrpc/go-server/app/user_provider2.go    |  7 ++-
 version/go-client/cmd/client.go                    |  1 +
 version/go-server-v1/pkg/user.go                   |  1 +
 .../tests/integration/userprovider_test.go         |  1 -
 version/go-server-v2/pkg/user.go                   |  1 +
 .../tests/integration/userprovider_test.go         |  1 -
 203 files changed, 721 insertions(+), 648 deletions(-)

diff --git a/async/go-client/cmd/client.go b/async/go-client/cmd/client.go
index 62a80b2..1796bf9 100644
--- a/async/go-client/cmd/client.go
+++ b/async/go-client/cmd/client.go
@@ -33,6 +33,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/async/go-client/pkg/user.go b/async/go-client/pkg/user.go
index 92239d6..a579dd2 100644
--- a/async/go-client/pkg/user.go
+++ b/async/go-client/pkg/user.go
@@ -26,6 +26,7 @@ import (
 	"github.com/apache/dubbo-go/common"
 	"github.com/apache/dubbo-go/protocol"
 	"github.com/apache/dubbo-go/remoting"
+
 	gxlog "github.com/dubbogo/gost/log"
 )
 
diff --git a/async/go-server/pkg/user.go b/async/go-server/pkg/user.go
index 7a3231a..b778495 100644
--- a/async/go-server/pkg/user.go
+++ b/async/go-server/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/async/go-server/tests/integration/main_test.go b/async/go-server/tests/integration/main_test.go
index cb20b83..7a6f920 100644
--- a/async/go-server/tests/integration/main_test.go
+++ b/async/go-server/tests/integration/main_test.go
@@ -33,6 +33,7 @@ import (
 	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
 	"github.com/apache/dubbo-go/protocol"
 	"github.com/apache/dubbo-go/remoting"
+
 	gxlog "github.com/dubbogo/gost/log"
 )
 
diff --git a/async/go-server/tests/integration/userprovider_test.go b/async/go-server/tests/integration/userprovider_test.go
index 947d2cb..d84857a 100644
--- a/async/go-server/tests/integration/userprovider_test.go
+++ b/async/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
@@ -31,6 +32,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/attachment/go-client/cmd/client.go b/attachment/go-client/cmd/client.go
index 0654e5a..04ce85d 100644
--- a/attachment/go-client/cmd/client.go
+++ b/attachment/go-client/cmd/client.go
@@ -25,11 +25,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/attachment/go-client/pkg"
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/constant"
@@ -39,6 +34,12 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
+	"github.com/dubbogo/gost/log"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/attachment/go-client/pkg"
 )
 
 var userProvider = new(pkg.UserProvider)
diff --git a/attachment/go-server/cmd/server.go b/attachment/go-server/cmd/server.go
index fa04640..378f189 100644
--- a/attachment/go-server/cmd/server.go
+++ b/attachment/go-server/cmd/server.go
@@ -27,10 +27,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/attachment/go-server/pkg"
-)
-
-import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -42,6 +38,10 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/attachment/go-server/pkg"
+)
+
 var (
 	survivalTimeout = int(3e9)
 )
diff --git a/attachment/go-server/pkg/user.go b/attachment/go-server/pkg/user.go
index 3ef5aa7..de1f24b 100644
--- a/attachment/go-server/pkg/user.go
+++ b/attachment/go-server/pkg/user.go
@@ -24,12 +24,10 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	"github.com/apache/dubbo-go/common/constant"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
 )
 
 func init() {
diff --git a/attachment/go-server/tests/integration/main_test.go b/attachment/go-server/tests/integration/main_test.go
index 10bc5ca..b4a5139 100644
--- a/attachment/go-server/tests/integration/main_test.go
+++ b/attachment/go-server/tests/integration/main_test.go
@@ -20,10 +20,14 @@
 package integration
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
+	"context"
+	"os"
+	"testing"
+	"time"
 )
 
 import (
+	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -35,13 +39,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import (
-	"context"
-	"os"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/attachment/go-server/tests/integration/userprovider_test.go b/attachment/go-server/tests/integration/userprovider_test.go
index 5cc9943..a6fc679 100644
--- a/attachment/go-server/tests/integration/userprovider_test.go
+++ b/attachment/go-server/tests/integration/userprovider_test.go
@@ -24,8 +24,10 @@ import (
 	"testing"
 	"time"
 )
+
 import (
 	"github.com/apache/dubbo-go/common/constant"
+
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/chain/backend/cmd/server.go b/chain/backend/cmd/server.go
index aa9d7df..42544bc 100644
--- a/chain/backend/cmd/server.go
+++ b/chain/backend/cmd/server.go
@@ -26,10 +26,6 @@ import (
 )
 
 import (
-	_ "github.com/apache/dubbo-go-samples/chain/backend/pkg"
-)
-
-import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -42,6 +38,10 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
+import (
+	_ "github.com/apache/dubbo-go-samples/chain/backend/pkg"
+)
+
 var (
 	survivalTimeout = int(3e9)
 )
diff --git a/chain/backend/tests/integration/main_test.go b/chain/backend/tests/integration/main_test.go
index 55c2706..979ffb1 100644
--- a/chain/backend/tests/integration/main_test.go
+++ b/chain/backend/tests/integration/main_test.go
@@ -20,6 +20,12 @@
 package integration
 
 import (
+	"os"
+	"testing"
+	"time"
+)
+
+import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -31,12 +37,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import (
-	"os"
-	"testing"
-	"time"
-)
-
 var cat = new(CatService)
 var dog = new(DogService)
 var tiger = new(TigerService)
diff --git a/chain/backend/tests/integration/services_test.go b/chain/backend/tests/integration/services_test.go
index 888ba24..c3d7529 100644
--- a/chain/backend/tests/integration/services_test.go
+++ b/chain/backend/tests/integration/services_test.go
@@ -22,6 +22,7 @@ package integration
 import (
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/chain/frontend/cmd/client.go b/chain/frontend/cmd/client.go
index e13ab55..e201571 100644
--- a/chain/frontend/cmd/client.go
+++ b/chain/frontend/cmd/client.go
@@ -23,10 +23,6 @@ import (
 )
 
 import (
-	"github.com/apache/dubbo-go-samples/chain/frontend/pkg"
-)
-
-import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -38,6 +34,10 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/chain/frontend/pkg"
+)
+
 func main() {
 	var chinese = new(pkg.ChineseService)
 	var american = new(pkg.AmericanService)
diff --git a/chain/middle/cmd/server.go b/chain/middle/cmd/server.go
index 007c5a4..fe81ad2 100644
--- a/chain/middle/cmd/server.go
+++ b/chain/middle/cmd/server.go
@@ -26,10 +26,6 @@ import (
 )
 
 import (
-	_ "github.com/apache/dubbo-go-samples/chain/middle/pkg"
-)
-
-import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -42,6 +38,10 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
+import (
+	_ "github.com/apache/dubbo-go-samples/chain/middle/pkg"
+)
+
 var (
 	survivalTimeout = int(3e9)
 )
diff --git a/chain/middle/tests/integration/main_test.go b/chain/middle/tests/integration/main_test.go
index a45bb1a..f938433 100644
--- a/chain/middle/tests/integration/main_test.go
+++ b/chain/middle/tests/integration/main_test.go
@@ -20,6 +20,12 @@
 package integration
 
 import (
+	"os"
+	"testing"
+	"time"
+)
+
+import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -31,12 +37,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import (
-	"os"
-	"testing"
-	"time"
-)
-
 var (
 	chinese  = new(ChineseService)
 	american = new(AmericanService)
diff --git a/chain/middle/tests/integration/services_test.go b/chain/middle/tests/integration/services_test.go
index d1c9f97..5b39ea6 100644
--- a/chain/middle/tests/integration/services_test.go
+++ b/chain/middle/tests/integration/services_test.go
@@ -20,11 +20,11 @@
 package integration
 
 import (
-	"github.com/stretchr/testify/assert"
+	"testing"
 )
 
 import (
-	"testing"
+	"github.com/stretchr/testify/assert"
 )
 
 func TestChinese(t *testing.T) {
diff --git a/config-api/go-client/cmd/client.go b/config-api/go-client/cmd/client.go
index 1427407..833071d 100644
--- a/config-api/go-client/cmd/client.go
+++ b/config-api/go-client/cmd/client.go
@@ -33,6 +33,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/config-api/go-server/pkg/user.go b/config-api/go-server/pkg/user.go
index 7a3231a..b778495 100644
--- a/config-api/go-server/pkg/user.go
+++ b/config-api/go-server/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/config-api/go-server/tests/integration/main_test.go b/config-api/go-server/tests/integration/main_test.go
index f79029c..b4a5139 100644
--- a/config-api/go-server/tests/integration/main_test.go
+++ b/config-api/go-server/tests/integration/main_test.go
@@ -39,8 +39,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/config-api/go-server/tests/integration/userprovider_test.go b/config-api/go-server/tests/integration/userprovider_test.go
index dc29d9a..7183e64 100644
--- a/config-api/go-server/tests/integration/userprovider_test.go
+++ b/config-api/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/configcenter/apollo/go-client/cmd/client.go b/configcenter/apollo/go-client/cmd/client.go
index 77c760a..fa6b74f 100644
--- a/configcenter/apollo/go-client/cmd/client.go
+++ b/configcenter/apollo/go-client/cmd/client.go
@@ -34,6 +34,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/configcenter/apollo/go-server/cmd/server.go b/configcenter/apollo/go-server/cmd/server.go
index 065abfa..919cc26 100644
--- a/configcenter/apollo/go-server/cmd/server.go
+++ b/configcenter/apollo/go-server/cmd/server.go
@@ -27,7 +27,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -38,7 +37,6 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
-
 )
 
 import (
diff --git a/configcenter/apollo/go-server/pkg/user.go b/configcenter/apollo/go-server/pkg/user.go
index 7a3231a..b778495 100644
--- a/configcenter/apollo/go-server/pkg/user.go
+++ b/configcenter/apollo/go-server/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/configcenter/nacos/go-client/cmd/client.go b/configcenter/nacos/go-client/cmd/client.go
index bc2c501..ff0bf9b 100644
--- a/configcenter/nacos/go-client/cmd/client.go
+++ b/configcenter/nacos/go-client/cmd/client.go
@@ -34,6 +34,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/configcenter/nacos/go-server/pkg/user.go b/configcenter/nacos/go-server/pkg/user.go
index 7a3231a..b778495 100644
--- a/configcenter/nacos/go-server/pkg/user.go
+++ b/configcenter/nacos/go-server/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/configcenter/zookeeper/go-client/cmd/client.go b/configcenter/zookeeper/go-client/cmd/client.go
index 45b619d..1008ff0 100644
--- a/configcenter/zookeeper/go-client/cmd/client.go
+++ b/configcenter/zookeeper/go-client/cmd/client.go
@@ -34,6 +34,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/configcenter/zookeeper/go-server/pkg/user.go b/configcenter/zookeeper/go-server/pkg/user.go
index 7a3231a..b778495 100644
--- a/configcenter/zookeeper/go-server/pkg/user.go
+++ b/configcenter/zookeeper/go-server/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/context/go-client/cmd/client.go b/context/go-client/cmd/client.go
index 484c1da..9579d4f 100644
--- a/context/go-client/cmd/client.go
+++ b/context/go-client/cmd/client.go
@@ -34,6 +34,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/context/go-server/pkg/user.go b/context/go-server/pkg/user.go
index b943959..81b5225 100644
--- a/context/go-server/pkg/user.go
+++ b/context/go-server/pkg/user.go
@@ -25,6 +25,7 @@ import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/common/constant"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/context/go-server/tests/integration/userprovider_test.go b/context/go-server/tests/integration/userprovider_test.go
index 2618866..21cacc1 100644
--- a/context/go-server/tests/integration/userprovider_test.go
+++ b/context/go-server/tests/integration/userprovider_test.go
@@ -23,8 +23,10 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/apache/dubbo-go/common/constant"
+
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/direct/go-client/cmd/client.go b/direct/go-client/cmd/client.go
index 13f587d..4b943ac 100644
--- a/direct/go-client/cmd/client.go
+++ b/direct/go-client/cmd/client.go
@@ -33,6 +33,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/direct/go-server/pkg/user.go b/direct/go-server/pkg/user.go
index 7a3231a..b778495 100644
--- a/direct/go-server/pkg/user.go
+++ b/direct/go-server/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/direct/go-server/tests/integration/userprovider_test.go b/direct/go-server/tests/integration/userprovider_test.go
index 9dc1252..7183e64 100644
--- a/direct/go-server/tests/integration/userprovider_test.go
+++ b/direct/go-server/tests/integration/userprovider_test.go
@@ -23,12 +23,11 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
 
-// in order to make sure direct-invoking is enabled, check if references -> UserProvider -> url is specified
-// in conf/client.yaml
 func TestGetUser(t *testing.T) {
 	user := &User{}
 	err := userProvider.GetUser(context.TODO(), []interface{}{"A001"}, user)
diff --git a/docker/go-client/cmd/client.go b/docker/go-client/cmd/client.go
index 6ca8d95..6bcac75 100644
--- a/docker/go-client/cmd/client.go
+++ b/docker/go-client/cmd/client.go
@@ -33,6 +33,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/docker/go-server/pkg/user.go b/docker/go-server/pkg/user.go
index 7a3231a..b778495 100644
--- a/docker/go-server/pkg/user.go
+++ b/docker/go-server/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/filter/custom/go-client/cmd/client.go b/filter/custom/go-client/cmd/client.go
index b14fd53..15c301c 100644
--- a/filter/custom/go-client/cmd/client.go
+++ b/filter/custom/go-client/cmd/client.go
@@ -33,6 +33,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/filter/custom/go-server/pkg/custom_filter.go b/filter/custom/go-server/pkg/custom_filter.go
index 651fde5..8de581b 100644
--- a/filter/custom/go-server/pkg/custom_filter.go
+++ b/filter/custom/go-server/pkg/custom_filter.go
@@ -27,6 +27,7 @@ import (
 	"github.com/apache/dubbo-go/common/extension"
 	"github.com/apache/dubbo-go/filter"
 	"github.com/apache/dubbo-go/protocol"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/filter/custom/go-server/pkg/user.go b/filter/custom/go-server/pkg/user.go
index 7a3231a..b778495 100644
--- a/filter/custom/go-server/pkg/user.go
+++ b/filter/custom/go-server/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/filter/custom/go-server/tests/integration/userprovider_test.go b/filter/custom/go-server/tests/integration/userprovider_test.go
index beefe1b..4618a83 100644
--- a/filter/custom/go-server/tests/integration/userprovider_test.go
+++ b/filter/custom/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/filter/sentinel/go-client/cmd/client.go b/filter/sentinel/go-client/cmd/client.go
index 2a506c9..b24f7be 100644
--- a/filter/sentinel/go-client/cmd/client.go
+++ b/filter/sentinel/go-client/cmd/client.go
@@ -26,6 +26,7 @@ import (
 	"github.com/alibaba/sentinel-golang/api"
 	sentinelConf "github.com/alibaba/sentinel-golang/core/config"
 	"github.com/alibaba/sentinel-golang/core/flow"
+
 	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
@@ -35,6 +36,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/filter/sentinel/go-server/cmd/server.go b/filter/sentinel/go-server/cmd/server.go
index 20b32b9..bf297b2 100644
--- a/filter/sentinel/go-server/cmd/server.go
+++ b/filter/sentinel/go-server/cmd/server.go
@@ -29,6 +29,7 @@ import (
 	"github.com/alibaba/sentinel-golang/api"
 	sentinelConf "github.com/alibaba/sentinel-golang/core/config"
 	"github.com/alibaba/sentinel-golang/core/flow"
+
 	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
diff --git a/filter/sentinel/go-server/pkg/user.go b/filter/sentinel/go-server/pkg/user.go
index 7a3231a..b778495 100644
--- a/filter/sentinel/go-server/pkg/user.go
+++ b/filter/sentinel/go-server/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/filter/sentinel/go-server/tests/integration/userprovider_test.go b/filter/sentinel/go-server/tests/integration/userprovider_test.go
index d6a5ecc..397f3ab 100644
--- a/filter/sentinel/go-server/tests/integration/userprovider_test.go
+++ b/filter/sentinel/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/filter/tpslimit/go-server/pkg/limit_strategy.go b/filter/tpslimit/go-server/pkg/limit_strategy.go
index 161e62d..f64a049 100644
--- a/filter/tpslimit/go-server/pkg/limit_strategy.go
+++ b/filter/tpslimit/go-server/pkg/limit_strategy.go
@@ -24,6 +24,7 @@ import (
 import (
 	"github.com/apache/dubbo-go/common/extension"
 	"github.com/apache/dubbo-go/filter"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/filter/tpslimit/go-server/pkg/user.go b/filter/tpslimit/go-server/pkg/user.go
index 7a3231a..b778495 100644
--- a/filter/tpslimit/go-server/pkg/user.go
+++ b/filter/tpslimit/go-server/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/game/go-server-game/cmd/server.go b/game/go-server-game/cmd/server.go
index dbb9f28..16e42d8 100644
--- a/game/go-server-game/cmd/server.go
+++ b/game/go-server-game/cmd/server.go
@@ -1,29 +1,29 @@
 package main
 
 import (
-    "os"
-    "os/signal"
-    "syscall"
-    "time"
-
-    "github.com/apache/dubbo-go/common/logger"
-    "github.com/apache/dubbo-go/config"
-    hessian "github.com/apache/dubbo-go-hessian2"
-
-    _ "github.com/apache/dubbo-go/protocol/dubbo"
-    _ "github.com/apache/dubbo-go/registry/protocol"
-
-    _ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
-    _ "github.com/apache/dubbo-go/filter/filter_impl"
+	"os"
+	"os/signal"
+	"syscall"
+	"time"
+)
 
-    _ "github.com/apache/dubbo-go/cluster/cluster_impl"
-    _ "github.com/apache/dubbo-go/cluster/loadbalance"
-    // _ "github.com/apache/dubbo-go/metadata/service/remote"
-    _ "github.com/apache/dubbo-go/metadata/service/inmemory"
-    _ "github.com/apache/dubbo-go/registry/zookeeper"
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
+	"github.com/apache/dubbo-go/common/logger"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+)
 
-    "github.com/apache/dubbo-go-samples/game/go-server-game/pkg"
-    "github.com/apache/dubbo-go-samples/game/pkg/pojo"
+import (
+	"github.com/apache/dubbo-go-samples/game/go-server-game/pkg"
+	"github.com/apache/dubbo-go-samples/game/pkg/pojo"
 )
 
 func init() {
diff --git a/game/go-server-game/pkg/consumer.go b/game/go-server-game/pkg/consumer.go
index dc3c045..c879fae 100644
--- a/game/go-server-game/pkg/consumer.go
+++ b/game/go-server-game/pkg/consumer.go
@@ -1,5 +1,7 @@
 package pkg
 
-import "github.com/apache/dubbo-go-samples/game/pkg/consumer/gate"
+import (
+	"github.com/apache/dubbo-go-samples/game/pkg/consumer/gate"
+)
 
-var GateBasketball = new(gate.BasketballService)
\ No newline at end of file
+var GateBasketball = new(gate.BasketballService)
diff --git a/game/go-server-game/pkg/provider.go b/game/go-server-game/pkg/provider.go
index 7892000..7b7c246 100644
--- a/game/go-server-game/pkg/provider.go
+++ b/game/go-server-game/pkg/provider.go
@@ -1,13 +1,17 @@
 package pkg
 
 import (
-    "context"
-    "fmt"
-    "strconv"
+	"context"
+	"fmt"
+	"strconv"
+)
 
-    "github.com/apache/dubbo-go/common/logger"
+import (
+	"github.com/apache/dubbo-go/common/logger"
+)
 
-    "github.com/apache/dubbo-go-samples/game/pkg/pojo"
+import (
+	"github.com/apache/dubbo-go-samples/game/pkg/pojo"
 )
 
 type BasketballService struct{}
@@ -103,4 +107,4 @@ func (p *BasketballService) Rank (ctx context.Context, uid string) (*pojo.Result
 
 func (p *BasketballService) Reference() string {
     return "gameProvider.basketballService"
-}
\ No newline at end of file
+}
diff --git a/game/go-server-game/tests/integration/gameprovider_test.go b/game/go-server-game/tests/integration/gameprovider_test.go
index 02dcf4a..6240102 100755
--- a/game/go-server-game/tests/integration/gameprovider_test.go
+++ b/game/go-server-game/tests/integration/gameprovider_test.go
@@ -1,10 +1,12 @@
 package integration
 
 import (
-    "context"
-    "testing"
+	"context"
+	"testing"
+)
 
-    "github.com/stretchr/testify/assert"
+import (
+	"github.com/stretchr/testify/assert"
 )
 
 func TestLogin(t *testing.T) {
@@ -29,4 +31,4 @@ func TestRank(t *testing.T) {
     assert.Nil(t, err)
     assert.NotNil(t, res)
     assert.Equal(t, int32(0), res.Code)
-}
\ No newline at end of file
+}
diff --git a/game/go-server-game/tests/integration/main_test.go b/game/go-server-game/tests/integration/main_test.go
index e04d87a..9459f1a 100644
--- a/game/go-server-game/tests/integration/main_test.go
+++ b/game/go-server-game/tests/integration/main_test.go
@@ -1,27 +1,27 @@
 package integration
 
 import (
-    "os"
-    "testing"
-    "time"
-
-    hessian "github.com/apache/dubbo-go-hessian2"
-    "github.com/apache/dubbo-go/config"
-
-    _ "github.com/apache/dubbo-go/protocol/dubbo"
-    _ "github.com/apache/dubbo-go/registry/protocol"
-
-    _ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
-    _ "github.com/apache/dubbo-go/filter/filter_impl"
+	"os"
+	"testing"
+	"time"
+)
 
-    _ "github.com/apache/dubbo-go/cluster/cluster_impl"
-    _ "github.com/apache/dubbo-go/cluster/loadbalance"
-    // _ "github.com/apache/dubbo-go/metadata/service/remote"
-    _ "github.com/apache/dubbo-go/metadata/service/inmemory"
-    _ "github.com/apache/dubbo-go/registry/zookeeper"
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+)
 
-    "github.com/apache/dubbo-go-samples/game/pkg/consumer/game"
-    "github.com/apache/dubbo-go-samples/game/pkg/pojo"
+import (
+	"github.com/apache/dubbo-go-samples/game/pkg/consumer/game"
+	"github.com/apache/dubbo-go-samples/game/pkg/pojo"
 )
 
 var gameProvider = new(game.BasketballService)
@@ -34,4 +34,4 @@ func TestMain(m *testing.M) {
     time.Sleep(3 * time.Second)
 
     os.Exit(m.Run())
-}
\ No newline at end of file
+}
diff --git a/game/go-server-gate/cmd/server.go b/game/go-server-gate/cmd/server.go
index b16297b..bde9993 100755
--- a/game/go-server-gate/cmd/server.go
+++ b/game/go-server-gate/cmd/server.go
@@ -1,34 +1,34 @@
 package main
 
 import (
-    "context"
-    "encoding/json"
-    "io/ioutil"
-    "net/http"
-    "os"
-    "os/signal"
-    "strconv"
-    "syscall"
-    "time"
-
-    hessian "github.com/apache/dubbo-go-hessian2"
-    "github.com/apache/dubbo-go/common/logger"
-    "github.com/apache/dubbo-go/config"
-
-    _ "github.com/apache/dubbo-go/protocol/dubbo"
-    _ "github.com/apache/dubbo-go/registry/protocol"
-
-    _ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
-    _ "github.com/apache/dubbo-go/filter/filter_impl"
-
-    _ "github.com/apache/dubbo-go/cluster/cluster_impl"
-    _ "github.com/apache/dubbo-go/cluster/loadbalance"
-    // _ "github.com/apache/dubbo-go/metadata/service/remote"
-    _ "github.com/apache/dubbo-go/metadata/service/inmemory"
-    _ "github.com/apache/dubbo-go/registry/zookeeper"
-
-    "github.com/apache/dubbo-go-samples/game/go-server-gate/pkg"
-    "github.com/apache/dubbo-go-samples/game/pkg/pojo"
+	"context"
+	"encoding/json"
+	"io/ioutil"
+	"net/http"
+	"os"
+	"os/signal"
+	"strconv"
+	"syscall"
+	"time"
+)
+
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
+	"github.com/apache/dubbo-go/common/logger"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/game/go-server-gate/pkg"
+	"github.com/apache/dubbo-go-samples/game/pkg/pojo"
 )
 
 func init() {
@@ -136,4 +136,4 @@ func responseWithOrigin(w http.ResponseWriter, r *http.Request, code int, json [
     w.Header().Set("Content-Type", "application/json; charset=utf-8")
     w.WriteHeader(code)
     w.Write(json)
-}
\ No newline at end of file
+}
diff --git a/game/go-server-gate/pkg/consumer.go b/game/go-server-gate/pkg/consumer.go
index 74bd910..fedca07 100644
--- a/game/go-server-gate/pkg/consumer.go
+++ b/game/go-server-gate/pkg/consumer.go
@@ -1,9 +1,12 @@
 package pkg
 
 import (
-    "context"
-    "github.com/apache/dubbo-go-samples/game/pkg/consumer/game"
-    "github.com/apache/dubbo-go-samples/game/pkg/pojo"
+	"context"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/game/pkg/consumer/game"
+	"github.com/apache/dubbo-go-samples/game/pkg/pojo"
 )
 
 var GameBasketball = new(game.BasketballService)
diff --git a/game/go-server-gate/pkg/provider.go b/game/go-server-gate/pkg/provider.go
index e47ed65..89d99d7 100644
--- a/game/go-server-gate/pkg/provider.go
+++ b/game/go-server-gate/pkg/provider.go
@@ -1,10 +1,15 @@
 package pkg
 
 import (
-    "context"
-    "github.com/apache/dubbo-go/common/logger"
+	"context"
+)
 
-    "github.com/apache/dubbo-go-samples/game/pkg/pojo"
+import (
+	"github.com/apache/dubbo-go/common/logger"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/game/pkg/pojo"
 )
 
 type BasketballService struct{}
diff --git a/game/go-server-gate/tests/integration/gateprovider_test.go b/game/go-server-gate/tests/integration/gateprovider_test.go
index ebb7ea2..c8b0c96 100644
--- a/game/go-server-gate/tests/integration/gateprovider_test.go
+++ b/game/go-server-gate/tests/integration/gateprovider_test.go
@@ -1,10 +1,12 @@
 package integration
 
 import (
-    "context"
-    "testing"
+	"context"
+	"testing"
+)
 
-    "github.com/stretchr/testify/assert"
+import (
+	"github.com/stretchr/testify/assert"
 )
 
 func TestSend(t *testing.T) {
@@ -15,4 +17,4 @@ func TestSend(t *testing.T) {
     assert.NotNil(t, res.Data)
     assert.Equal(t, "A001", res.Data["to"])
     assert.Equal(t, "hello", res.Data["message"])
-}
\ No newline at end of file
+}
diff --git a/game/go-server-gate/tests/integration/main_test.go b/game/go-server-gate/tests/integration/main_test.go
index 41bf36b..88bf8d3 100644
--- a/game/go-server-gate/tests/integration/main_test.go
+++ b/game/go-server-gate/tests/integration/main_test.go
@@ -1,27 +1,27 @@
 package integration
 
 import (
-    "os"
-    "testing"
-    "time"
-
-    hessian "github.com/apache/dubbo-go-hessian2"
-    "github.com/apache/dubbo-go/config"
-
-    _ "github.com/apache/dubbo-go/protocol/dubbo"
-    _ "github.com/apache/dubbo-go/registry/protocol"
-
-    _ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
-    _ "github.com/apache/dubbo-go/filter/filter_impl"
+	"os"
+	"testing"
+	"time"
+)
 
-    _ "github.com/apache/dubbo-go/cluster/cluster_impl"
-    _ "github.com/apache/dubbo-go/cluster/loadbalance"
-    // _ "github.com/apache/dubbo-go/metadata/service/remote"
-    _ "github.com/apache/dubbo-go/metadata/service/inmemory"
-    _ "github.com/apache/dubbo-go/registry/zookeeper"
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+)
 
-    "github.com/apache/dubbo-go-samples/game/pkg/consumer/gate"
-    "github.com/apache/dubbo-go-samples/game/pkg/pojo"
+import (
+	"github.com/apache/dubbo-go-samples/game/pkg/consumer/gate"
+	"github.com/apache/dubbo-go-samples/game/pkg/pojo"
 )
 
 var gateProvider = new(gate.BasketballService)
@@ -34,4 +34,4 @@ func TestMain(m *testing.M) {
     time.Sleep(3 * time.Second)
 
     os.Exit(m.Run())
-}
\ No newline at end of file
+}
diff --git a/game/pkg/consumer/game/basketball.go b/game/pkg/consumer/game/basketball.go
index 20dc0b6..36a343e 100644
--- a/game/pkg/consumer/game/basketball.go
+++ b/game/pkg/consumer/game/basketball.go
@@ -1,8 +1,11 @@
 package game
 
 import (
-    "context"
-    "github.com/apache/dubbo-go-samples/game/pkg/pojo"
+	"context"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/game/pkg/pojo"
 )
 
 type BasketballService struct {
diff --git a/game/pkg/consumer/gate/basketball.go b/game/pkg/consumer/gate/basketball.go
index 74833d3..9d656d7 100644
--- a/game/pkg/consumer/gate/basketball.go
+++ b/game/pkg/consumer/gate/basketball.go
@@ -1,8 +1,11 @@
 package gate
 
 import (
-    "context"
-    "github.com/apache/dubbo-go-samples/game/pkg/pojo"
+	"context"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/game/pkg/pojo"
 )
 
 type BasketballService struct {
diff --git a/game/pkg/pojo/info.go b/game/pkg/pojo/info.go
index 59d47dc..6125b5a 100644
--- a/game/pkg/pojo/info.go
+++ b/game/pkg/pojo/info.go
@@ -7,4 +7,4 @@ type Info struct {
 
 func (m Info) JavaClassName() string {
 	return "org.apache.dubbo.pojo.Info"
-}
\ No newline at end of file
+}
diff --git a/general/dubbo/go-client/cmd/client.go b/general/dubbo/go-client/cmd/client.go
index 1b89fc6..9df1d28 100644
--- a/general/dubbo/go-client/cmd/client.go
+++ b/general/dubbo/go-client/cmd/client.go
@@ -24,19 +24,20 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/general/dubbo/go-client/pkg"
-	"github.com/apache/dubbo-go/config"
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
+	"github.com/dubbogo/gost/log"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/general/dubbo/go-client/pkg"
 )
 
 var (
diff --git a/general/dubbo/go-server/cmd/server.go b/general/dubbo/go-server/cmd/server.go
index 97e5477..af84144 100644
--- a/general/dubbo/go-server/cmd/server.go
+++ b/general/dubbo/go-server/cmd/server.go
@@ -27,26 +27,26 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/general/dubbo/go-server/pkg"
-
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
-	_ "github.com/apache/dubbo-go/protocol/dubbo"
-	_ "github.com/apache/dubbo-go/registry/protocol"
-
-	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
-
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/general/dubbo/go-server/pkg"
+)
+
 var (
 	survivalTimeout = int(3e9)
 )
diff --git a/general/dubbo/go-server/pkg/user_provider.go b/general/dubbo/go-server/pkg/user_provider.go
index 6ccb0f1..38cb8c9 100644
--- a/general/dubbo/go-server/pkg/user_provider.go
+++ b/general/dubbo/go-server/pkg/user_provider.go
@@ -25,13 +25,12 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/dubbogo/gost/log"
-	perrors "github.com/pkg/errors"
-)
-
-import (
 	"github.com/apache/dubbo-go-hessian2/java_exception"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
+
+	perrors "github.com/pkg/errors"
 )
 
 func init() {
diff --git a/general/dubbo/go-server/tests/integration/main_test.go b/general/dubbo/go-server/tests/integration/main_test.go
index eaad5f4..52f360a 100644
--- a/general/dubbo/go-server/tests/integration/main_test.go
+++ b/general/dubbo/go-server/tests/integration/main_test.go
@@ -20,12 +20,20 @@
 package integration
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go/config"
+	"context"
+	"fmt"
+	"os"
+	"strconv"
+	"testing"
+	"time"
+)
 
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
@@ -33,15 +41,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import (
-	"context"
-	"fmt"
-	"os"
-	"strconv"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/general/dubbo/go-server/tests/integration/userprovider_test.go b/general/dubbo/go-server/tests/integration/userprovider_test.go
index 70e7617..988e1cd 100644
--- a/general/dubbo/go-server/tests/integration/userprovider_test.go
+++ b/general/dubbo/go-server/tests/integration/userprovider_test.go
@@ -21,14 +21,19 @@ package integration
 
 import (
 	"context"
-	"github.com/apache/dubbo-go-hessian2/java_exception"
-	"github.com/apache/dubbo-go-samples/general/dubbo/go-server/pkg"
 	"testing"
 )
+
 import (
+	"github.com/apache/dubbo-go-hessian2/java_exception"
+
 	"github.com/stretchr/testify/assert"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/general/dubbo/go-server/pkg"
+)
+
 func TestGetUserA000(t *testing.T) {
 	user := &User{}
 	err := userProvider.GetUser(context.TODO(), []interface{}{"A000"}, user)
diff --git a/general/grpc/go-client/cmd/client.go b/general/grpc/go-client/cmd/client.go
index 919c92c..e216621 100644
--- a/general/grpc/go-client/cmd/client.go
+++ b/general/grpc/go-client/cmd/client.go
@@ -32,6 +32,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/grpc"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/general/grpc/go-server/cmd/server.go b/general/grpc/go-server/cmd/server.go
index 984fcc5..feaf763 100644
--- a/general/grpc/go-server/cmd/server.go
+++ b/general/grpc/go-server/cmd/server.go
@@ -37,7 +37,7 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import(
+import (
 	"github.com/apache/dubbo-go-samples/general/grpc/go-server/pkg"
 )
 
diff --git a/general/grpc/go-server/pkg/greeter.go b/general/grpc/go-server/pkg/greeter.go
index 154d35d..f205f39 100644
--- a/general/grpc/go-server/pkg/greeter.go
+++ b/general/grpc/go-server/pkg/greeter.go
@@ -20,6 +20,9 @@ package pkg
 import (
 	"context"
 	"fmt"
+)
+
+import (
 	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
 )
 
diff --git a/general/grpc/go-server/tests/integration/greeter_test.go b/general/grpc/go-server/tests/integration/greeter_test.go
index 45eccdd..f49e5a1 100644
--- a/general/grpc/go-server/tests/integration/greeter_test.go
+++ b/general/grpc/go-server/tests/integration/greeter_test.go
@@ -24,7 +24,7 @@ import (
 	"testing"
 )
 
-import(
+import (
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/general/grpc/go-server/tests/integration/main_test.go b/general/grpc/go-server/tests/integration/main_test.go
index 74a9c4a..cba31a9 100644
--- a/general/grpc/go-server/tests/integration/main_test.go
+++ b/general/grpc/go-server/tests/integration/main_test.go
@@ -20,6 +20,12 @@
 package integration
 
 import (
+	"os"
+	"testing"
+	"time"
+)
+
+import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -32,11 +38,6 @@ import (
 )
 
 import (
-	"os"
-	"testing"
-	"time"
-)
-import (
 	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
 )
 
diff --git a/general/grpc/protobuf/helloworld.pb.go b/general/grpc/protobuf/helloworld.pb.go
index 8124c8f..1dbb351 100644
--- a/general/grpc/protobuf/helloworld.pb.go
+++ b/general/grpc/protobuf/helloworld.pb.go
@@ -6,10 +6,6 @@ package protobuf
 import (
 	context "context"
 	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
 	math "math"
 )
 
@@ -17,9 +13,14 @@ import (
 	"github.com/apache/dubbo-go/protocol"
 	dgrpc "github.com/apache/dubbo-go/protocol/grpc"
 	"github.com/apache/dubbo-go/protocol/invocation"
+
+	proto "github.com/golang/protobuf/proto"
+
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
 var _ = fmt.Errorf
 var _ = math.Inf
diff --git a/general/grpc/stream/go-client/app/client.go b/general/grpc/stream/go-client/app/client.go
index ede6be7..e0f5f36 100644
--- a/general/grpc/stream/go-client/app/client.go
+++ b/general/grpc/stream/go-client/app/client.go
@@ -37,6 +37,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/grpc"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	gxlog "github.com/dubbogo/gost/log"
 )
 
diff --git a/general/grpc/stream/go-client/app/helloworld.pb.go b/general/grpc/stream/go-client/app/helloworld.pb.go
index 4bdfb1e..206bf71 100644
--- a/general/grpc/stream/go-client/app/helloworld.pb.go
+++ b/general/grpc/stream/go-client/app/helloworld.pb.go
@@ -6,10 +6,6 @@ package main
 import (
 	context "context"
 	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
 	math "math"
 )
 
@@ -17,9 +13,14 @@ import (
 	"github.com/apache/dubbo-go/protocol"
 	dgrpc "github.com/apache/dubbo-go/protocol/grpc"
 	"github.com/apache/dubbo-go/protocol/invocation"
+
+	proto "github.com/golang/protobuf/proto"
+
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
 var _ = fmt.Errorf
 var _ = math.Inf
diff --git a/general/grpc/stream/go-server/app/helloworld.pb.go b/general/grpc/stream/go-server/app/helloworld.pb.go
index 4bdfb1e..1850d20 100644
--- a/general/grpc/stream/go-server/app/helloworld.pb.go
+++ b/general/grpc/stream/go-server/app/helloworld.pb.go
@@ -6,10 +6,6 @@ package main
 import (
 	context "context"
 	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
 	math "math"
 )
 
@@ -17,9 +13,15 @@ import (
 	"github.com/apache/dubbo-go/protocol"
 	dgrpc "github.com/apache/dubbo-go/protocol/grpc"
 	"github.com/apache/dubbo-go/protocol/invocation"
+
+	proto "github.com/golang/protobuf/proto"
+
+	grpc "google.golang.org/grpc"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
 var _ = fmt.Errorf
 var _ = math.Inf
diff --git a/general/grpc/unary/go-client/app/client.go b/general/grpc/unary/go-client/app/client.go
index 6dd2cc7..fc0d332 100644
--- a/general/grpc/unary/go-client/app/client.go
+++ b/general/grpc/unary/go-client/app/client.go
@@ -31,6 +31,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/grpc"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	gxlog "github.com/dubbogo/gost/log"
 )
 
diff --git a/general/grpc/unary/go-client/app/helloworld.pb.go b/general/grpc/unary/go-client/app/helloworld.pb.go
index e0e9b31..101f288 100644
--- a/general/grpc/unary/go-client/app/helloworld.pb.go
+++ b/general/grpc/unary/go-client/app/helloworld.pb.go
@@ -6,10 +6,6 @@ package main
 import (
 	context "context"
 	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
 	math "math"
 )
 
@@ -17,9 +13,14 @@ import (
 	"github.com/apache/dubbo-go/protocol"
 	dgrpc "github.com/apache/dubbo-go/protocol/grpc"
 	"github.com/apache/dubbo-go/protocol/invocation"
+
+	proto "github.com/golang/protobuf/proto"
+
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
 var _ = fmt.Errorf
 var _ = math.Inf
diff --git a/general/grpc/unary/go-server/app/greeter.go b/general/grpc/unary/go-server/app/greeter.go
index e5471f3..17c3290 100644
--- a/general/grpc/unary/go-server/app/greeter.go
+++ b/general/grpc/unary/go-server/app/greeter.go
@@ -22,7 +22,6 @@ import (
 	"fmt"
 )
 
-
 type GreeterProvider struct {
 	*GreeterProviderBase
 }
diff --git a/general/grpc/unary/go-server/app/helloworld.pb.go b/general/grpc/unary/go-server/app/helloworld.pb.go
index e0e9b31..101f288 100644
--- a/general/grpc/unary/go-server/app/helloworld.pb.go
+++ b/general/grpc/unary/go-server/app/helloworld.pb.go
@@ -6,10 +6,6 @@ package main
 import (
 	context "context"
 	fmt "fmt"
-	proto "github.com/golang/protobuf/proto"
-	grpc "google.golang.org/grpc"
-	codes "google.golang.org/grpc/codes"
-	status "google.golang.org/grpc/status"
 	math "math"
 )
 
@@ -17,9 +13,14 @@ import (
 	"github.com/apache/dubbo-go/protocol"
 	dgrpc "github.com/apache/dubbo-go/protocol/grpc"
 	"github.com/apache/dubbo-go/protocol/invocation"
+
+	proto "github.com/golang/protobuf/proto"
+
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
 var _ = fmt.Errorf
 var _ = math.Inf
diff --git a/general/jsonrpc/go-client/app/client.go b/general/jsonrpc/go-client/app/client.go
index aa857df..24066b5 100644
--- a/general/jsonrpc/go-client/app/client.go
+++ b/general/jsonrpc/go-client/app/client.go
@@ -27,21 +27,17 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-)
-
-import (
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/jsonrpc"
 	_ "github.com/apache/dubbo-go/registry/protocol"
-
-	_ "github.com/apache/dubbo-go/filter/filter_impl"
-
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
+	"github.com/dubbogo/gost/log"
 )
 
 var (
diff --git a/general/jsonrpc/go-server/app/server.go b/general/jsonrpc/go-server/app/server.go
index 3ad3d4e..1f0dfe9 100644
--- a/general/jsonrpc/go-server/app/server.go
+++ b/general/jsonrpc/go-server/app/server.go
@@ -26,16 +26,14 @@ import (
 )
 
 import (
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/jsonrpc"
 	_ "github.com/apache/dubbo-go/registry/protocol"
-
-	_ "github.com/apache/dubbo-go/filter/filter_impl"
-
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
diff --git a/general/jsonrpc/go-server/app/user_provider.go b/general/jsonrpc/go-server/app/user_provider.go
index 3700daa..8957c7a 100644
--- a/general/jsonrpc/go-server/app/user_provider.go
+++ b/general/jsonrpc/go-server/app/user_provider.go
@@ -7,11 +7,10 @@ import (
 )
 
 import (
+	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
-)
 
-import (
-	"github.com/apache/dubbo-go/config"
 	perrors "github.com/pkg/errors"
 )
 
diff --git a/general/jsonrpc/go-server/app/user_provider1.go b/general/jsonrpc/go-server/app/user_provider1.go
index 4b7af5a..8007234 100644
--- a/general/jsonrpc/go-server/app/user_provider1.go
+++ b/general/jsonrpc/go-server/app/user_provider1.go
@@ -7,11 +7,10 @@ import (
 )
 
 import (
+	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
-)
 
-import (
-	"github.com/apache/dubbo-go/config"
 	perrors "github.com/pkg/errors"
 )
 
diff --git a/general/jsonrpc/go-server/app/user_provider2.go b/general/jsonrpc/go-server/app/user_provider2.go
index 752eb8b..1726574 100644
--- a/general/jsonrpc/go-server/app/user_provider2.go
+++ b/general/jsonrpc/go-server/app/user_provider2.go
@@ -7,11 +7,10 @@ import (
 )
 
 import (
+	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
-)
 
-import (
-	"github.com/apache/dubbo-go/config"
 	perrors "github.com/pkg/errors"
 )
 
diff --git a/general/rest/go-client/cmd/client.go b/general/rest/go-client/cmd/client.go
index c8ca0d9..cc891bd 100644
--- a/general/rest/go-client/cmd/client.go
+++ b/general/rest/go-client/cmd/client.go
@@ -24,24 +24,22 @@ import (
 )
 
 import (
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/rest"
 	_ "github.com/apache/dubbo-go/registry/protocol"
-	"github.com/dubbogo/gost/log"
-
-	_ "github.com/apache/dubbo-go/filter/filter_impl"
-
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
+	"github.com/dubbogo/gost/log"
 )
 
 import (
 	"github.com/apache/dubbo-go-samples/general/rest/go-client/pkg"
 )
 
-// need to setup environment variable "CONF_CONSUMER_FILE_PATH" to "conf/client.yml" before run
 func main() {
 	config.Load()
 	time.Sleep(3 * time.Second)
diff --git a/general/rest/go-server/cmd/server.go b/general/rest/go-server/cmd/server.go
index 469fbb2..1fb66fe 100644
--- a/general/rest/go-server/cmd/server.go
+++ b/general/rest/go-server/cmd/server.go
@@ -26,21 +26,21 @@ import (
 )
 
 import (
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
 	_ "github.com/apache/dubbo-go/protocol/rest"
 	"github.com/apache/dubbo-go/protocol/rest/server/server_impl"
 	_ "github.com/apache/dubbo-go/registry/protocol"
-	"github.com/dubbogo/gost/log"
-	"github.com/emicklei/go-restful/v3"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
 
-	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	"github.com/dubbogo/gost/log"
 
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
-	_ "github.com/apache/dubbo-go/registry/zookeeper"
+	"github.com/emicklei/go-restful/v3"
 )
 
 import (
diff --git a/general/rest/go-server/pkg/user_provider.go b/general/rest/go-server/pkg/user_provider.go
index 5fa4428..bf42866 100644
--- a/general/rest/go-server/pkg/user_provider.go
+++ b/general/rest/go-server/pkg/user_provider.go
@@ -6,12 +6,11 @@ import (
 )
 
 import (
+	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
-	perrors "github.com/pkg/errors"
-)
 
-import (
-	"github.com/apache/dubbo-go/config"
+	perrors "github.com/pkg/errors"
 )
 
 func init() {
diff --git a/general/rest/go-server/pkg/user_provider1.go b/general/rest/go-server/pkg/user_provider1.go
index e8ffb21..6fdc271 100644
--- a/general/rest/go-server/pkg/user_provider1.go
+++ b/general/rest/go-server/pkg/user_provider1.go
@@ -6,12 +6,11 @@ import (
 )
 
 import (
+	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
-	perrors "github.com/pkg/errors"
-)
 
-import (
-	"github.com/apache/dubbo-go/config"
+	perrors "github.com/pkg/errors"
 )
 
 func init() {
diff --git a/general/rest/go-server/pkg/user_provider2.go b/general/rest/go-server/pkg/user_provider2.go
index 1399d05..8287d31 100644
--- a/general/rest/go-server/pkg/user_provider2.go
+++ b/general/rest/go-server/pkg/user_provider2.go
@@ -6,12 +6,11 @@ import (
 )
 
 import (
+	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
-	perrors "github.com/pkg/errors"
-)
 
-import (
-	"github.com/apache/dubbo-go/config"
+	perrors "github.com/pkg/errors"
 )
 
 func init() {
diff --git a/general/rest/go-server/tests/integration/userprovider_test.go b/general/rest/go-server/tests/integration/userprovider_test.go
index 98af57a..1f11ae2 100644
--- a/general/rest/go-server/tests/integration/userprovider_test.go
+++ b/general/rest/go-server/tests/integration/userprovider_test.go
@@ -25,11 +25,11 @@ import (
 )
 
 import (
-	. "github.com/apache/dubbo-go-samples/general/rest/go-server/pkg"
+	"github.com/stretchr/testify/assert"
 )
 
 import (
-	"github.com/stretchr/testify/assert"
+	. "github.com/apache/dubbo-go-samples/general/rest/go-server/pkg"
 )
 
 func TestGetUser(t *testing.T) {
diff --git a/generic/go-client/cmd/client.go b/generic/go-client/cmd/client.go
index 269988e..0d9d4f3 100644
--- a/generic/go-client/cmd/client.go
+++ b/generic/go-client/cmd/client.go
@@ -27,11 +27,6 @@ import (
 )
 
 import (
-	"github.com/apache/dubbo-go-samples/generic/go-client/pkg"
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -41,6 +36,12 @@ import (
 	"github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
+	"github.com/dubbogo/gost/log"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/generic/go-client/pkg"
 )
 
 var (
diff --git a/generic/go-server/cmd/server.go b/generic/go-server/cmd/server.go
index 041116a..7e2784e 100644
--- a/generic/go-server/cmd/server.go
+++ b/generic/go-server/cmd/server.go
@@ -27,7 +27,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -37,7 +36,9 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+)
 
+import (
 	"github.com/apache/dubbo-go-samples/generic/go-server/pkg"
 )
 
diff --git a/generic/go-server/pkg/user.go b/generic/go-server/pkg/user.go
index a7eef28..dd62f6d 100644
--- a/generic/go-server/pkg/user.go
+++ b/generic/go-server/pkg/user.go
@@ -23,12 +23,10 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
 )
 
 func init() {
diff --git a/generic/go-server/tests/integration/main_test.go b/generic/go-server/tests/integration/main_test.go
index 41fe4f0..f24056e 100644
--- a/generic/go-server/tests/integration/main_test.go
+++ b/generic/go-server/tests/integration/main_test.go
@@ -20,6 +20,12 @@
 package integration
 
 import (
+	"os"
+	"testing"
+	"time"
+)
+
+import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -31,12 +37,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import (
-	"os"
-	"testing"
-	"time"
-)
-
 var appName = "UserConsumerTest"
 var referenceConfig = config.ReferenceConfig{
 	InterfaceName: "org.apache.dubbo.UserProvider",
diff --git a/generic/go-server/tests/integration/userprovider_test.go b/generic/go-server/tests/integration/userprovider_test.go
index c272129..975e40b 100644
--- a/generic/go-server/tests/integration/userprovider_test.go
+++ b/generic/go-server/tests/integration/userprovider_test.go
@@ -21,12 +21,14 @@ package integration
 
 import (
 	"context"
-	"github.com/stretchr/testify/assert"
 	"testing"
 	"time"
 )
+
 import (
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/stretchr/testify/assert"
 )
 
 func TestGetUser(t *testing.T) {
diff --git a/group/go-client/cmd/client.go b/group/go-client/cmd/client.go
index 8d42052..391bbd4 100644
--- a/group/go-client/cmd/client.go
+++ b/group/go-client/cmd/client.go
@@ -25,11 +25,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/group/go-client/pkg"
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -38,6 +33,12 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
+	"github.com/dubbogo/gost/log"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/group/go-client/pkg"
 )
 
 var userProviderA = new(pkg.UserProviderGroupA)
diff --git a/group/go-server-group-a/pkg/user.go b/group/go-server-group-a/pkg/user.go
index 47e2ec1..f61464f 100644
--- a/group/go-server-group-a/pkg/user.go
+++ b/group/go-server-group-a/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/group/go-server-group-a/tests/integration/main_test.go b/group/go-server-group-a/tests/integration/main_test.go
index 4a75f7a..b4a5139 100644
--- a/group/go-server-group-a/tests/integration/main_test.go
+++ b/group/go-server-group-a/tests/integration/main_test.go
@@ -28,11 +28,10 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go/config"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
diff --git a/group/go-server-group-a/tests/integration/userprovider_test.go b/group/go-server-group-a/tests/integration/userprovider_test.go
index 3c4661a..6552e24 100644
--- a/group/go-server-group-a/tests/integration/userprovider_test.go
+++ b/group/go-server-group-a/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/group/go-server-group-b/pkg/user.go b/group/go-server-group-b/pkg/user.go
index f8d375a..221a208 100644
--- a/group/go-server-group-b/pkg/user.go
+++ b/group/go-server-group-b/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/group/go-server-group-b/tests/integration/main_test.go b/group/go-server-group-b/tests/integration/main_test.go
index 4a75f7a..b4a5139 100644
--- a/group/go-server-group-b/tests/integration/main_test.go
+++ b/group/go-server-group-b/tests/integration/main_test.go
@@ -28,11 +28,10 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go/config"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
diff --git a/helloworld/go-client/cmd/client.go b/helloworld/go-client/cmd/client.go
index c44abbd..b6ac640 100644
--- a/helloworld/go-client/cmd/client.go
+++ b/helloworld/go-client/cmd/client.go
@@ -33,6 +33,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	gxlog "github.com/dubbogo/gost/log"
 )
 
diff --git a/metric/go-client/cmd/client.go b/metric/go-client/cmd/client.go
index e06bf2a..d22c212 100644
--- a/metric/go-client/cmd/client.go
+++ b/metric/go-client/cmd/client.go
@@ -33,6 +33,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/metric/go-server/cmd/server.go b/metric/go-server/cmd/server.go
index 6ed88ed..369a8b8 100644
--- a/metric/go-server/cmd/server.go
+++ b/metric/go-server/cmd/server.go
@@ -29,8 +29,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/prometheus/client_golang/prometheus/promhttp"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -41,6 +39,8 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
+	"github.com/prometheus/client_golang/prometheus/promhttp"
 )
 
 import (
diff --git a/metric/go-server/pkg/user.go b/metric/go-server/pkg/user.go
index fb78eeb..df78163 100644
--- a/metric/go-server/pkg/user.go
+++ b/metric/go-server/pkg/user.go
@@ -19,17 +19,16 @@ package pkg
 
 import (
 	"context"
-	"github.com/opentracing/opentracing-go"
 	"time"
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
+
+	"github.com/opentracing/opentracing-go"
 )
 
 func init() {
diff --git a/metric/go-server/tests/integration/main_test.go b/metric/go-server/tests/integration/main_test.go
index 45de1c7..b4a5139 100644
--- a/metric/go-server/tests/integration/main_test.go
+++ b/metric/go-server/tests/integration/main_test.go
@@ -20,12 +20,18 @@
 package integration
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go/config"
+	"context"
+	"os"
+	"testing"
+	"time"
+)
 
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
@@ -33,13 +39,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import (
-	"context"
-	"os"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/metric/go-server/tests/integration/userprovider_test.go b/metric/go-server/tests/integration/userprovider_test.go
index 0ee7a59..776299a 100644
--- a/metric/go-server/tests/integration/userprovider_test.go
+++ b/metric/go-server/tests/integration/userprovider_test.go
@@ -25,6 +25,7 @@ import (
 	"net/http"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/multi-registry/go-client/cmd/client.go b/multi-registry/go-client/cmd/client.go
index 9516cd5..22bce13 100644
--- a/multi-registry/go-client/cmd/client.go
+++ b/multi-registry/go-client/cmd/client.go
@@ -25,7 +25,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -35,6 +34,7 @@ import (
 	_ "github.com/apache/dubbo-go/registry/nacos"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/multi-registry/go-server/cmd/server.go b/multi-registry/go-server/cmd/server.go
index 0d538c9..388188b 100644
--- a/multi-registry/go-server/cmd/server.go
+++ b/multi-registry/go-server/cmd/server.go
@@ -27,7 +27,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
diff --git a/multi-registry/go-server/pkg/user.go b/multi-registry/go-server/pkg/user.go
index 9920a59..b778495 100644
--- a/multi-registry/go-server/pkg/user.go
+++ b/multi-registry/go-server/pkg/user.go
@@ -23,12 +23,10 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
 )
 
 func init() {
diff --git a/multi-registry/go-server/tests/integration/main_test.go b/multi-registry/go-server/tests/integration/main_test.go
index a6c66da..d910b0d 100644
--- a/multi-registry/go-server/tests/integration/main_test.go
+++ b/multi-registry/go-server/tests/integration/main_test.go
@@ -20,6 +20,13 @@
 package integration
 
 import (
+	"context"
+	"os"
+	"testing"
+	"time"
+)
+
+import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
@@ -32,13 +39,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import (
-	"context"
-	"os"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/multi-registry/go-server/tests/integration/userprovider_test.go b/multi-registry/go-server/tests/integration/userprovider_test.go
index dc29d9a..7183e64 100644
--- a/multi-registry/go-server/tests/integration/userprovider_test.go
+++ b/multi-registry/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/multi-zone/go-client/cmd/client.go b/multi-zone/go-client/cmd/client.go
index 6095f55..a72f62e 100644
--- a/multi-zone/go-client/cmd/client.go
+++ b/multi-zone/go-client/cmd/client.go
@@ -33,6 +33,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
@@ -40,7 +41,6 @@ import (
 	"github.com/apache/dubbo-go-samples/multi-zone/go-client/pkg"
 )
 
-// need to setup environment variable "CONF_CONSUMER_FILE_PATH" to "conf/client.yml" before run
 func main() {
 	hessian.RegisterPOJO(&pkg.User{})
 	userProvider := new(pkg.UserProvider)
diff --git a/multi-zone/go-client/tests/integration/main_test.go b/multi-zone/go-client/tests/integration/main_test.go
index e0d834e..44b9717 100644
--- a/multi-zone/go-client/tests/integration/main_test.go
+++ b/multi-zone/go-client/tests/integration/main_test.go
@@ -20,13 +20,17 @@
 package integration
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go/config"
-	"github.com/apache/dubbo-go-samples/multi-zone/go-client/pkg"
+	"os"
+	"testing"
+	"time"
+)
 
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
@@ -34,9 +38,7 @@ import (
 )
 
 import (
-	"os"
-	"testing"
-	"time"
+	"github.com/apache/dubbo-go-samples/multi-zone/go-client/pkg"
 )
 
 var userProvider = new(pkg.UserProvider)
diff --git a/multi-zone/go-client/tests/integration/userprovider_test.go b/multi-zone/go-client/tests/integration/userprovider_test.go
index 098445c..2961b57 100644
--- a/multi-zone/go-client/tests/integration/userprovider_test.go
+++ b/multi-zone/go-client/tests/integration/userprovider_test.go
@@ -21,14 +21,19 @@ package integration
 
 import (
 	"context"
-	"github.com/apache/dubbo-go/common/constant"
-	"github.com/apache/dubbo-go-samples/multi-zone/go-client/pkg"
 	"testing"
 )
+
 import (
+	"github.com/apache/dubbo-go/common/constant"
+
 	"github.com/stretchr/testify/assert"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/multi-zone/go-client/pkg"
+)
+
 func TestGetUser(t *testing.T) {
 	ctx := context.WithValue(context.Background(), constant.REGISTRY_KEY+"."+constant.ZONE_FORCE_KEY, true)
 
diff --git a/multi-zone/go-server-hz/pkg/user.go b/multi-zone/go-server-hz/pkg/user.go
index b75b3fc..a637df7 100644
--- a/multi-zone/go-server-hz/pkg/user.go
+++ b/multi-zone/go-server-hz/pkg/user.go
@@ -24,6 +24,7 @@ import (
 
 import (
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/multi-zone/go-server-hz/tests/integration/userprovider_test.go b/multi-zone/go-server-hz/tests/integration/userprovider_test.go
index 89988b7..a506b8d 100644
--- a/multi-zone/go-server-hz/tests/integration/userprovider_test.go
+++ b/multi-zone/go-server-hz/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/multi-zone/go-server-sh/pkg/user.go b/multi-zone/go-server-sh/pkg/user.go
index b75b3fc..a637df7 100644
--- a/multi-zone/go-server-sh/pkg/user.go
+++ b/multi-zone/go-server-sh/pkg/user.go
@@ -24,6 +24,7 @@ import (
 
 import (
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/multi-zone/go-server-sh/tests/integration/main_test.go b/multi-zone/go-server-sh/tests/integration/main_test.go
index f79029c..b4a5139 100644
--- a/multi-zone/go-server-sh/tests/integration/main_test.go
+++ b/multi-zone/go-server-sh/tests/integration/main_test.go
@@ -39,8 +39,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/multi-zone/go-server-sh/tests/integration/userprovider_test.go b/multi-zone/go-server-sh/tests/integration/userprovider_test.go
index c8d3dd8..04ab061 100644
--- a/multi-zone/go-server-sh/tests/integration/userprovider_test.go
+++ b/multi-zone/go-server-sh/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/openzipkin/go-client/cmd/client.go b/openzipkin/go-client/cmd/client.go
index 872ef8c..53e1c11 100644
--- a/openzipkin/go-client/cmd/client.go
+++ b/openzipkin/go-client/cmd/client.go
@@ -19,14 +19,14 @@ package main
 
 import (
 	"context"
-	"contrib.go.opencensus.io/exporter/prometheus"
-	"go.opencensus.io/stats/view"
 	"math/rand"
 	"os"
 	"time"
 )
 
 import (
+	"contrib.go.opencensus.io/exporter/prometheus"
+
 	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
@@ -36,12 +36,17 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
-	// tracing zipkin & prometheus
+
 	"github.com/opentracing/opentracing-go"
+
 	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
+
 	"github.com/openzipkin/zipkin-go"
 	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
+
+	"go.opencensus.io/stats/view"
 )
 
 import (
diff --git a/openzipkin/go-server-a/cmd/server.go b/openzipkin/go-server-a/cmd/server.go
index fc06874..c90b3d0 100644
--- a/openzipkin/go-server-a/cmd/server.go
+++ b/openzipkin/go-server-a/cmd/server.go
@@ -36,11 +36,13 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	gxlog "github.com/dubbogo/gost/log"
 
-	// tracing
 	"github.com/opentracing/opentracing-go"
+
 	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
+
 	"github.com/openzipkin/zipkin-go"
 	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
 )
diff --git a/openzipkin/go-server-a/pkg/user.go b/openzipkin/go-server-a/pkg/user.go
index d0ca328..2251983 100644
--- a/openzipkin/go-server-a/pkg/user.go
+++ b/openzipkin/go-server-a/pkg/user.go
@@ -26,6 +26,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/openzipkin/go-server-a/tests/integration/main_test.go b/openzipkin/go-server-a/tests/integration/main_test.go
index 4a75f7a..b4a5139 100644
--- a/openzipkin/go-server-a/tests/integration/main_test.go
+++ b/openzipkin/go-server-a/tests/integration/main_test.go
@@ -28,11 +28,10 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go/config"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
diff --git a/openzipkin/go-server-a/tests/integration/userprovider_test.go b/openzipkin/go-server-a/tests/integration/userprovider_test.go
index 3c4661a..6552e24 100644
--- a/openzipkin/go-server-a/tests/integration/userprovider_test.go
+++ b/openzipkin/go-server-a/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/openzipkin/go-server-b/cmd/server.go b/openzipkin/go-server-b/cmd/server.go
index 17dfc6c..7c75247 100644
--- a/openzipkin/go-server-b/cmd/server.go
+++ b/openzipkin/go-server-b/cmd/server.go
@@ -36,10 +36,13 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	gxlog "github.com/dubbogo/gost/log"
-	// trace: zipkin
+
 	"github.com/opentracing/opentracing-go"
+
 	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
+
 	"github.com/openzipkin/zipkin-go"
 	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
 )
diff --git a/openzipkin/go-server-b/pkg/user.go b/openzipkin/go-server-b/pkg/user.go
index aee528a..f1f841d 100644
--- a/openzipkin/go-server-b/pkg/user.go
+++ b/openzipkin/go-server-b/pkg/user.go
@@ -26,6 +26,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/openzipkin/go-server-b/tests/integration/main_test.go b/openzipkin/go-server-b/tests/integration/main_test.go
index 4a75f7a..b4a5139 100644
--- a/openzipkin/go-server-b/tests/integration/main_test.go
+++ b/openzipkin/go-server-b/tests/integration/main_test.go
@@ -28,11 +28,10 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go/config"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
diff --git a/registry/etcd/go-client/cmd/client.go b/registry/etcd/go-client/cmd/client.go
index 1a16c1a..99ca471 100644
--- a/registry/etcd/go-client/cmd/client.go
+++ b/registry/etcd/go-client/cmd/client.go
@@ -25,11 +25,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/registry/etcd/go-client/pkg"
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -38,6 +33,12 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/etcdv3"
 	_ "github.com/apache/dubbo-go/registry/protocol"
+
+	"github.com/dubbogo/gost/log"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/registry/etcd/go-client/pkg"
 )
 
 var userProvider = new(pkg.UserProvider)
diff --git a/registry/etcd/go-server/cmd/server.go b/registry/etcd/go-server/cmd/server.go
index 1d06639..5fa2e8c 100644
--- a/registry/etcd/go-server/cmd/server.go
+++ b/registry/etcd/go-server/cmd/server.go
@@ -27,8 +27,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/registry/etcd/go-server/pkg"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -40,6 +38,10 @@ import (
 	_ "github.com/apache/dubbo-go/registry/protocol"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/registry/etcd/go-server/pkg"
+)
+
 var (
 	survivalTimeout = int(3e9)
 )
diff --git a/registry/etcd/go-server/pkg/user.go b/registry/etcd/go-server/pkg/user.go
index 9920a59..b778495 100644
--- a/registry/etcd/go-server/pkg/user.go
+++ b/registry/etcd/go-server/pkg/user.go
@@ -23,12 +23,10 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
 )
 
 func init() {
diff --git a/registry/etcd/go-server/tests/integration/main_test.go b/registry/etcd/go-server/tests/integration/main_test.go
index 2611d11..b22e364 100644
--- a/registry/etcd/go-server/tests/integration/main_test.go
+++ b/registry/etcd/go-server/tests/integration/main_test.go
@@ -20,25 +20,24 @@
 package integration
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go/config"
+	"context"
+	"os"
+	"testing"
+	"time"
+)
 
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/etcdv3"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 )
 
-import (
-	"context"
-	"os"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/registry/etcd/go-server/tests/integration/userprovider_test.go b/registry/etcd/go-server/tests/integration/userprovider_test.go
index dc29d9a..7183e64 100644
--- a/registry/etcd/go-server/tests/integration/userprovider_test.go
+++ b/registry/etcd/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/registry/nacos/go-client/cmd/client.go b/registry/nacos/go-client/cmd/client.go
index 72037c3..c9e0117 100644
--- a/registry/nacos/go-client/cmd/client.go
+++ b/registry/nacos/go-client/cmd/client.go
@@ -25,11 +25,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/registry/nacos/go-client/pkg"
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -38,6 +33,12 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/nacos"
 	_ "github.com/apache/dubbo-go/registry/protocol"
+
+	"github.com/dubbogo/gost/log"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/registry/nacos/go-client/pkg"
 )
 
 var userProvider = new(pkg.UserProvider)
diff --git a/registry/nacos/go-server/pkg/user.go b/registry/nacos/go-server/pkg/user.go
index 9920a59..b778495 100644
--- a/registry/nacos/go-server/pkg/user.go
+++ b/registry/nacos/go-server/pkg/user.go
@@ -23,12 +23,10 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
 )
 
 func init() {
diff --git a/registry/nacos/go-server/tests/integration/main_test.go b/registry/nacos/go-server/tests/integration/main_test.go
index a6a81e4..eb1bc0c 100644
--- a/registry/nacos/go-server/tests/integration/main_test.go
+++ b/registry/nacos/go-server/tests/integration/main_test.go
@@ -20,25 +20,24 @@
 package integration
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go/config"
+	"context"
+	"os"
+	"testing"
+	"time"
+)
 
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/nacos"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 )
 
-import (
-	"context"
-	"os"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/registry/nacos/go-server/tests/integration/userprovider_test.go b/registry/nacos/go-server/tests/integration/userprovider_test.go
index dc29d9a..7183e64 100644
--- a/registry/nacos/go-server/tests/integration/userprovider_test.go
+++ b/registry/nacos/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/registry/servicediscovery/consul/go-client/cmd/client.go b/registry/servicediscovery/consul/go-client/cmd/client.go
index d9b46af..0be5b6c 100644
--- a/registry/servicediscovery/consul/go-client/cmd/client.go
+++ b/registry/servicediscovery/consul/go-client/cmd/client.go
@@ -27,30 +27,28 @@ import (
 )
 
 import (
-	"github.com/apache/dubbo-go-samples/registry/servicediscovery/consul/go-client/pkg/pojo"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
-	_ "github.com/apache/dubbo-go/protocol/dubbo"
-	_ "github.com/apache/dubbo-go/registry/protocol"
-
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
-
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
-
 	_ "github.com/apache/dubbo-go/metadata/mapping/dynamic"
 	_ "github.com/apache/dubbo-go/metadata/report/consul"
 	_ "github.com/apache/dubbo-go/metadata/service/remote"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/consul"
+	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/servicediscovery"
+
 	gxlog "github.com/dubbogo/gost/log"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/registry/servicediscovery/consul/go-client/pkg/pojo"
+)
+
 var (
 	survivalTimeout int = 10e9
 )
diff --git a/registry/servicediscovery/consul/go-server/cmd/server.go b/registry/servicediscovery/consul/go-server/cmd/server.go
index b3a571b..ffc5857 100644
--- a/registry/servicediscovery/consul/go-server/cmd/server.go
+++ b/registry/servicediscovery/consul/go-server/cmd/server.go
@@ -26,30 +26,27 @@ import (
 )
 
 import (
-	"github.com/apache/dubbo-go-samples/registry/servicediscovery/consul/go-server/pkg/pojo"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
-	"github.com/apache/dubbo-go/config"
-	_ "github.com/apache/dubbo-go/protocol/dubbo"
-	_ "github.com/apache/dubbo-go/protocol/jsonrpc"
-	_ "github.com/apache/dubbo-go/registry/protocol"
-
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
-
-	_ "github.com/apache/dubbo-go/registry/consul"
-
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/metadata/mapping/memory"
 	_ "github.com/apache/dubbo-go/metadata/report/consul"
 	_ "github.com/apache/dubbo-go/metadata/service/remote"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/protocol/jsonrpc"
+	_ "github.com/apache/dubbo-go/registry/consul"
+	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/servicediscovery"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/registry/servicediscovery/consul/go-server/pkg/pojo"
+)
+
 var (
 	survivalTimeout = int(3e9)
 )
diff --git a/registry/servicediscovery/consul/go-server/pkg/pojo/user.go b/registry/servicediscovery/consul/go-server/pkg/pojo/user.go
index e011f01..4e59463 100644
--- a/registry/servicediscovery/consul/go-server/pkg/pojo/user.go
+++ b/registry/servicediscovery/consul/go-server/pkg/pojo/user.go
@@ -24,9 +24,7 @@ import (
 
 import (
 	"github.com/apache/dubbo-go/config"
-)
 
-import (
 	gxlog "github.com/dubbogo/gost/log"
 )
 
diff --git a/registry/servicediscovery/consul/go-server/tests/integration/main_test.go b/registry/servicediscovery/consul/go-server/tests/integration/main_test.go
index 1c6a64b..88a7662 100644
--- a/registry/servicediscovery/consul/go-server/tests/integration/main_test.go
+++ b/registry/servicediscovery/consul/go-server/tests/integration/main_test.go
@@ -28,7 +28,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
diff --git a/registry/servicediscovery/consul/go-server/tests/integration/userprovider_test.go b/registry/servicediscovery/consul/go-server/tests/integration/userprovider_test.go
index dc29d9a..7183e64 100644
--- a/registry/servicediscovery/consul/go-server/tests/integration/userprovider_test.go
+++ b/registry/servicediscovery/consul/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/registry/servicediscovery/etcd/go-client/cmd/client.go b/registry/servicediscovery/etcd/go-client/cmd/client.go
index bb167d8..021c58f 100644
--- a/registry/servicediscovery/etcd/go-client/cmd/client.go
+++ b/registry/servicediscovery/etcd/go-client/cmd/client.go
@@ -25,12 +25,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/dubbogo/gost/log"
-)
-
-import (
-	"github.com/apache/dubbo-go-samples/registry/servicediscovery/etcd/go-client/pkg"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -44,6 +38,12 @@ import (
 	_ "github.com/apache/dubbo-go/registry/etcdv3"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/servicediscovery"
+
+	"github.com/dubbogo/gost/log"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/registry/servicediscovery/etcd/go-client/pkg"
 )
 
 var userProvider = new(pkg.UserProvider)
diff --git a/registry/servicediscovery/etcd/go-server/cmd/server.go b/registry/servicediscovery/etcd/go-server/cmd/server.go
index 0c7ae04..07bee9f 100644
--- a/registry/servicediscovery/etcd/go-server/cmd/server.go
+++ b/registry/servicediscovery/etcd/go-server/cmd/server.go
@@ -27,8 +27,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/registry/servicediscovery/etcd/go-server/pkg"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -45,6 +43,10 @@ import (
 	_ "github.com/apache/dubbo-go/registry/servicediscovery"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/registry/servicediscovery/etcd/go-server/pkg"
+)
+
 var (
 	survivalTimeout = int(3e9)
 )
diff --git a/registry/servicediscovery/etcd/go-server/pkg/user.go b/registry/servicediscovery/etcd/go-server/pkg/user.go
index 9920a59..b778495 100644
--- a/registry/servicediscovery/etcd/go-server/pkg/user.go
+++ b/registry/servicediscovery/etcd/go-server/pkg/user.go
@@ -23,12 +23,10 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
 )
 
 func init() {
diff --git a/registry/servicediscovery/etcd/go-server/tests/integration/main_test.go b/registry/servicediscovery/etcd/go-server/tests/integration/main_test.go
index 90d99a4..6f4c991 100644
--- a/registry/servicediscovery/etcd/go-server/tests/integration/main_test.go
+++ b/registry/servicediscovery/etcd/go-server/tests/integration/main_test.go
@@ -20,8 +20,14 @@
 package integration
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
+	"context"
+	"os"
+	"testing"
+	"time"
+)
 
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -37,13 +43,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/servicediscovery"
 )
 
-import (
-	"context"
-	"os"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/registry/servicediscovery/etcd/go-server/tests/integration/userprovider_test.go b/registry/servicediscovery/etcd/go-server/tests/integration/userprovider_test.go
index dc29d9a..7183e64 100644
--- a/registry/servicediscovery/etcd/go-server/tests/integration/userprovider_test.go
+++ b/registry/servicediscovery/etcd/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/registry/servicediscovery/file/go-client/cmd/client.go b/registry/servicediscovery/file/go-client/cmd/client.go
index b6f37a9..de86cd6 100644
--- a/registry/servicediscovery/file/go-client/cmd/client.go
+++ b/registry/servicediscovery/file/go-client/cmd/client.go
@@ -25,12 +25,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/dubbogo/gost/log"
-)
-
-import (
-	"github.com/apache/dubbo-go-samples/registry/servicediscovery/file/go-client/pkg"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -43,6 +37,12 @@ import (
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/servicediscovery"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
+	"github.com/dubbogo/gost/log"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/registry/servicediscovery/file/go-client/pkg"
 )
 
 var userProvider = new(pkg.UserProvider)
diff --git a/registry/servicediscovery/file/go-server/cmd/server.go b/registry/servicediscovery/file/go-server/cmd/server.go
index 6c2b0b5..2e8eb8f 100644
--- a/registry/servicediscovery/file/go-server/cmd/server.go
+++ b/registry/servicediscovery/file/go-server/cmd/server.go
@@ -27,8 +27,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/registry/servicediscovery/file/go-server/pkg"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -45,6 +43,10 @@ import (
 	_ "github.com/apache/dubbo-go/registry/servicediscovery"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/registry/servicediscovery/file/go-server/pkg"
+)
+
 var (
 	survivalTimeout = int(3e9)
 )
diff --git a/registry/servicediscovery/file/go-server/pkg/user.go b/registry/servicediscovery/file/go-server/pkg/user.go
index 9920a59..b778495 100644
--- a/registry/servicediscovery/file/go-server/pkg/user.go
+++ b/registry/servicediscovery/file/go-server/pkg/user.go
@@ -23,12 +23,10 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
 )
 
 func init() {
diff --git a/registry/servicediscovery/file/go-server/tests/integration/main_test.go b/registry/servicediscovery/file/go-server/tests/integration/main_test.go
index feb6fe2..506ffba 100644
--- a/registry/servicediscovery/file/go-server/tests/integration/main_test.go
+++ b/registry/servicediscovery/file/go-server/tests/integration/main_test.go
@@ -20,8 +20,14 @@
 package integration
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
+	"context"
+	"os"
+	"testing"
+	"time"
+)
 
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -36,13 +42,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/servicediscovery"
 )
 
-import (
-	"context"
-	"os"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/registry/servicediscovery/file/go-server/tests/integration/userprovider_test.go b/registry/servicediscovery/file/go-server/tests/integration/userprovider_test.go
index dc29d9a..7183e64 100644
--- a/registry/servicediscovery/file/go-server/tests/integration/userprovider_test.go
+++ b/registry/servicediscovery/file/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/registry/servicediscovery/nacos/go-client/cmd/client.go b/registry/servicediscovery/nacos/go-client/cmd/client.go
index 8440c16..a49aef9 100644
--- a/registry/servicediscovery/nacos/go-client/cmd/client.go
+++ b/registry/servicediscovery/nacos/go-client/cmd/client.go
@@ -25,12 +25,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/dubbogo/gost/log"
-)
-
-import (
-	"github.com/apache/dubbo-go-samples/registry/servicediscovery/etcd/go-client/pkg"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -45,6 +39,12 @@ import (
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/servicediscovery"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
+	"github.com/dubbogo/gost/log"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/registry/servicediscovery/etcd/go-client/pkg"
 )
 
 var userProvider = new(pkg.UserProvider)
diff --git a/registry/servicediscovery/nacos/go-server/cmd/server.go b/registry/servicediscovery/nacos/go-server/cmd/server.go
index 4084ab5..2a1e71d 100644
--- a/registry/servicediscovery/nacos/go-server/cmd/server.go
+++ b/registry/servicediscovery/nacos/go-server/cmd/server.go
@@ -27,8 +27,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/registry/servicediscovery/nacos/go-server/pkg"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -46,6 +44,10 @@ import (
 	_ "github.com/apache/dubbo-go/registry/servicediscovery"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/registry/servicediscovery/nacos/go-server/pkg"
+)
+
 var (
 	survivalTimeout = int(3e9)
 )
diff --git a/registry/servicediscovery/nacos/go-server/pkg/user.go b/registry/servicediscovery/nacos/go-server/pkg/user.go
index 9920a59..b778495 100644
--- a/registry/servicediscovery/nacos/go-server/pkg/user.go
+++ b/registry/servicediscovery/nacos/go-server/pkg/user.go
@@ -23,12 +23,10 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
 )
 
 func init() {
diff --git a/registry/servicediscovery/nacos/go-server/tests/integration/main_test.go b/registry/servicediscovery/nacos/go-server/tests/integration/main_test.go
index cdc8b96..89acd08 100644
--- a/registry/servicediscovery/nacos/go-server/tests/integration/main_test.go
+++ b/registry/servicediscovery/nacos/go-server/tests/integration/main_test.go
@@ -20,8 +20,14 @@
 package integration
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
+	"context"
+	"os"
+	"testing"
+	"time"
+)
 
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -38,13 +44,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import (
-	"context"
-	"os"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/registry/servicediscovery/nacos/go-server/tests/integration/userprovider_test.go b/registry/servicediscovery/nacos/go-server/tests/integration/userprovider_test.go
index dc29d9a..7183e64 100644
--- a/registry/servicediscovery/nacos/go-server/tests/integration/userprovider_test.go
+++ b/registry/servicediscovery/nacos/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/registry/servicediscovery/zookeeper/go-client/cmd/client.go b/registry/servicediscovery/zookeeper/go-client/cmd/client.go
index 9f82758..8088f8f 100644
--- a/registry/servicediscovery/zookeeper/go-client/cmd/client.go
+++ b/registry/servicediscovery/zookeeper/go-client/cmd/client.go
@@ -25,12 +25,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/dubbogo/gost/log"
-)
-
-import (
-	"github.com/apache/dubbo-go-samples/registry/servicediscovery/zookeeper/go-client/pkg"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -43,6 +37,12 @@ import (
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/servicediscovery"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
+	"github.com/dubbogo/gost/log"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/registry/servicediscovery/zookeeper/go-client/pkg"
 )
 
 var userProvider = new(pkg.UserProvider)
diff --git a/registry/servicediscovery/zookeeper/go-server/cmd/server.go b/registry/servicediscovery/zookeeper/go-server/cmd/server.go
index 80fe85c..0124682 100644
--- a/registry/servicediscovery/zookeeper/go-server/cmd/server.go
+++ b/registry/servicediscovery/zookeeper/go-server/cmd/server.go
@@ -27,8 +27,6 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/apache/dubbo-go-samples/registry/servicediscovery/zookeeper/go-server/pkg"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -45,6 +43,10 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
+import (
+	"github.com/apache/dubbo-go-samples/registry/servicediscovery/zookeeper/go-server/pkg"
+)
+
 var (
 	survivalTimeout = int(3e9)
 )
diff --git a/registry/servicediscovery/zookeeper/go-server/pkg/user.go b/registry/servicediscovery/zookeeper/go-server/pkg/user.go
index 9920a59..b778495 100644
--- a/registry/servicediscovery/zookeeper/go-server/pkg/user.go
+++ b/registry/servicediscovery/zookeeper/go-server/pkg/user.go
@@ -23,12 +23,10 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
 )
 
 func init() {
diff --git a/registry/servicediscovery/zookeeper/go-server/tests/integration/main_test.go b/registry/servicediscovery/zookeeper/go-server/tests/integration/main_test.go
index fa94ebc..0486cc7 100644
--- a/registry/servicediscovery/zookeeper/go-server/tests/integration/main_test.go
+++ b/registry/servicediscovery/zookeeper/go-server/tests/integration/main_test.go
@@ -20,17 +20,21 @@
 package integration
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
+	"context"
+	"os"
+	"testing"
+	"time"
+)
 
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/filter/filter_impl"
-	//_ "github.com/apache/dubbo-go/metadata/mapping/dynamic"
 	_ "github.com/apache/dubbo-go/metadata/mapping/memory"
 	_ "github.com/apache/dubbo-go/metadata/report/zookeeper"
-	//_ "github.com/apache/dubbo-go/metadata/service/remote"
 	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
@@ -38,13 +42,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import (
-	"context"
-	"os"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/registry/servicediscovery/zookeeper/go-server/tests/integration/userprovider_test.go b/registry/servicediscovery/zookeeper/go-server/tests/integration/userprovider_test.go
index dc29d9a..7183e64 100644
--- a/registry/servicediscovery/zookeeper/go-server/tests/integration/userprovider_test.go
+++ b/registry/servicediscovery/zookeeper/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/router/condition/go-client/cmd/client.go b/router/condition/go-client/cmd/client.go
index 4f9e495..f6d1773 100644
--- a/router/condition/go-client/cmd/client.go
+++ b/router/condition/go-client/cmd/client.go
@@ -33,6 +33,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
@@ -40,8 +41,6 @@ import (
 	"github.com/apache/dubbo-go-samples/router/condition/go-client/pkg"
 )
 
-// need to setup environment variable "CONF_CONSUMER_FILE_PATH" to "conf/client.yml" before run
-// need to setup environment variable "CONF_ROUTER_FILE_PATH" to "conf/router_config.yml" before run
 func main() {
 	userProvider := new(pkg.UserProvider)
 	config.SetConsumerService(userProvider)
diff --git a/router/condition/go-server/tests/integration/main_test.go b/router/condition/go-server/tests/integration/main_test.go
index 758cc00..9279543 100644
--- a/router/condition/go-server/tests/integration/main_test.go
+++ b/router/condition/go-server/tests/integration/main_test.go
@@ -20,8 +20,14 @@
 package integration
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
+	"context"
+	"os"
+	"testing"
+	"time"
+)
 
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/cluster/router/condition"
@@ -33,13 +39,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import (
-	"context"
-	"os"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/router/condition/go-server/tests/integration/userprovider_test.go b/router/condition/go-server/tests/integration/userprovider_test.go
index 05c607f..f4c030c 100644
--- a/router/condition/go-server/tests/integration/userprovider_test.go
+++ b/router/condition/go-server/tests/integration/userprovider_test.go
@@ -23,6 +23,7 @@ import (
 	"context"
 	"testing"
 )
+
 import (
 	"github.com/stretchr/testify/assert"
 )
diff --git a/router/tag/go-client/cmd/client.go b/router/tag/go-client/cmd/client.go
index 1586ec9..bee40d1 100644
--- a/router/tag/go-client/cmd/client.go
+++ b/router/tag/go-client/cmd/client.go
@@ -41,6 +41,7 @@ import (
 	_ "github.com/apache/dubbo-go/registry/directory"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	gxlog "github.com/dubbogo/gost/log"
 )
 
diff --git a/router/tag/go-server/tests/integration/main_test.go b/router/tag/go-server/tests/integration/main_test.go
index 8d37927..1ec5da9 100644
--- a/router/tag/go-server/tests/integration/main_test.go
+++ b/router/tag/go-server/tests/integration/main_test.go
@@ -20,6 +20,13 @@
 package integration
 
 import (
+	"context"
+	"os"
+	"testing"
+	"time"
+)
+
+import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
@@ -32,13 +39,6 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
-import (
-	"context"
-	"os"
-	"testing"
-	"time"
-)
-
 var userProvider = new(UserProvider)
 
 func TestMain(m *testing.M) {
diff --git a/router/tag/go-server/tests/integration/userprovider_test.go b/router/tag/go-server/tests/integration/userprovider_test.go
index 863c533..e4dbb83 100644
--- a/router/tag/go-server/tests/integration/userprovider_test.go
+++ b/router/tag/go-server/tests/integration/userprovider_test.go
@@ -26,6 +26,7 @@ import (
 
 import (
 	"github.com/apache/dubbo-go/common/constant"
+
 	"github.com/stretchr/testify/assert"
 )
 
diff --git a/seata/client/app/client.go b/seata/client/app/client.go
index 451fdbf..2a7809e 100644
--- a/seata/client/app/client.go
+++ b/seata/client/app/client.go
@@ -27,24 +27,23 @@ import (
 )
 
 import (
-	"github.com/apache/dubbo-go-samples/seata/client/app/svc"
-)
-
-import (
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/transaction-wg/seata-golang/pkg/client"
 	config2 "github.com/transaction-wg/seata-golang/pkg/client/config"
 	"github.com/transaction-wg/seata-golang/pkg/client/tm"
+)
 
-	_ "github.com/apache/dubbo-go/filter/filter_impl"
-
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
-	_ "github.com/apache/dubbo-go/registry/zookeeper"
+import (
+	"github.com/apache/dubbo-go-samples/seata/client/app/svc"
 )
 
 const (
diff --git a/seata/client/app/svc/svc.go b/seata/client/app/svc/svc.go
index 5a53342..8d219d1 100644
--- a/seata/client/app/svc/svc.go
+++ b/seata/client/app/svc/svc.go
@@ -25,6 +25,7 @@ import (
 import (
 	"github.com/apache/dubbo-go/common/constant"
 	"github.com/apache/dubbo-go/config"
+
 	context2 "github.com/transaction-wg/seata-golang/pkg/client/context"
 	"github.com/transaction-wg/seata-golang/pkg/client/tm"
 )
diff --git a/seata/order-svc/app/dao/dao.go b/seata/order-svc/app/dao/dao.go
index a216fae..ece4584 100644
--- a/seata/order-svc/app/dao/dao.go
+++ b/seata/order-svc/app/dao/dao.go
@@ -18,15 +18,14 @@
 package dao
 
 import (
-	hessian "github.com/apache/dubbo-go-hessian2"
 	"time"
 )
 
 import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+
 	"github.com/bwmarrin/snowflake"
-)
 
-import (
 	"github.com/transaction-wg/seata-golang/pkg/client/at/exec"
 	"github.com/transaction-wg/seata-golang/pkg/client/context"
 )
diff --git a/seata/order-svc/app/order_svc.go b/seata/order-svc/app/order_svc.go
index 1cbc4bc..100136d 100644
--- a/seata/order-svc/app/order_svc.go
+++ b/seata/order-svc/app/order_svc.go
@@ -23,6 +23,7 @@ import (
 
 import (
 	"github.com/apache/dubbo-go/common/constant"
+
 	context2 "github.com/transaction-wg/seata-golang/pkg/client/context"
 )
 
diff --git a/seata/order-svc/app/server.go b/seata/order-svc/app/server.go
index c45c1a1..95b71b0 100644
--- a/seata/order-svc/app/server.go
+++ b/seata/order-svc/app/server.go
@@ -27,24 +27,23 @@ import (
 )
 
 import (
-	dao2 "github.com/apache/dubbo-go-samples/seata/order-svc/app/dao"
-)
-
-import (
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/transaction-wg/seata-golang/pkg/client"
 	"github.com/transaction-wg/seata-golang/pkg/client/at/exec"
 	config2 "github.com/transaction-wg/seata-golang/pkg/client/config"
+)
 
-	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
-	_ "github.com/apache/dubbo-go/filter/filter_impl"
-
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
-	_ "github.com/apache/dubbo-go/registry/zookeeper"
+import (
+	dao2 "github.com/apache/dubbo-go-samples/seata/order-svc/app/dao"
 )
 
 const (
diff --git a/seata/product-svc/app/dao/dao.go b/seata/product-svc/app/dao/dao.go
index 5e5fe4f..a9f5e89 100644
--- a/seata/product-svc/app/dao/dao.go
+++ b/seata/product-svc/app/dao/dao.go
@@ -19,6 +19,7 @@ package dao
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
+
 	"github.com/transaction-wg/seata-golang/pkg/client/at/exec"
 	"github.com/transaction-wg/seata-golang/pkg/client/context"
 )
diff --git a/seata/product-svc/app/product_svc.go b/seata/product-svc/app/product_svc.go
index 9d97211..d32c518 100644
--- a/seata/product-svc/app/product_svc.go
+++ b/seata/product-svc/app/product_svc.go
@@ -23,6 +23,7 @@ import (
 
 import (
 	"github.com/apache/dubbo-go/common/constant"
+
 	context2 "github.com/transaction-wg/seata-golang/pkg/client/context"
 )
 
diff --git a/seata/product-svc/app/server.go b/seata/product-svc/app/server.go
index f39b1ac..68db9be 100644
--- a/seata/product-svc/app/server.go
+++ b/seata/product-svc/app/server.go
@@ -27,24 +27,23 @@ import (
 )
 
 import (
-	dao2 "github.com/apache/dubbo-go-samples/seata/product-svc/app/dao"
-)
-
-import (
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/transaction-wg/seata-golang/pkg/client"
 	"github.com/transaction-wg/seata-golang/pkg/client/at/exec"
 	config2 "github.com/transaction-wg/seata-golang/pkg/client/config"
+)
 
-	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
-	_ "github.com/apache/dubbo-go/filter/filter_impl"
-
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
-	_ "github.com/apache/dubbo-go/registry/zookeeper"
+import (
+	dao2 "github.com/apache/dubbo-go-samples/seata/product-svc/app/dao"
 )
 
 const (
diff --git a/shopping-order/go-client/cmd/client.go b/shopping-order/go-client/cmd/client.go
index 7486877..f5e10e0 100644
--- a/shopping-order/go-client/cmd/client.go
+++ b/shopping-order/go-client/cmd/client.go
@@ -36,6 +36,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/transaction-wg/seata-golang/pkg/client"
 	seataConfig "github.com/transaction-wg/seata-golang/pkg/client/config"
 	"github.com/transaction-wg/seata-golang/pkg/client/tm"
diff --git a/shopping-order/go-client/pkg/svc.go b/shopping-order/go-client/pkg/svc.go
index 2f8d9ae..1dcba91 100644
--- a/shopping-order/go-client/pkg/svc.go
+++ b/shopping-order/go-client/pkg/svc.go
@@ -25,6 +25,7 @@ import (
 import (
 	"github.com/apache/dubbo-go/common/constant"
 	"github.com/apache/dubbo-go/config"
+
 	seataContext "github.com/transaction-wg/seata-golang/pkg/client/context"
 	"github.com/transaction-wg/seata-golang/pkg/client/tm"
 )
diff --git a/shopping-order/go-server-order/cmd/order_svc.go b/shopping-order/go-server-order/cmd/order_svc.go
index 2eb6659..0521b08 100644
--- a/shopping-order/go-server-order/cmd/order_svc.go
+++ b/shopping-order/go-server-order/cmd/order_svc.go
@@ -23,6 +23,7 @@ import (
 
 import (
 	"github.com/apache/dubbo-go/common/constant"
+
 	"github.com/opentrx/mysql"
 )
 
diff --git a/shopping-order/go-server-order/cmd/server.go b/shopping-order/go-server-order/cmd/server.go
index 0feb02b..d45eb76 100644
--- a/shopping-order/go-server-order/cmd/server.go
+++ b/shopping-order/go-server-order/cmd/server.go
@@ -37,7 +37,9 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/nacos"
 	_ "github.com/apache/dubbo-go/registry/protocol"
+
 	"github.com/opentrx/mysql"
+
 	"github.com/transaction-wg/seata-golang/pkg/client"
 	seataConfig "github.com/transaction-wg/seata-golang/pkg/client/config"
 )
diff --git a/shopping-order/go-server-order/pkg/dao/dao.go b/shopping-order/go-server-order/pkg/dao/dao.go
index 99c9865..79f1272 100644
--- a/shopping-order/go-server-order/pkg/dao/dao.go
+++ b/shopping-order/go-server-order/pkg/dao/dao.go
@@ -25,6 +25,7 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
+
 	"github.com/bwmarrin/snowflake"
 )
 
diff --git a/shopping-order/go-server-product/cmd/product_svc.go b/shopping-order/go-server-product/cmd/product_svc.go
index 1b5e21e..03c659e 100644
--- a/shopping-order/go-server-product/cmd/product_svc.go
+++ b/shopping-order/go-server-product/cmd/product_svc.go
@@ -23,6 +23,7 @@ import (
 
 import (
 	"github.com/apache/dubbo-go/common/constant"
+
 	"github.com/opentrx/mysql"
 )
 
diff --git a/shopping-order/go-server-product/cmd/server.go b/shopping-order/go-server-product/cmd/server.go
index fa39efb..8b0607f 100644
--- a/shopping-order/go-server-product/cmd/server.go
+++ b/shopping-order/go-server-product/cmd/server.go
@@ -37,7 +37,9 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/nacos"
 	_ "github.com/apache/dubbo-go/registry/protocol"
+
 	"github.com/opentrx/mysql"
+
 	"github.com/transaction-wg/seata-golang/pkg/client"
 	seataConfig "github.com/transaction-wg/seata-golang/pkg/client/config"
 )
diff --git a/tls/go-client/cmd/client.go b/tls/go-client/cmd/client.go
index 9e97f6c..9ed5f7c 100755
--- a/tls/go-client/cmd/client.go
+++ b/tls/go-client/cmd/client.go
@@ -29,6 +29,7 @@ import (
 
 import (
 	getty "github.com/apache/dubbo-getty"
+
 	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
@@ -39,6 +40,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	gxlog "github.com/dubbogo/gost/log"
 )
 
@@ -103,4 +105,4 @@ func initSignal() {
 			return
 		}
 	}
-}
\ No newline at end of file
+}
diff --git a/tls/go-server/cmd/server.go b/tls/go-server/cmd/server.go
index 9f59211..7325b19 100755
--- a/tls/go-server/cmd/server.go
+++ b/tls/go-server/cmd/server.go
@@ -28,6 +28,7 @@ import (
 
 import (
 	getty "github.com/apache/dubbo-getty"
+
 	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
@@ -44,7 +45,6 @@ import (
 	"github.com/apache/dubbo-go-samples/tls/go-server/pkg"
 )
 
-// survival time
 var (
 	survivalTimeout = 	int(3e9)
 )
@@ -96,4 +96,4 @@ func initSignal() {
 			return
 		}
 	}
-}
\ No newline at end of file
+}
diff --git a/tls/go-server/pkg/user.go b/tls/go-server/pkg/user.go
index e295a11..936eabb 100755
--- a/tls/go-server/pkg/user.go
+++ b/tls/go-server/pkg/user.go
@@ -49,4 +49,4 @@ func (u *UserProvider) Reference() string {
 
 func (u User) JavaClassName() string {
 	return "org.apache.dubbo.User"
-}
\ No newline at end of file
+}
diff --git a/tls/go-server/tests/integration/main_test.go b/tls/go-server/tests/integration/main_test.go
index 5abb8f7..89d1c93 100644
--- a/tls/go-server/tests/integration/main_test.go
+++ b/tls/go-server/tests/integration/main_test.go
@@ -29,6 +29,7 @@ import (
 
 import (
 	getty "github.com/apache/dubbo-getty"
+
 	hessian "github.com/apache/dubbo-go-hessian2"
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
diff --git a/tracing/dubbo/go-client/app/client.go b/tracing/dubbo/go-client/app/client.go
index 1e739f6..e6c9edf 100644
--- a/tracing/dubbo/go-client/app/client.go
+++ b/tracing/dubbo/go-client/app/client.go
@@ -28,25 +28,24 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/dubbogo/gost/log"
-	"github.com/opentracing/opentracing-go"
-	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
-	"github.com/openzipkin/zipkin-go"
-	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
-)
-
-import (
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
 
-	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	"github.com/dubbogo/gost/log"
 
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
-	_ "github.com/apache/dubbo-go/registry/zookeeper"
+	"github.com/opentracing/opentracing-go"
+
+	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
+
+	"github.com/openzipkin/zipkin-go"
+	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
 )
 
 var (
diff --git a/tracing/dubbo/go-server/app/server.go b/tracing/dubbo/go-server/app/server.go
index eada598..9b5444d 100644
--- a/tracing/dubbo/go-server/app/server.go
+++ b/tracing/dubbo/go-server/app/server.go
@@ -27,24 +27,22 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
-	"github.com/opentracing/opentracing-go"
-	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
-	"github.com/openzipkin/zipkin-go"
-	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
-)
-
-import (
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
 
-	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
-	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	"github.com/opentracing/opentracing-go"
 
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
-	_ "github.com/apache/dubbo-go/registry/zookeeper"
+	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
+
+	"github.com/openzipkin/zipkin-go"
+	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
 )
 
 var (
diff --git a/tracing/dubbo/go-server/app/user.go b/tracing/dubbo/go-server/app/user.go
index a96d42e..3745caa 100644
--- a/tracing/dubbo/go-server/app/user.go
+++ b/tracing/dubbo/go-server/app/user.go
@@ -23,13 +23,12 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-	"github.com/opentracing/opentracing-go"
-)
-
-import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
+	"github.com/dubbogo/gost/log"
+
+	"github.com/opentracing/opentracing-go"
 )
 
 func init() {
diff --git a/tracing/grpc/go-client/app/client.go b/tracing/grpc/go-client/app/client.go
index e433d53..a928c3a 100644
--- a/tracing/grpc/go-client/app/client.go
+++ b/tracing/grpc/go-client/app/client.go
@@ -27,12 +27,6 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-	opentracing "github.com/opentracing/opentracing-go"
-	jaegercfg "github.com/uber/jaeger-client-go/config"
-)
-
-import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
@@ -43,6 +37,12 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/grpc"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
+	"github.com/dubbogo/gost/log"
+
+	opentracing "github.com/opentracing/opentracing-go"
+
+	jaegercfg "github.com/uber/jaeger-client-go/config"
 )
 
 var (
diff --git a/tracing/grpc/go-client/app/hello.go b/tracing/grpc/go-client/app/hello.go
index f3e6a8f..b4c859a 100644
--- a/tracing/grpc/go-client/app/hello.go
+++ b/tracing/grpc/go-client/app/hello.go
@@ -22,11 +22,9 @@ import (
 )
 
 import (
-	"google.golang.org/grpc"
-)
-
-import (
 	"github.com/apache/dubbo-go/config"
+
+	"google.golang.org/grpc"
 )
 
 var grpcGreeterImpl = new(GrpcGreeterImpl)
diff --git a/tracing/grpc/go-client/app/helloworld.pb.go b/tracing/grpc/go-client/app/helloworld.pb.go
index 75e18b9..1b54125 100644
--- a/tracing/grpc/go-client/app/helloworld.pb.go
+++ b/tracing/grpc/go-client/app/helloworld.pb.go
@@ -7,20 +7,21 @@ import (
 	"context"
 	"fmt"
 	"math"
-
-	"github.com/golang/protobuf/proto"
-	"google.golang.org/grpc"
-	"google.golang.org/grpc/codes"
-	"google.golang.org/grpc/status"
 )
 
 import (
 	"github.com/apache/dubbo-go/protocol"
 	dgrpc "github.com/apache/dubbo-go/protocol/grpc"
 	"github.com/apache/dubbo-go/protocol/invocation"
+
+	"github.com/golang/protobuf/proto"
+
+	"google.golang.org/grpc"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/codes"
+	"google.golang.org/grpc/status"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
 var _ = fmt.Errorf
 var _ = math.Inf
diff --git a/tracing/grpc/go-server/app/helloworld.pb.go b/tracing/grpc/go-server/app/helloworld.pb.go
index 75e18b9..3b5a1dd 100644
--- a/tracing/grpc/go-server/app/helloworld.pb.go
+++ b/tracing/grpc/go-server/app/helloworld.pb.go
@@ -7,20 +7,20 @@ import (
 	"context"
 	"fmt"
 	"math"
-
-	"github.com/golang/protobuf/proto"
-	"google.golang.org/grpc"
-	"google.golang.org/grpc/codes"
-	"google.golang.org/grpc/status"
 )
 
 import (
 	"github.com/apache/dubbo-go/protocol"
 	dgrpc "github.com/apache/dubbo-go/protocol/grpc"
 	"github.com/apache/dubbo-go/protocol/invocation"
+
+	"github.com/golang/protobuf/proto"
+
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/codes"
+	"google.golang.org/grpc/status"
 )
 
-// Reference imports to suppress errors if they are not otherwise used.
 var _ = proto.Marshal
 var _ = fmt.Errorf
 var _ = math.Inf
diff --git a/tracing/grpc/go-server/app/server.go b/tracing/grpc/go-server/app/server.go
index 5abdce4..f922f79 100644
--- a/tracing/grpc/go-server/app/server.go
+++ b/tracing/grpc/go-server/app/server.go
@@ -37,6 +37,7 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 
 	opentracing "github.com/opentracing/opentracing-go"
+
 	jaegercfg "github.com/uber/jaeger-client-go/config"
 )
 
diff --git a/tracing/jsonrpc/go-client/app/client.go b/tracing/jsonrpc/go-client/app/client.go
index 4974ec5..3052740 100644
--- a/tracing/jsonrpc/go-client/app/client.go
+++ b/tracing/jsonrpc/go-client/app/client.go
@@ -27,25 +27,24 @@ import (
 )
 
 import (
-	"github.com/dubbogo/gost/log"
-	"github.com/opentracing/opentracing-go"
-	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
-	"github.com/openzipkin/zipkin-go"
-	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
-)
-
-import (
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/jsonrpc"
 	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
 
-	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	"github.com/dubbogo/gost/log"
 
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
-	_ "github.com/apache/dubbo-go/registry/zookeeper"
+	"github.com/opentracing/opentracing-go"
+
+	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
+
+	"github.com/openzipkin/zipkin-go"
+	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
 )
 
 var (
diff --git a/tracing/jsonrpc/go-server/app/server.go b/tracing/jsonrpc/go-server/app/server.go
index 90f6042..caae38f 100644
--- a/tracing/jsonrpc/go-server/app/server.go
+++ b/tracing/jsonrpc/go-server/app/server.go
@@ -26,24 +26,22 @@ import (
 )
 
 import (
-	"github.com/opentracing/opentracing-go"
-	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
-	"github.com/openzipkin/zipkin-go"
-	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
-)
-
-import (
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
 	_ "github.com/apache/dubbo-go/protocol/jsonrpc"
 	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
 
-	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	"github.com/opentracing/opentracing-go"
 
-	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	_ "github.com/apache/dubbo-go/cluster/loadbalance"
-	_ "github.com/apache/dubbo-go/registry/zookeeper"
+	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
+
+	"github.com/openzipkin/zipkin-go"
+	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
 )
 
 var (
diff --git a/tracing/jsonrpc/go-server/app/user_provider.go b/tracing/jsonrpc/go-server/app/user_provider.go
index cb6a60e..211473e 100644
--- a/tracing/jsonrpc/go-server/app/user_provider.go
+++ b/tracing/jsonrpc/go-server/app/user_provider.go
@@ -8,12 +8,12 @@ import (
 )
 
 import (
+	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
+
 	"github.com/opentracing/opentracing-go"
-)
 
-import (
-	"github.com/apache/dubbo-go/config"
 	perrors "github.com/pkg/errors"
 )
 
diff --git a/tracing/jsonrpc/go-server/app/user_provider1.go b/tracing/jsonrpc/go-server/app/user_provider1.go
index 4b7af5a..8007234 100644
--- a/tracing/jsonrpc/go-server/app/user_provider1.go
+++ b/tracing/jsonrpc/go-server/app/user_provider1.go
@@ -7,11 +7,10 @@ import (
 )
 
 import (
+	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
-)
 
-import (
-	"github.com/apache/dubbo-go/config"
 	perrors "github.com/pkg/errors"
 )
 
diff --git a/tracing/jsonrpc/go-server/app/user_provider2.go b/tracing/jsonrpc/go-server/app/user_provider2.go
index a5f9766..1726574 100644
--- a/tracing/jsonrpc/go-server/app/user_provider2.go
+++ b/tracing/jsonrpc/go-server/app/user_provider2.go
@@ -7,12 +7,11 @@ import (
 )
 
 import (
+	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
-	perrors "github.com/pkg/errors"
-)
 
-import (
-	"github.com/apache/dubbo-go/config"
+	perrors "github.com/pkg/errors"
 )
 
 func init() {
diff --git a/version/go-client/cmd/client.go b/version/go-client/cmd/client.go
index a01094f..fb697de 100644
--- a/version/go-client/cmd/client.go
+++ b/version/go-client/cmd/client.go
@@ -33,6 +33,7 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/dubbo"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/version/go-server-v1/pkg/user.go b/version/go-server-v1/pkg/user.go
index 26f1017..cd1ad81 100644
--- a/version/go-server-v1/pkg/user.go
+++ b/version/go-server-v1/pkg/user.go
@@ -24,6 +24,7 @@ import (
 
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/version/go-server-v1/tests/integration/userprovider_test.go b/version/go-server-v1/tests/integration/userprovider_test.go
index 6f9dadd..b38dcdb 100644
--- a/version/go-server-v1/tests/integration/userprovider_test.go
+++ b/version/go-server-v1/tests/integration/userprovider_test.go
@@ -28,7 +28,6 @@ import (
 	"github.com/stretchr/testify/assert"
 )
 
-// in conf/client.yaml
 func TestGetUser(t *testing.T) {
 	user := &User{}
 	err := userProvider.GetUser(context.TODO(), []interface{}{"A001"}, user)
diff --git a/version/go-server-v2/pkg/user.go b/version/go-server-v2/pkg/user.go
index f2d6ff6..8560a48 100644
--- a/version/go-server-v2/pkg/user.go
+++ b/version/go-server-v2/pkg/user.go
@@ -25,6 +25,7 @@ import (
 import (
 	hessian "github.com/apache/dubbo-go-hessian2"
 	"github.com/apache/dubbo-go/config"
+
 	"github.com/dubbogo/gost/log"
 )
 
diff --git a/version/go-server-v2/tests/integration/userprovider_test.go b/version/go-server-v2/tests/integration/userprovider_test.go
index a5d8154..fb83b01 100644
--- a/version/go-server-v2/tests/integration/userprovider_test.go
+++ b/version/go-server-v2/tests/integration/userprovider_test.go
@@ -28,7 +28,6 @@ import (
 	"github.com/stretchr/testify/assert"
 )
 
-// in conf/client.yaml
 func TestGetUser(t *testing.T) {
 	user := &User{}
 	err := userProvider.GetUser(context.TODO(), []interface{}{"A001"}, user)

[dubbo-go-samples] 02/12: add: game api (#111)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit d3073eb3ba8181b48bbfc26adfb5b102c88d1548
Author: 氕氘氚 <cj...@163.com>
AuthorDate: Sun May 16 22:30:01 2021 +0800

    add: game api (#111)
    
    * add login
    
    * add base api
    
    * del env
    
    * add test
    
    Co-authored-by: 氕氘氚 <ch...@bilibili.com>
---
 game/README.md                                     | 78 +++++++++++++------
 game/README_zh.md                                  | 80 ++++++++++++++------
 game/go-server-game/pkg/provider.go                | 87 +++++++++++++++++++---
 .../tests/integration/gameprovider_test.go         | 14 ++--
 game/go-server-gate/cmd/server.go                  | 58 +++++++++------
 game/go-server-gate/pkg/consumer.go                | 15 ++--
 game/pkg/consumer/game/basketball.go               |  6 +-
 game/pkg/pojo/info.go                              | 10 +++
 game/website/css/style.css                         |  5 +-
 game/website/index.html                            |  9 ++-
 game/website/js/api.js                             | 64 ++++++++++++++++
 game/website/js/index.js                           | 46 ++++++++++--
 12 files changed, 365 insertions(+), 107 deletions(-)

diff --git a/game/README.md b/game/README.md
index 8955e7a..18e6389 100644
--- a/game/README.md
+++ b/game/README.md
@@ -53,15 +53,15 @@ The server provides three services, message, online and offline. The code is as
 ```go
 type BasketballService struct{}
 
-func (p *BasketballService) Online(...) (...) {
+func Login(ctx context.Context, data string) (*pojo.Result, error) {
     ...
 }
 
-func (p *BasketballService) Offline(...) (...) {
+func Score(ctx context.Context, uid, score string) (*pojo.Result, error) {
     ...
 }
 
-func (p *BasketballService) Message(...) (...) {
+func Rank (ctx context.Context, uid string) (*pojo.Result, error) {
     ...
 }
 
@@ -175,23 +175,23 @@ services:
         retries: 0
 ```
 
-#### consumer size
+#### consumer side
 
 The consumer side of the gate is relatively special. Because the consumer of the gate needs to call the service in the game, the consumer directly instantiates the service of a game, and its method directly uses the instantiated object gamebasketball to call, thus realizing the function of a gateway.
 
 ```go
 var GameBasketball = new(game.BasketballService)
 
-func Message(ctx context.Context, uid string, data string) (*pojo.Result, error) {
-    return GameBasketball.Message(ctx, uid, data)
+func Login(ctx context.Context, data string) (*pojo.Result, error) {
+    return GameBasketball.Login(ctx, data)
 }
 
-func Online(ctx context.Context, uid string) (*pojo.Result, error) {
-    return GameBasketball.Online(ctx, uid)
+func Score(ctx context.Context, uid, score string) (*pojo.Result, error) {
+    return GameBasketball.Score(ctx, uid, score)
 }
 
-func Offline(ctx context.Context, uid string) (*pojo.Result, error) {
-    return GameBasketball.Offline(ctx, uid)
+func Rank (ctx context.Context, uid string) (*pojo.Result, error) {
+    return GameBasketball.Rank(ctx, uid)
 }
 ```
 
@@ -224,45 +224,79 @@ references:
 
 ### HTTP access
 
-access message
+access login
 
-```http
-http://localhost:8000/message
+```bash
+curl --location --request GET 'http://127.0.0.1:8089/login?name=dubbogo'
 ```
 
 received
 
 ```json
-{"code":0,"data":{"message":"hello from game provider","to":"abc"}}
+{
+    "code": 0,
+    "msg": "dubbogo, your score is 0",
+    "data": {
+        "score": 0,
+        "to": "dubbogo"
+    }
+}
 ```
 
 
 
-access online
+access score
 
-```http
-http://localhost:8000/online
+```bash
+curl --location --request POST 'http://127.0.0.1:8089/score' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+    "name":"cjp",
+    "score":1
+}'
 ```
 
 received
 
 ```json
-{"code":0,"msg":"hello this is game provider"}
+{
+    "code": 0,
+    "msg": "dubbogo, your score is 0",
+    "data": {
+        "score": 0,
+        "to": "dubbogo"
+    }
+}
 ```
 
-access offline
+access rank
 
-```http
-http://localhost:8000/online
+```bash
+curl --location --request POST 'http://127.0.0.1:8089/rank?name=dubbogo'
 ```
 
 received
 
 ```json
-{"code":0,"msg":"hello this is game provider"}
+{
+    "code": 0,
+    "msg": "success",
+    "data": {
+        "rank": 3,
+        "to": "dubbogo"
+    }
+}
 ```
 
 It can be found that all HTTP requests are successfully forwarded to game, and the processed data is returned to gate by calling the send method of gate
 
+
+
+### Start the front end
+
+Switch to webside directory and open index.html (Chrome browser is recommended)
+
+![image-20210516173728198](http://cdn.cjpa.top/image-20210516173728198.png)
+
 Pls. refer to [HOWTO.md](../HOWTO.md) under the root directory to run this sample.
 
diff --git a/game/README_zh.md b/game/README_zh.md
index 7090305..1b4592d 100644
--- a/game/README_zh.md
+++ b/game/README_zh.md
@@ -48,20 +48,20 @@ game提供了basketball服务端,gate提供了http服务端。
 
 #### server端
 
-server 端提供三个服务,message、online 及 offline,代码如下,具体的实现可以在 'game/go-server-game/pkg/provider.go' 中看到
+server 端提供三个服务,Login、Score 及 Rank,代码如下,具体的实现可以在 'game/go-server-game/pkg/provider.go' 中看到
 
 ```go
 type BasketballService struct{}
 
-func (p *BasketballService) Online(...) (...) {
+func Login(ctx context.Context, data string) (*pojo.Result, error) {
     ...
 }
 
-func (p *BasketballService) Offline(...) (...) {
+func Score(ctx context.Context, uid, score string) (*pojo.Result, error) {
     ...
 }
 
-func (p *BasketballService) Message(...) (...) {
+func Rank (ctx context.Context, uid string) (*pojo.Result, error) {
     ...
 }
 
@@ -177,21 +177,21 @@ services:
 
 #### consumer端
 
-gate 中的 consumer 端比较特使,由于 gate的consumer 需要调用 game 中的 service,所以在gaet中,consumer 直接实例化一个game的service,其方法便直接使用实例化的对象 GameBasketball 调用,这样就实现了一个网关的功能。
+gate 中的 consumer 端比较特殊,由于 gate的consumer 需要调用 game 中的 service,所以在gaet中,consumer 直接实例化一个game的service,其方法便直接使用实例化的对象 GameBasketball 调用,这样就实现了一个网关的功能。
 
 ```go
 var GameBasketball = new(game.BasketballService)
 
-func Message(ctx context.Context, uid string, data string) (*pojo.Result, error) {
-    return GameBasketball.Message(ctx, uid, data)
+func Login(ctx context.Context, data string) (*pojo.Result, error) {
+    return GameBasketball.Login(ctx, data)
 }
 
-func Online(ctx context.Context, uid string) (*pojo.Result, error) {
-    return GameBasketball.Online(ctx, uid)
+func Score(ctx context.Context, uid, score string) (*pojo.Result, error) {
+    return GameBasketball.Score(ctx, uid, score)
 }
 
-func Offline(ctx context.Context, uid string) (*pojo.Result, error) {
-    return GameBasketball.Offline(ctx, uid)
+func Rank (ctx context.Context, uid string) (*pojo.Result, error) {
+    return GameBasketball.Rank(ctx, uid)
 }
 ```
 
@@ -227,47 +227,81 @@ references:
 
 ### HTTP访问
 
-访问message
+访问login
 
-```http
-http://localhost:8000/message
+```bash
+curl --location --request GET 'http://127.0.0.1:8089/login?name=dubbogo'
 ```
 
-收到
+收到账户的信息
 
 ```json
-{"code":0,"data":{"message":"hello from game provider","to":"abc"}}
+{
+    "code": 0,
+    "msg": "dubbogo, your score is 0",
+    "data": {
+        "score": 0,
+        "to": "dubbogo"
+    }
+}
 ```
 
 
 
-访问 online
+访问 score
 
-```http
-http://localhost:8000/online
+```bash
+curl --location --request POST 'http://127.0.0.1:8089/score' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+    "name":"cjp",
+    "score":1
+}'
 ```
 
 收到
 
 ```json
-{"code":0,"msg":"hello this is game provider"}
+{
+    "code": 0,
+    "msg": "dubbogo, your score is 0",
+    "data": {
+        "score": 0,
+        "to": "dubbogo"
+    }
+}
 ```
 
-访问 offline
+访问 rank
 
 ```http
-http://localhost:8000/online
+curl --location --request POST 'http://127.0.0.1:8089/rank?name=dubbogo'
 ```
 
 收到
 
 ```json
-{"code":0,"msg":"hello this is game provider"}
+{
+    "code": 0,
+    "msg": "success",
+    "data": {
+        "rank": 3,
+        "to": "dubbogo"
+    }
+}
 ```
 
 可以发现,所有的http请求,都成功的转发到了 game,并且又通过调用 gate 的 send 方法把处理过的数据返回给 gate
 
 
 
+### 启动前端
+
+切换到 webside 目录,打开 index.html 即可(推荐使用chrome浏览器)
+
+![image-20210516173728198](http://cdn.cjpa.top/image-20210516173728198.png)
+
+点击小人即可进行游戏
+
 请参阅根目录中的 [HOWTO.md](../HOWTO_zh.md) 来运行本例。
 
diff --git a/game/go-server-game/pkg/provider.go b/game/go-server-game/pkg/provider.go
index 5ab380f..7892000 100644
--- a/game/go-server-game/pkg/provider.go
+++ b/game/go-server-game/pkg/provider.go
@@ -3,6 +3,7 @@ package pkg
 import (
     "context"
     "fmt"
+    "strconv"
 
     "github.com/apache/dubbo-go/common/logger"
 
@@ -11,27 +12,93 @@ import (
 
 type BasketballService struct{}
 
-func (p *BasketballService) Online(ctx context.Context, uid string) (*pojo.Result, error) {
-    logger.Infof("online: %s", uid)
-    return &pojo.Result{Code: 0, Msg: "hello this is game provider"}, nil
+var userMap = make(map[string]*pojo.Info, 0)
+
+func (p *BasketballService) Login(ctx context.Context, uid string) (*pojo.Result, error) {
+    logger.Infof("message: %#v", uid)
+    var (
+        info *pojo.Info
+        ok bool
+    )
+
+    // auto reply the same message
+    rsp, err := GateBasketball.Send(context.TODO(), uid, "")
+    if err != nil {
+        logger.Errorf("send fail: %#s", err.Error())
+        return &pojo.Result{Code: 1, Msg: err.Error()}, err
+    }
+
+    fmt.Println("receive data from gate:", rsp)
+
+    if info, ok = userMap[uid]; !ok {
+        info = &pojo.Info{}
+        info.Name = uid
+        userMap[uid] = info
+    }
+    return &pojo.Result{Code: 0, Msg: info.Name + ", your score is " + strconv.Itoa(info.Score) , Data: map[string]interface{}{"to": uid, "score": info.Score}}, nil
 }
 
-func (p *BasketballService) Offline(ctx context.Context, uid string) (*pojo.Result, error) {
-    logger.Infof("offline: %#s", uid)
-    return &pojo.Result{Code: 0, Msg: "hello this is game provider"}, nil
+func (p *BasketballService) Score (ctx context.Context, uid, score string) (*pojo.Result, error) {
+    logger.Infof("message: %#v, %#v", uid, score)
+    var (
+        info = &pojo.Info{}
+        ok bool
+    )
+
+    // auto reply the same message
+    rsp, err := GateBasketball.Send(context.TODO(), uid, score)
+    if err != nil {
+        logger.Errorf("send fail: %#s", err.Error())
+        return &pojo.Result{Code: 1, Msg: err.Error()}, err
+    }
+
+    fmt.Println("receive data from gate:", rsp)
+
+    if info, ok = userMap[uid]; !ok {
+      info = &pojo.Info{
+          Name: uid,
+      }
+      userMap[uid] = info
+      logger.Error("user data not found")
+      return &pojo.Result{Code: 1, Msg: "user data not found", Data: map[string]interface{}{}}, nil
+    }
+    intSource, err := strconv.Atoi(score)
+    if err != nil {
+        logger.Error(err.Error())
+    }
+    info.Score += intSource
+
+    return &pojo.Result{Code: 0, Msg: "进球成功", Data: map[string]interface{}{"to": uid, "score": info.Score}}, nil
 }
 
-func (p *BasketballService) Message(ctx context.Context, uid, data string) (*pojo.Result, error) {
-    logger.Infof("message: %#v, %#v", uid, data)
+func (p *BasketballService) Rank (ctx context.Context, uid string) (*pojo.Result, error) {
+    var (
+        rank = 1
+        info  *pojo.Info
+        ok bool
+    )
 
     // auto reply the same message
-    rsp, err := GateBasketball.Send(context.TODO(), uid, data)
+    rsp, err := GateBasketball.Send(context.TODO(), uid, "")
     if err != nil {
         logger.Errorf("send fail: %#s", err.Error())
         return &pojo.Result{Code: 1, Msg: err.Error()}, err
     }
+
     fmt.Println("receive data from gate:", rsp)
-    return &pojo.Result{Code: 0, Data: map[string]interface{}{"to": uid, "message": data + " from game provider"}}, nil
+
+    if info, ok = userMap[uid]; !ok {
+        logger.Error("no user found")
+        return &pojo.Result{Code: 1, Msg: "no user found", Data: map[string]interface{}{"to": uid, "rank": rank}}, nil
+    }
+
+    for _, v := range userMap {
+        if v.Score > info.Score {
+            rank ++
+        }
+    }
+
+    return &pojo.Result{Code: 0, Msg: "success", Data: map[string]interface{}{"to": uid, "rank": rank}}, nil
 }
 
 func (p *BasketballService) Reference() string {
diff --git a/game/go-server-game/tests/integration/gameprovider_test.go b/game/go-server-game/tests/integration/gameprovider_test.go
old mode 100644
new mode 100755
index 8502d40..02dcf4a
--- a/game/go-server-game/tests/integration/gameprovider_test.go
+++ b/game/go-server-game/tests/integration/gameprovider_test.go
@@ -7,25 +7,25 @@ import (
     "github.com/stretchr/testify/assert"
 )
 
-func TestMessage(t *testing.T) {
-    res, err := gameProvider.Message(context.TODO(), "A001", "hello")
+func TestLogin(t *testing.T) {
+    res, err := gameProvider.Login(context.TODO(), "A001")
     assert.Nil(t, err)
     assert.NotNil(t, res)
     assert.Equal(t, int32(0), res.Code)
     assert.NotNil(t, res.Data)
     assert.Equal(t, "A001", res.Data["to"])
-    assert.Equal(t, "hello", res.Data["message"])
+    assert.Equal(t, 0, res.Data["score"])
 }
 
-func TestOnline(t *testing.T) {
-    res, err := gameProvider.Online(context.TODO(), "A001")
+func TestScore(t *testing.T) {
+    res, err := gameProvider.Score(context.TODO(), "A001", "1")
     assert.Nil(t, err)
     assert.NotNil(t, res)
     assert.Equal(t, int32(0), res.Code)
 }
 
-func TestOffline(t *testing.T) {
-    res, err := gameProvider.Offline(context.TODO(), "A001")
+func TestRank(t *testing.T) {
+    res, err := gameProvider.Rank(context.TODO(), "A001")
     assert.Nil(t, err)
     assert.NotNil(t, res)
     assert.Equal(t, int32(0), res.Code)
diff --git a/game/go-server-gate/cmd/server.go b/game/go-server-gate/cmd/server.go
old mode 100644
new mode 100755
index 232f16d..b16297b
--- a/game/go-server-gate/cmd/server.go
+++ b/game/go-server-gate/cmd/server.go
@@ -3,15 +3,17 @@ package main
 import (
     "context"
     "encoding/json"
+    "io/ioutil"
     "net/http"
     "os"
     "os/signal"
+    "strconv"
     "syscall"
     "time"
 
+    hessian "github.com/apache/dubbo-go-hessian2"
     "github.com/apache/dubbo-go/common/logger"
     "github.com/apache/dubbo-go/config"
-    hessian "github.com/apache/dubbo-go-hessian2"
 
     _ "github.com/apache/dubbo-go/protocol/dubbo"
     _ "github.com/apache/dubbo-go/registry/protocol"
@@ -71,53 +73,67 @@ func initSignal() {
 
 func startHttp() {
 
-    http.HandleFunc("/message", func(w http.ResponseWriter, r *http.Request) {
-        res, err := pkg.Message(context.TODO(), "abc", "hello")
+    http.HandleFunc("/login", func(w http.ResponseWriter, r *http.Request) {
+        res, err := pkg.Login(context.TODO(), r.URL.Query().Get("name"))
         if err != nil {
-            _, _ = w.Write([]byte(err.Error()))
+            responseWithOrigin(w, r, 200, []byte(err.Error()))
             return
         }
 
         b, err := json.Marshal(res)
         if err != nil {
-            _, _ = w.Write([]byte(err.Error()))
+            responseWithOrigin(w, r, 200, []byte(err.Error()))
             return
         }
-
-        _, _ = w.Write(b)
+        responseWithOrigin(w, r, 200, b)
     })
 
-    http.HandleFunc("/online", func(w http.ResponseWriter, r *http.Request) {
-        res, err := pkg.Online(context.TODO(), "abc")
+    http.HandleFunc("/score", func(w http.ResponseWriter, r *http.Request) {
+        reqBody, err := ioutil.ReadAll(r.Body)
+        if err != nil {
+            logger.Error(err.Error())
+        }
+        var info pojo.Info
+        json.Unmarshal(reqBody, &info)
+        res, err := pkg.Score(context.TODO(), info.Name, strconv.Itoa(info.Score))
         if err != nil {
-            _, _ = w.Write([]byte(err.Error()))
+            responseWithOrigin(w, r, 200, []byte(err.Error()))
             return
         }
 
         b, err := json.Marshal(res)
         if err != nil {
-            _, _ = w.Write([]byte(err.Error()))
+            responseWithOrigin(w, r, 200, []byte(err.Error()))
             return
         }
-
-        _, _ = w.Write(b)
+        responseWithOrigin(w, r, 200, b)
     })
 
-    http.HandleFunc("/offline", func(w http.ResponseWriter, r *http.Request) {
-        res, err := pkg.Offline(context.TODO(), "abc")
+    http.HandleFunc("/rank", func(w http.ResponseWriter, r *http.Request) {
+        res, err := pkg.Rank(context.TODO(), r.URL.Query().Get("name"))
         if err != nil {
-            _, _ = w.Write([]byte(err.Error()))
+            responseWithOrigin(w, r, 200, []byte(err.Error()))
             return
         }
-
         b, err := json.Marshal(res)
         if err != nil {
-            _, _ = w.Write([]byte(err.Error()))
+            responseWithOrigin(w, r, 200, []byte(err.Error()))
             return
         }
-
-        _, _ = w.Write(b)
+        responseWithOrigin(w, r, 200, b)
     })
 
-    _ = http.ListenAndServe(":8000", nil)
+    _ = http.ListenAndServe("127.0.0.1:8089", nil)
+}
+
+// avoid cors
+func responseWithOrigin(w http.ResponseWriter, r *http.Request, code int, json []byte) {
+    w.Header().Set("Access-Control-Allow-Origin", "*")
+    w.Header().Set("Access-Control-Allow-Methods", "POST, GET, OPTIONS, PUT, DELETE, UPDATE")
+    w.Header().Set("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization")
+    w.Header().Set("Access-Control-Expose-Headers", "Content-Length, Access-Control-Allow-Origin, Access-Control-Allow-Headers, Cache-Control, Content-Language, Content-Type")
+    w.Header().Set("Access-Control-Allow-Credentials", "true")
+    w.Header().Set("Content-Type", "application/json; charset=utf-8")
+    w.WriteHeader(code)
+    w.Write(json)
 }
\ No newline at end of file
diff --git a/game/go-server-gate/pkg/consumer.go b/game/go-server-gate/pkg/consumer.go
index 04c4d33..74bd910 100644
--- a/game/go-server-gate/pkg/consumer.go
+++ b/game/go-server-gate/pkg/consumer.go
@@ -12,17 +12,14 @@ var GameBasketball = new(game.BasketballService)
 
 // just easy for demo test
 
-func Message(ctx context.Context, uid string, data string) (*pojo.Result, error) {
-    return GameBasketball.Message(ctx, uid, data)
-    // return gameJump.Message(ctx, uid, data)
+func Login(ctx context.Context, data string) (*pojo.Result, error) {
+    return GameBasketball.Login(ctx, data)
 }
 
-func Online(ctx context.Context, uid string) (*pojo.Result, error) {
-    return GameBasketball.Online(ctx, uid)
-    // return gameJump.Online(ctx, uid)
+func Score(ctx context.Context, uid, score string) (*pojo.Result, error) {
+    return GameBasketball.Score(ctx, uid, score)
 }
 
-func Offline(ctx context.Context, uid string) (*pojo.Result, error) {
-    return GameBasketball.Offline(ctx, uid)
-    // return gameJump.Offline(ctx, uid)
+func Rank (ctx context.Context, uid string) (*pojo.Result, error) {
+    return GameBasketball.Rank(ctx, uid)
 }
diff --git a/game/pkg/consumer/game/basketball.go b/game/pkg/consumer/game/basketball.go
index 5e900e5..20dc0b6 100644
--- a/game/pkg/consumer/game/basketball.go
+++ b/game/pkg/consumer/game/basketball.go
@@ -6,9 +6,9 @@ import (
 )
 
 type BasketballService struct {
-    Online  func(ctx context.Context, uid string) (*pojo.Result, error)
-    Offline func(ctx context.Context, uid string) (*pojo.Result, error)
-    Message func(ctx context.Context, uid string, data string) (*pojo.Result, error)
+    Login   func(ctx context.Context, uid string) (*pojo.Result, error)
+    Score   func(ctx context.Context, uid, score string) (*pojo.Result, error)
+    Rank  func(ctx context.Context, uid string) (*pojo.Result, error)
 }
 
 func (p *BasketballService) Reference() string {
diff --git a/game/pkg/pojo/info.go b/game/pkg/pojo/info.go
new file mode 100644
index 0000000..59d47dc
--- /dev/null
+++ b/game/pkg/pojo/info.go
@@ -0,0 +1,10 @@
+package pojo
+
+type Info struct {
+	Name string `json:"name"`
+	Score int	`json:"score"`
+}
+
+func (m Info) JavaClassName() string {
+	return "org.apache.dubbo.pojo.Info"
+}
\ No newline at end of file
diff --git a/game/website/css/style.css b/game/website/css/style.css
index 9a6875d..5f21f5a 100644
--- a/game/website/css/style.css
+++ b/game/website/css/style.css
@@ -48,6 +48,7 @@
 }
 .info{
     position: absolute;
-    top: 0;
-    left: 0;
+    top: 10px;
+    left: 10px;
+    color: white;
 }
\ No newline at end of file
diff --git a/game/website/index.html b/game/website/index.html
index 5d073e4..a3554db 100644
--- a/game/website/index.html
+++ b/game/website/index.html
@@ -6,6 +6,7 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <meta name="viewport" content="width=device-width, initial-scale=1.0">
     <title>FootBall Game</title>
+    <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
     <!-- import Vue before Element -->
     <script src="https://unpkg.com/vue/dist/vue.js"></script>
     <!-- 引入样式 -->
@@ -25,14 +26,17 @@
             用户:{{info.name}}
             <br>
             分数:{{info.score}}
+            <br>
+            排名:{{info.rank}}
         </div>
         <svg id="gate" class="gate" t="1620527545136" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2966" width="400" height="400"><path d="M861.414041 192.806237 179.968861 192.806237c-51.828412 0-93.985558 42.164309-93.985558 93.985558l0 514.915399 61.975517 0 0-0.276293 0.796132 0.650823 74.704422-89.905636 597.571934 0 72.39482 87.839581 0 1.691525 62.007239 0L955.433368 286.791795C955.432345 234.970546 913.228127 192.806237 861.414041 19 [...]
         <svg id="ball" class="ball" t="1620527208144" class="icon" viewBox="0 0 1365 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1801" width="400" height="400"><path d="M647.937 1023.573c-40.96 0-82.133-5.12-122.24-14.933-66.773-16.427-128.427-45.44-183.04-86.4-52.693-39.467-96.853-88.107-131.2-144.853-34.347-56.747-56.96-118.4-67.2-183.467-10.88-67.413-7.893-135.467 8.533-202.24 14.08-56.747 37.334-110.293 69.12-158.72 30.934-46.72 69.12-88.107 113.707-122.453 44.16-34. [...]
         <svg class="people" @click="clickPeople" t="1620527325090" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2618" width="400" height="400"><path d="M563.240423 102.320551m-102.320551 0a102.320551 102.320551 0 1 0 204.641102 0 102.320551 102.320551 0 1 0-204.641102 0Z" p-id="2619" fill="#e6e6e6"></path><path d="M322.895467 827.809372c-8.907907 20.054828-155.767992 195.805422-155.767992 195.805421h122.447605s106.292996-119.58263 113.924906 [...]
         <el-dialog
         title="输入姓名"
-        :visible.sync="dialogVisible"
+        :visible="dialogVisible"
         width="30%"
+        :show-close="false"
         >
         <el-form v-model="info">
             <el-form-item label="姓名">
@@ -40,12 +44,13 @@
             </el-form-item>
         </el-form>
         <span slot="footer" class="dialog-footer">
-            <el-button @click="dialogVisible = false">取 消</el-button>
             <el-button type="primary" @click="submitInfo">确 定</el-button>
         </span>
         </el-dialog>
     </div>
+    <script src="js/api.js"></script>
     <script src="js/index.js"></script>
+    
 </body>
 
 </html>
\ No newline at end of file
diff --git a/game/website/js/api.js b/game/website/js/api.js
new file mode 100644
index 0000000..32a2358
--- /dev/null
+++ b/game/website/js/api.js
@@ -0,0 +1,64 @@
+var baseURL = 'http://127.0.0.1:8089/'
+
+function login(data) {
+    return new Promise(function(resolve, reject) {
+        $.ajax({
+            type: "get",
+            url: baseURL + 'login',
+            data:data,
+            dataType: "json", //指定服务器返回的数据类型
+            success: function (response) {
+                if (response.code != 0) {
+                    reject(response.msg)
+                } else {
+                    resolve(response)
+                }
+            },
+            error:function(err){
+                reject(err)
+            }
+        });
+    })
+}
+
+function score(data) {
+    return new Promise(function(resolve, reject) {
+        $.ajax({
+            type: "post",
+            url: baseURL + 'score',
+            data:data,
+            dataType: "json", //指定服务器返回的数据类型
+            success: function (response) {
+                if (response.code != 0) {
+                    reject(response.msg)
+                } else {
+                    resolve(response)
+                }
+            },
+            error:function(err){
+                reject(err)
+            }
+        })
+    })
+}
+
+function rank(data) {
+    return new Promise(function(resolve, reject) {
+        $.ajax({
+            type: "get",
+            url: baseURL + 'rank',
+            data:data,
+            dataType: "json", //指定服务器返回的数据类型
+            success: function (response) {
+                if (response.code != 0) {
+                    reject(response.msg)
+                } else {
+                    resolve(response)
+                }
+            },
+            error:function(err){
+                reject(err)
+            }
+        })
+    })
+}
\ No newline at end of file
diff --git a/game/website/js/index.js b/game/website/js/index.js
index 49b58cc..7e9be35 100644
--- a/game/website/js/index.js
+++ b/game/website/js/index.js
@@ -3,11 +3,11 @@ new Vue({
     data: function () {
         return { 
             visible: false,
-            rootDom:Object, 
             dialogVisible:true,
             info:{
                 name:'',
-                score:0
+                score:0,
+                rank:0
             },
             isMeet:false
         }
@@ -26,8 +26,30 @@ new Vue({
         }
     },
     methods: {
+        getRank:function(){
+            rank({name: this.info.name}).then(Response => {
+                this.info.rank = Response.data.rank
+            }).catch(e => {
+                this.$message({
+                    message: "获取排名失败" + e,
+                    type:"danger"
+                })
+            })
+        },
         submitInfo:function(){
             this.dialogVisible = false
+            login({name: this.info.name}).then(Response => {
+                this.info.name = Response.data.to
+                this.$message({
+                    message:"欢迎" + Response.msg
+                })
+                this.getRank()
+            }).catch(e => {
+                this.$message({
+                    message: "登陆失败" + e,
+                    type:"danger"
+                })
+            })
         },
         moveBall:function(){
             var elem = document.getElementsByClassName("ball")
@@ -38,15 +60,24 @@ new Vue({
             function frame() {
                 var space = elem[0].getBoundingClientRect().left - gate.getBoundingClientRect().left
                 var hight = elem[0].getBoundingClientRect().top - gate.getBoundingClientRect().top
-                console.log(space < 20)
-                if (!that.isMeet && (space <20 && space > -20 && hight < 20 && hight > -20)) {
+                if (!that.isMeet && (space <60 && space > -20 && hight < 20 && hight > -20)) {
                     that.isMeet = true
-                    that.$message({
-                        message:"进球成功",
-                        type:"success"
+                    score(JSON.stringify({name:that.info.name, score:1})).then(Response => {
+                        that.info.score = Response.data.score
+                        that.$message({
+                            message:"进球成功, 总分数为:" + Response.data.score,
+                            type:"success"
+                        })
+                        that.getRank()
+                    }).catch( e => {
+                        that.$message({
+                            message: "分数统计失败" + e,
+                            type:"danger"
+                        })
                     })
                 }
                 if (tempHeight >= that.clientHeight) {
+                    elem[0].style.bottom = 0 + ''
                     clearInterval(id)
                 } else{
                     tempHeight += 20
@@ -92,7 +123,6 @@ new Vue({
     mounted(){
         this.move()
         this.moveGate()
-        this.rootDom = document.getElementById("app")
     },
     created() {
         

[dubbo-go-samples] 10/12: Merge branch 'master' of https://github.com/apache/dubbo-go-samples

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit b0939043c9b775b23e496704a79e5e0f5326056f
Merge: e5ff594 82a3725
Author: AlexStocks <al...@foxmail.com>
AuthorDate: Sat Jul 24 22:08:44 2021 +0800

    Merge branch 'master' of https://github.com/apache/dubbo-go-samples

 .run/openzipkin/zipkin-go-client.run.xml           |  15 ++
 .run/openzipkin/zipkin-go-server-a.run.xml         |  16 ++
 .run/openzipkin/zipkin-go-server-b.run.xml         |  15 ++
 README.md                                          |   4 +-
 README_zh.md                                       |   4 +-
 async/go-client/cmd/client.go                      |   1 +
 async/go-client/pkg/user.go                        |   1 +
 async/go-server/pkg/user.go                        |   1 +
 async/go-server/tests/integration/main_test.go     |   1 +
 .../tests/integration/userprovider_test.go         |   2 +
 attachment/go-client/cmd/client.go                 |  11 +-
 attachment/go-server/cmd/server.go                 |   8 +-
 attachment/go-server/pkg/user.go                   |   6 +-
 .../go-server/tests/integration/main_test.go       |  13 +-
 .../tests/integration/userprovider_test.go         |   2 +
 chain/backend/cmd/server.go                        |   8 +-
 chain/backend/tests/integration/main_test.go       |  12 +-
 chain/backend/tests/integration/services_test.go   |   1 +
 chain/frontend/cmd/client.go                       |   8 +-
 chain/middle/cmd/server.go                         |   8 +-
 chain/middle/tests/integration/main_test.go        |  12 +-
 chain/middle/tests/integration/services_test.go    |   4 +-
 config-api/go-client/cmd/client.go                 |   1 +
 config-api/go-server/pkg/user.go                   |   1 +
 .../go-server/tests/integration/main_test.go       |   2 -
 .../tests/integration/userprovider_test.go         |   1 +
 configcenter/apollo/go-client/cmd/client.go        |   1 +
 configcenter/apollo/go-server/cmd/server.go        |   2 -
 configcenter/apollo/go-server/pkg/user.go          |   1 +
 configcenter/nacos/go-client/cmd/client.go         |   1 +
 configcenter/nacos/go-server/pkg/user.go           |   1 +
 configcenter/zookeeper/go-client/cmd/client.go     |   1 +
 configcenter/zookeeper/go-server/pkg/user.go       |   1 +
 context/go-client/cmd/client.go                    |   1 +
 context/go-server/pkg/user.go                      |   1 +
 .../tests/integration/userprovider_test.go         |   2 +
 direct/go-client/cmd/client.go                     |   1 +
 direct/go-server/pkg/user.go                       |   1 +
 .../tests/integration/userprovider_test.go         |   3 +-
 docker/go-client/cmd/client.go                     |   1 +
 docker/go-server/pkg/user.go                       |   1 +
 filter/custom/go-client/cmd/client.go              |   1 +
 filter/custom/go-server/pkg/custom_filter.go       |   1 +
 filter/custom/go-server/pkg/user.go                |   1 +
 .../tests/integration/userprovider_test.go         |   1 +
 filter/sentinel/go-client/cmd/client.go            |   2 +
 filter/sentinel/go-server/cmd/server.go            |   1 +
 filter/sentinel/go-server/pkg/user.go              |   1 +
 .../tests/integration/userprovider_test.go         |   1 +
 filter/tpslimit/go-server/pkg/limit_strategy.go    |   1 +
 filter/tpslimit/go-server/pkg/user.go              |   1 +
 game/go-server-game/cmd/server.go                  |  42 ++---
 game/go-server-game/pkg/consumer.go                |   6 +-
 game/go-server-game/pkg/provider.go                |  16 +-
 .../tests/integration/gameprovider_test.go         |  10 +-
 game/go-server-game/tests/integration/main_test.go |  40 ++---
 game/go-server-gate/cmd/server.go                  |  58 +++----
 game/go-server-gate/pkg/consumer.go                |   9 +-
 game/go-server-gate/pkg/provider.go                |  11 +-
 .../tests/integration/gateprovider_test.go         |  10 +-
 game/go-server-gate/tests/integration/main_test.go |  40 ++---
 game/pkg/consumer/game/basketball.go               |   7 +-
 game/pkg/consumer/gate/basketball.go               |   7 +-
 game/pkg/pojo/info.go                              |   2 +-
 general/dubbo/go-client/cmd/client.go              |  13 +-
 general/dubbo/go-server/cmd/server.go              |  18 +--
 general/dubbo/go-server/pkg/user_provider.go       |   9 +-
 .../dubbo/go-server/tests/integration/main_test.go |  21 ++-
 .../tests/integration/userprovider_test.go         |   9 +-
 general/grpc/go-client/cmd/client.go               |  11 +-
 general/grpc/go-client/conf/client.yml             |   2 +-
 general/grpc/go-server/cmd/server.go               |   5 +-
 general/grpc/go-server/conf/client.yml             |   2 +-
 general/grpc/go-server/conf/server.yml             |   2 +-
 general/grpc/go-server/pkg/greeter.go              |   7 +-
 .../go-server/tests/integration/greeter_test.go    |  10 +-
 .../grpc/go-server/tests/integration/main_test.go  |  26 +--
 general/grpc/protobuf/helloworld.pb.go             |  19 ++-
 general/grpc/stream/go-client/app/client.go        |   8 +-
 general/grpc/stream/go-client/app/hello.go         |  50 ------
 general/grpc/stream/go-client/app/helloworld.pb.go |  15 +-
 .../grpc/stream/go-client/profiles/dev/client.yml  |  46 +++---
 .../grpc/stream/go-client/profiles/test/client.yml |  42 +++--
 general/grpc/stream/go-server/app/greeter.go       |   4 -
 general/grpc/stream/go-server/app/helloworld.pb.go |  16 +-
 .../grpc/stream/go-server/profiles/dev/server.yml  |  36 ++---
 .../stream/go-server/profiles/release/server.yml   |  35 ++--
 .../grpc/stream/go-server/profiles/test/server.yml |   8 +-
 general/grpc/unary/go-client/app/client.go         |  11 +-
 general/grpc/unary/go-client/app/hello.go          |  43 -----
 general/grpc/unary/go-client/app/helloworld.pb.go  |  26 +--
 general/grpc/unary/go-client/app/helloworld.proto  |   4 +-
 .../grpc/unary/go-client/profiles/dev/client.yml   |   2 +-
 .../unary/go-client/profiles/release/client.yml    |   2 +-
 .../grpc/unary/go-client/profiles/test/client.yml  |   2 +-
 general/grpc/unary/go-server/app/greeter.go        |  16 +-
 general/grpc/unary/go-server/app/helloworld.pb.go  |  65 ++++----
 .../grpc/unary/go-server/profiles/dev/server.yml   |   2 +-
 .../unary/go-server/profiles/release/server.yml    |   2 +-
 .../grpc/unary/go-server/profiles/test/server.yml  |   2 +-
 general/jsonrpc/go-client/app/client.go            |  14 +-
 general/jsonrpc/go-server/app/server.go            |   8 +-
 general/jsonrpc/go-server/app/user_provider.go     |   5 +-
 general/jsonrpc/go-server/app/user_provider1.go    |   5 +-
 general/jsonrpc/go-server/app/user_provider2.go    |   5 +-
 general/rest/go-client/cmd/client.go               | 176 ++------------------
 general/rest/go-server/cmd/server.go               |  12 +-
 general/rest/go-server/pkg/user.go                 |   5 +
 general/rest/go-server/pkg/user_provider.go        |   7 +-
 general/rest/go-server/pkg/user_provider1.go       |   7 +-
 general/rest/go-server/pkg/user_provider2.go       |   7 +-
 .../rest/go-server}/tests/integration/main_test.go |  21 ++-
 .../tests/integration/userprovider_test.go         | 145 +++++++++++++++++
 generic/go-client/cmd/client.go                    |  11 +-
 generic/go-server/cmd/server.go                    |   3 +-
 generic/go-server/pkg/user.go                      |   6 +-
 generic/go-server/tests/integration/main_test.go   |  12 +-
 .../tests/integration/userprovider_test.go         |   4 +-
 go.mod                                             |   5 +-
 go.sum                                             |  18 +++
 group/go-client/cmd/client.go                      |  11 +-
 group/go-server-group-a/pkg/user.go                |   1 +
 .../tests/integration/main_test.go                 |   3 +-
 .../tests/integration/userprovider_test.go         |   1 +
 group/go-server-group-b/pkg/user.go                |   1 +
 .../tests/integration/main_test.go                 |   3 +-
 helloworld/go-client/cmd/client.go                 |   1 +
 metric/go-client/cmd/client.go                     |   1 +
 metric/go-server/cmd/server.go                     |   4 +-
 metric/go-server/pkg/user.go                       |   9 +-
 metric/go-server/tests/integration/main_test.go    |  17 +-
 .../tests/integration/userprovider_test.go         |   1 +
 multi-registry/go-client/cmd/client.go             |   2 +-
 multi-registry/go-server/cmd/server.go             |   1 -
 multi-registry/go-server/pkg/user.go               |   6 +-
 .../go-server/tests/integration/main_test.go       |  14 +-
 .../tests/integration/userprovider_test.go         |   1 +
 multi-zone/go-client/cmd/client.go                 |   2 +-
 .../go-client/tests/integration/main_test.go       |  14 +-
 .../tests/integration/userprovider_test.go         |   9 +-
 multi-zone/go-server-hz/pkg/user.go                |   1 +
 .../tests/integration/userprovider_test.go         |   1 +
 multi-zone/go-server-sh/pkg/user.go                |   1 +
 .../go-server-sh/tests/integration/main_test.go    |   2 -
 .../tests/integration/userprovider_test.go         |   1 +
 openzipkin/README.md                               | 174 ++++++++++++++++++++
 openzipkin/README_zh.md                            | 179 +++++++++++++++++++++
 openzipkin/doc/app_dependency.png                  | Bin 0 -> 32882 bytes
 openzipkin/doc/zipkin_trace.png                    | Bin 0 -> 319434 bytes
 openzipkin/docker-compose.yml                      |  58 +++++++
 .../app => openzipkin/go-client/cmd}/client.go     | 143 ++++++++++------
 .../go-client}/conf/client.yml                     |  30 ++--
 openzipkin/go-client/conf/log.yml                  |  27 ++++
 .../hello.go => openzipkin/go-client/pkg/user.go   |  30 +++-
 .../app => openzipkin/go-server-a/cmd}/server.go   |  43 ++---
 .../go-server-a}/conf/client.yml                   |  20 +--
 openzipkin/go-server-a/conf/log.yml                |  27 ++++
 .../go-server-a/conf}/server.yml                   |  36 +++--
 openzipkin/go-server-a/docker/docker-compose.yml   |   9 ++
 .../go-server-a}/pkg/user.go                       |  33 +++-
 .../go-server-a}/tests/integration/main_test.go    |  17 +-
 .../tests/integration/userprovider_test.go         |   1 +
 .../app => openzipkin/go-server-b/cmd}/server.go   |  44 ++---
 .../go-server-b}/conf/client.yml                   |  21 +--
 openzipkin/go-server-b/conf/log.yml                |  27 ++++
 .../go-server-b/conf}/server.yml                   |  26 +--
 openzipkin/go-server-b/docker/docker-compose.yml   |   9 ++
 .../go-server-b}/pkg/user.go                       |  12 +-
 .../go-server-b}/tests/integration/main_test.go    |  17 +-
 .../tests/integration/userprovider_test.go         |   3 +-
 .../prometheus/create-datasource-and-dashboard.sh  |  33 ++++
 openzipkin/prometheus/prometheus.yml               |  13 ++
 registry/etcd/go-client/cmd/client.go              |  11 +-
 registry/etcd/go-server/cmd/server.go              |   6 +-
 registry/etcd/go-server/pkg/user.go                |   6 +-
 .../etcd/go-server/tests/integration/main_test.go  |  17 +-
 .../tests/integration/userprovider_test.go         |   1 +
 registry/nacos/go-client/cmd/client.go             |  11 +-
 registry/nacos/go-server/pkg/user.go               |   6 +-
 .../nacos/go-server/tests/integration/main_test.go |  17 +-
 .../tests/integration/userprovider_test.go         |   1 +
 .../consul/go-client/cmd/client.go                 |  20 ++-
 .../consul/go-server/cmd/server.go                 |  25 ++-
 .../consul/go-server/pkg/pojo/user.go              |   2 -
 .../go-server/tests/integration/main_test.go       |   1 -
 .../tests/integration/userprovider_test.go         |   1 +
 .../servicediscovery/etcd/go-client/cmd/client.go  |  12 +-
 .../servicediscovery/etcd/go-server/cmd/server.go  |   6 +-
 .../servicediscovery/etcd/go-server/pkg/user.go    |   6 +-
 .../etcd/go-server/tests/integration/main_test.go  |  15 +-
 .../tests/integration/userprovider_test.go         |   1 +
 .../servicediscovery/file/go-client/cmd/client.go  |  12 +-
 .../servicediscovery/file/go-server/cmd/server.go  |   6 +-
 .../servicediscovery/file/go-server/pkg/user.go    |   6 +-
 .../file/go-server/tests/integration/main_test.go  |  15 +-
 .../tests/integration/userprovider_test.go         |   1 +
 .../servicediscovery/nacos/go-client/cmd/client.go |  12 +-
 .../servicediscovery/nacos/go-server/cmd/server.go |   6 +-
 .../servicediscovery/nacos/go-server/pkg/user.go   |   6 +-
 .../nacos/go-server/tests/integration/main_test.go |  15 +-
 .../tests/integration/userprovider_test.go         |   1 +
 .../zookeeper/go-client/cmd/client.go              |  12 +-
 .../zookeeper/go-server/cmd/server.go              |   6 +-
 .../zookeeper/go-server/pkg/user.go                |   6 +-
 .../go-server/tests/integration/main_test.go       |  17 +-
 .../tests/integration/userprovider_test.go         |   1 +
 router/condition/go-client/cmd/client.go           |   3 +-
 .../go-server/tests/integration/main_test.go       |  15 +-
 .../tests/integration/userprovider_test.go         |   1 +
 router/tag/go-client/cmd/client.go                 |   1 +
 .../tag/go-server/tests/integration/main_test.go   |  14 +-
 .../tests/integration/userprovider_test.go         |   1 +
 seata/client/app/client.go                         |  17 +-
 seata/client/app/svc/svc.go                        |   1 +
 seata/order-svc/app/dao/dao.go                     |   5 +-
 seata/order-svc/app/order_svc.go                   |   1 +
 seata/order-svc/app/server.go                      |  19 ++-
 seata/product-svc/app/dao/dao.go                   |   1 +
 seata/product-svc/app/product_svc.go               |   1 +
 seata/product-svc/app/server.go                    |  19 ++-
 shopping-order/go-client/cmd/client.go             |   1 +
 shopping-order/go-client/pkg/svc.go                |   1 +
 shopping-order/go-server-order/cmd/order_svc.go    |   1 +
 shopping-order/go-server-order/cmd/server.go       |   2 +
 shopping-order/go-server-order/pkg/dao/dao.go      |   1 +
 .../go-server-product/cmd/product_svc.go           |   1 +
 shopping-order/go-server-product/cmd/server.go     |   2 +
 shopping-order/go.sum                              |  29 ++++
 start_integrate_test.sh                            |   2 +-
 tls/go-client/cmd/client.go                        |   4 +-
 tls/go-server/cmd/server.go                        |   4 +-
 tls/go-server/pkg/user.go                          |   2 +-
 tls/go-server/tests/integration/main_test.go       |   1 +
 tracing/dubbo/go-client/app/client.go              |  23 ++-
 tracing/dubbo/go-server/app/server.go              |  22 ++-
 tracing/dubbo/go-server/app/user.go                |   9 +-
 tracing/grpc/README_zh.md                          |  43 +++++
 tracing/grpc/go-client/app/client.go               |  12 +-
 tracing/grpc/go-client/app/hello.go                |   6 +-
 tracing/grpc/go-client/app/helloworld.pb.go        |  13 +-
 tracing/grpc/go-server/app/helloworld.pb.go        |  12 +-
 tracing/grpc/go-server/app/server.go               |   1 +
 tracing/jsonrpc/go-client/app/client.go            |  23 ++-
 tracing/jsonrpc/go-server/app/server.go            |  20 ++-
 tracing/jsonrpc/go-server/app/user_provider.go     |   6 +-
 tracing/jsonrpc/go-server/app/user_provider1.go    |   5 +-
 tracing/jsonrpc/go-server/app/user_provider2.go    |   7 +-
 version/go-client/cmd/client.go                    |   1 +
 version/go-server-v1/pkg/user.go                   |   1 +
 .../tests/integration/userprovider_test.go         |   1 -
 version/go-server-v2/pkg/user.go                   |   1 +
 .../tests/integration/userprovider_test.go         |   1 -
 252 files changed, 2034 insertions(+), 1263 deletions(-)


[dubbo-go-samples] 04/12: Ftr: add rest test case (#103)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit 90edfdd2b52e1f02d414bfc4f93f86c320bd7692
Author: Joe Zou <jo...@apache.org>
AuthorDate: Sat May 22 09:54:41 2021 +0800

    Ftr: add rest test case (#103)
    
    * add rest test case
---
 general/rest/go-client/cmd/client.go               | 166 +--------------------
 general/rest/go-server/pkg/user.go                 |   5 +
 .../rest/go-server/tests/integration/main_test.go  |  56 +++++++
 .../tests/integration/userprovider_test.go         | 145 ++++++++++++++++++
 shopping-order/go.sum                              |  29 ++++
 start_integrate_test.sh                            |   2 +-
 6 files changed, 243 insertions(+), 160 deletions(-)

diff --git a/general/rest/go-client/cmd/client.go b/general/rest/go-client/cmd/client.go
index 13148a7..c8ca0d9 100644
--- a/general/rest/go-client/cmd/client.go
+++ b/general/rest/go-client/cmd/client.go
@@ -19,15 +19,11 @@ package main
 
 import (
 	"context"
-	"fmt"
 	"os"
-	"os/signal"
-	"syscall"
 	"time"
 )
 
 import (
-	"github.com/apache/dubbo-go/common/logger"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
 	"github.com/apache/dubbo-go/config"
 	_ "github.com/apache/dubbo-go/protocol/rest"
@@ -45,166 +41,18 @@ import (
 	"github.com/apache/dubbo-go-samples/general/rest/go-client/pkg"
 )
 
-var (
-	survivalTimeout int = 10e9
-)
-
-// they are necessary:
-// 		export CONF_CONSUMER_FILE_PATH="xxx"
-// 		export APP_LOG_CONF_FILE="xxx"
+// need to setup environment variable "CONF_CONSUMER_FILE_PATH" to "conf/client.yml" before run
 func main() {
-
 	config.Load()
+	time.Sleep(3 * time.Second)
 
-	gxlog.CInfo("\n\ntest")
-	test()
-	gxlog.CInfo("\n\ntest1")
-	test1()
-	gxlog.CInfo("\n\ntest2")
-	test2()
-
-	initSignal()
-}
-
-func initSignal() {
-	signals := make(chan os.Signal, 1)
-	// It is not possible to block SIGKILL or syscall.SIGSTOP
-	signal.Notify(signals, os.Interrupt, os.Kill, syscall.SIGHUP,
-		syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT)
-	for {
-		sig := <-signals
-		logger.Infof("get signal %s", sig.String())
-		switch sig {
-		case syscall.SIGHUP:
-		// reload()
-		default:
-			time.AfterFunc(time.Duration(survivalTimeout), func() {
-				logger.Warnf("app exit now by force...")
-				os.Exit(1)
-			})
-
-			// The program exits normally or timeout forcibly exits.
-			fmt.Println("app exit now...")
-			return
-		}
-	}
-}
-
-func test() {
-
-	gxlog.CInfo("\n\n\nstart to test rest")
+	gxlog.CInfo("\n\n\nstart to test dubbo")
 	user := &pkg.User{}
 	err := pkg.UserProviderVar.GetUser(context.TODO(), []interface{}{"A003"}, user)
 	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("response result: %v", user)
-
-	gxlog.CInfo("\n\n\nstart to test rest - GetUser0")
-	ret, err := pkg.UserProviderVar.GetUser0("A003", "Moorse中文", 30)
-	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("response result: %v", ret)
-
-	gxlog.CInfo("\n\n\nstart to test rest - GetUsers")
-	ret1, err := pkg.UserProviderVar.GetUsers([]interface{}{&pkg.User{ID: "A002"}})
-	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("response result: %v", ret1)
-
-	gxlog.CInfo("\n\n\nstart to test rest - GetUser3")
-	err = pkg.UserProviderVar.GetUser3()
-	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("succ!")
-
-	gxlog.CInfo("\n\n\nstart to test rest illegal method")
-	err = pkg.UserProviderVar.GetUser1(context.TODO(), []interface{}{"A003"}, user)
-	if err == nil {
-		panic("err is nil")
-	}
-	gxlog.CInfo("error: %v", err)
-}
-
-func test1() {
-
-	time.Sleep(3e9)
-
-	gxlog.CInfo("\n\n\nstart to test rest")
-	user := &pkg.User{}
-	err := pkg.UserProvider1Var.GetUser(context.TODO(), []interface{}{"A003"}, user)
-	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("response result: %v", user)
-
-	gxlog.CInfo("\n\n\nstart to test rest - GetUser0")
-	ret, err := pkg.UserProvider1Var.GetUser0("A003", "Moorse中文", 30)
-	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("response result: %v", ret)
-
-	gxlog.CInfo("\n\n\nstart to test rest - GetUsers")
-	ret1, err := pkg.UserProvider1Var.GetUsers([]interface{}{&pkg.User{ID: "A002"}})
-	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("response result: %v", ret1)
-
-	gxlog.CInfo("\n\n\nstart to test rest - GetUser3")
-	err = pkg.UserProvider1Var.GetUser3()
-	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("succ!")
-
-	gxlog.CInfo("\n\n\nstart to test rest illegal method")
-	err = pkg.UserProvider1Var.GetUser1(context.TODO(), []interface{}{"A003"}, user)
-	if err == nil {
-		panic("err is nil")
-	}
-	gxlog.CInfo("error: %v", err)
-}
-
-func test2() {
-
-	gxlog.CInfo("\n\n\nstart to test rest")
-	user := &pkg.User{}
-	err := pkg.UserProvider2Var.GetUser(context.TODO(), []interface{}{"A003"}, user)
-	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("response result: %v", user)
-
-	gxlog.CInfo("\n\n\nstart to test rest - GetUser0")
-	ret, err := pkg.UserProvider2Var.GetUser0("A003", "Moorse中文", 30)
-	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("response result: %v", ret)
-
-	gxlog.CInfo("\n\n\nstart to test rest - GetUsers")
-	ret1, err := pkg.UserProvider2Var.GetUsers([]interface{}{&pkg.User{ID: "A002"}})
-	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("response result: %v", ret1)
-
-	gxlog.CInfo("\n\n\nstart to test rest - GetUser3")
-	err = pkg.UserProvider2Var.GetUser3()
-	if err != nil {
-		panic(err)
-	}
-	gxlog.CInfo("succ!")
-
-	gxlog.CInfo("\n\n\nstart to test rest illegal method")
-	err = pkg.UserProvider2Var.GetUser1(context.TODO(), []interface{}{"A003"}, user)
-	if err == nil {
-		panic("err is nil")
+		gxlog.CError("error: %v\n", err)
+		os.Exit(1)
+		return
 	}
-	gxlog.CInfo("error: %v", err)
+	gxlog.CInfo("response result: %v\n", user)
 }
diff --git a/general/rest/go-server/pkg/user.go b/general/rest/go-server/pkg/user.go
index b8c3507..677a930 100644
--- a/general/rest/go-server/pkg/user.go
+++ b/general/rest/go-server/pkg/user.go
@@ -45,9 +45,14 @@ type (
 		sex   Gender
 		Birth int    `json:"time"`
 		Sex   string `json:"sex"`
+		Time  int64
 	}
 )
 
+func (User) JavaClassName() string {
+	return "org.apache.dubbo.User"
+}
+
 var (
 	DefaultUser = User{
 		ID: "0", Name: "Alex Stocks", Age: 31,
diff --git a/general/rest/go-server/tests/integration/main_test.go b/general/rest/go-server/tests/integration/main_test.go
new file mode 100644
index 0000000..e0655ac
--- /dev/null
+++ b/general/rest/go-server/tests/integration/main_test.go
@@ -0,0 +1,56 @@
+// +build integration
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package integration
+
+import (
+	"os"
+	"testing"
+	"time"
+)
+
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/registry/nacos"
+	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+)
+
+import (
+	. "github.com/apache/dubbo-go-samples/general/rest/go-server/pkg"
+)
+
+var userProvider = new(UserProvider)
+var userProvider1 = new(UserProvider1)
+var userProvider2 = new(UserProvider2)
+
+func TestMain(m *testing.M) {
+	config.SetConsumerService(userProvider)
+	hessian.RegisterPOJO(&User{})
+	config.Load()
+	time.Sleep(3 * time.Second)
+
+	os.Exit(m.Run())
+}
diff --git a/general/rest/go-server/tests/integration/userprovider_test.go b/general/rest/go-server/tests/integration/userprovider_test.go
new file mode 100644
index 0000000..98af57a
--- /dev/null
+++ b/general/rest/go-server/tests/integration/userprovider_test.go
@@ -0,0 +1,145 @@
+// +build integration
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package integration
+
+import (
+	"context"
+	"testing"
+)
+
+import (
+	. "github.com/apache/dubbo-go-samples/general/rest/go-server/pkg"
+)
+
+import (
+	"github.com/stretchr/testify/assert"
+)
+
+func TestGetUser(t *testing.T) {
+	// userProvider
+	user := &User{}
+	err := userProvider.GetUser(context.TODO(), []interface{}{"A001"}, user)
+	assert.Nil(t, err)
+	assert.Equal(t, "001", user.ID)
+	assert.Equal(t, "ZhangSheng", user.Name)
+	assert.Equal(t, int(18), user.Age)
+	assert.NotNil(t, user.Time)
+
+	// userProvider1
+	user = &User{}
+	err = userProvider1.GetUser(context.TODO(), []interface{}{"A003"}, user)
+	assert.Nil(t, err)
+	assert.Equal(t, "113", user.ID)
+	assert.Equal(t, "Moorse中文", user.Name)
+	assert.Equal(t, int(30), user.Age)
+	assert.NotNil(t, user.Time)
+
+	// userProvider2
+	user = &User{}
+	err = userProvider2.GetUser(context.TODO(), []interface{}{"A003"}, user)
+	assert.Nil(t, err)
+	assert.Equal(t, "113", user.ID)
+	assert.Equal(t, "Moorse中文", user.Name)
+	assert.Equal(t, int(30), user.Age)
+	assert.NotNil(t, user.Time)
+}
+
+func TestGetUser0(t *testing.T) {
+	// userProvider
+	ret, err := userProvider.GetUser0("A003", "Moorse中文", 30)
+	assert.Nil(t, err)
+	assert.Equal(t, "113", ret.ID)
+	assert.Equal(t, "Moorse中文", ret.Name)
+	assert.Equal(t, int(30), ret.Age)
+	assert.NotNil(t, ret.Time)
+
+	// userProvider1
+	ret1, err1 := userProvider1.GetUser0("A003", "Moorse中文", 30)
+	assert.Nil(t, err1)
+	assert.Equal(t, "113", ret1.ID)
+	assert.Equal(t, "Moorse中文", ret1.Name)
+	assert.Equal(t, int(30), ret1.Age)
+	assert.NotNil(t, ret1.Time)
+
+	// userProvider2
+	ret2, err2 := userProvider2.GetUser0("A003", "Moorse中文", 30)
+	assert.Nil(t, err2)
+	assert.Equal(t, "113", ret2.ID)
+	assert.Equal(t, "Moorse中文", ret2.Name)
+	assert.Equal(t, int(30), ret2.Age)
+	assert.NotNil(t, ret2.Time)
+}
+
+func TestGetUsers(t *testing.T) {
+	// userProvider
+	m := make(map[string]interface{})
+	m["ID"]="A002"
+	ret1, err := userProvider.GetUsers([]interface{}{m})
+	assert.Nil(t, err)
+	assert.Equal(t, 1, len(ret1))
+	u := ret1[0]
+	assert.Equal(t, "002", u.ID)
+	assert.Equal(t, "Lily", u.Name)
+	assert.Equal(t, int(20), u.Age)
+	assert.NotNil(t, u.Time)
+
+	// userProvider1
+	m = make(map[string]interface{})
+	m["ID"]="A002"
+	ret1, err = userProvider1.GetUsers([]interface{}{m})
+	assert.Nil(t, err)
+	assert.Equal(t, 0, len(ret1))
+
+	// userProvider2
+	m = make(map[string]interface{})
+	m["ID"]="A002"
+	ret1, err = userProvider1.GetUsers([]interface{}{m})
+	assert.Nil(t, err)
+	assert.Equal(t, 0, len(ret1))
+}
+
+
+func TestGetUser3(t *testing.T) {
+	// userProvider
+	err := userProvider.GetUser3()
+	assert.Nil(t, err)
+
+	// userProvider1
+	err = userProvider1.GetUser3()
+	assert.Nil(t, err)
+
+	// userProvider2
+	err = userProvider2.GetUser3()
+	assert.Nil(t, err)
+}
+
+func TestGetUser1(t *testing.T) {
+	// userProvider
+	_, err := userProvider.GetUser1([]interface{}{"A003"})
+	assert.NotNil(t, err)
+
+	// userProvider1
+	_, err = userProvider1.GetUser1([]interface{}{"A003"})
+	assert.NotNil(t, err)
+
+	// userProvider2
+	_, err = userProvider2.GetUser1([]interface{}{"A003"})
+	assert.NotNil(t, err)
+}
diff --git a/shopping-order/go.sum b/shopping-order/go.sum
index 5b13ff5..efa6fee 100644
--- a/shopping-order/go.sum
+++ b/shopping-order/go.sum
@@ -6,6 +6,7 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A
 cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY=
 cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc=
 cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0=
+cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To=
 cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o=
 cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
 cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
@@ -50,6 +51,7 @@ github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dX
 github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
 github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
 github.com/Microsoft/go-winio v0.4.3/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
+github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw=
 github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
 github.com/NYTimes/gziphandler v1.0.1 h1:iLrQrdwjDd52kHDA5op2UBJFjmOb9g+7scBan4RN8F0=
 github.com/NYTimes/gziphandler v1.0.1/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
@@ -84,6 +86,7 @@ github.com/apache/dubbo-getty v1.4.3 h1:PCKpryDasKOxwT5MBC6MIMO+0NLOaHF6Xco9YXQw
 github.com/apache/dubbo-getty v1.4.3/go.mod h1:ansXgKxxyhCOiQL29nO5ce1MDcEKmCyZuNR9oMs3hek=
 github.com/apache/dubbo-go v1.5.6-rc2 h1:e9ziyPQx65n/dyGrA0/ce263jV2+nnSzzpdu9LbfNpc=
 github.com/apache/dubbo-go v1.5.6-rc2/go.mod h1:wLJvPWbnrf6/bhoohBT404QK4t2JoNcckMw+/fJ9P+c=
+github.com/apache/dubbo-go v1.5.6/go.mod h1:wLJvPWbnrf6/bhoohBT404QK4t2JoNcckMw+/fJ9P+c=
 github.com/apache/dubbo-go-hessian2 v1.9.1 h1:ceSsU/9z/gv3hzUpl8GceEhQvF3i0BionfdHUGMmjHU=
 github.com/apache/dubbo-go-hessian2 v1.9.1/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE=
 github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
@@ -185,9 +188,11 @@ github.com/digitalocean/godo v1.10.0 h1:uW1/FcvZE/hoixnJcnlmIUvTVNdZCLjRLzmDtRi1
 github.com/digitalocean/godo v1.10.0/go.mod h1:h6faOIcZ8lWIwNQ+DN7b3CgX4Kwby5T+nbpNqkUIozU=
 github.com/dimchansky/utfbom v1.1.0 h1:FcM3g+nofKgUteL8dm/UpdRXNC9KmADgTpLKsu0TRo4=
 github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8=
+github.com/dnaeon/go-vcr v0.0.0-20180814043457-aafff18a5cc2/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
 github.com/dnaeon/go-vcr v1.0.1 h1:r8L/HqC0Hje5AXMu1ooW8oyQyOFv4GxqpL0nRP7SLLY=
 github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
 github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
+github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
 github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM=
 github.com/dubbogo/go-zookeeper v1.0.3 h1:UkuY+rBsxdT7Bs63QAzp9z7XqQ53W1j8E5rwl83me8g=
 github.com/dubbogo/go-zookeeper v1.0.3/go.mod h1:fn6n2CAEer3novYgk9ULLwAjuV8/g4DdC2ENwRb6E+c=
@@ -245,6 +250,7 @@ github.com/go-co-op/gocron v0.1.1/go.mod h1:Y9PWlYqDChf2Nbgg7kfS+ZsXHDTZbMZYPEQ0
 github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
 github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
 github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
+github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
 github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
 github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
@@ -356,6 +362,7 @@ github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsC
 github.com/googleapis/gnostic v0.2.0 h1:l6N3VoaVzTncYYW+9yOz2LJJammFZGBO13sqgEhpy9g=
 github.com/googleapis/gnostic v0.2.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY=
 github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
+github.com/gophercloud/gophercloud v0.3.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8=
 github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
 github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 h1:twflg0XRTjwKpxb/jFExr4HGq6on2dEOmnL6FV+fgPw=
 github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
@@ -445,6 +452,7 @@ github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09
 github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
 github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
 github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
 github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
 github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
 github.com/hashicorp/hil v0.0.0-20160711231837-1e86c6b523c5 h1:uk280DXEbQiCOZgCOI3elFSeNxf8YIZiNsbr2pQLYD0=
@@ -482,6 +490,7 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO
 github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
 github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
 github.com/imdario/mergo v0.3.6/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
+github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
 github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
 github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
 github.com/jackc/fake v0.0.0-20150926172116-812a484cc733/go.mod h1:WrMFNQdiFJ80sQsxDoMokWK1W5TQtxBFNpzWTD84ibQ=
@@ -550,6 +559,7 @@ github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
 github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
 github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
 github.com/linode/linodego v0.7.1/go.mod h1:ga11n3ivecUrPCHN0rANxKmfWBJVkOXfLMZinAbj2sY=
+github.com/linode/linodego v0.10.0/go.mod h1:cziNP7pbvE3mXIPneHj0oRY8L1WtGEIKlZ8LANE4eXA=
 github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
 github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
 github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
@@ -576,6 +586,7 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j
 github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
 github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
 github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
+github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM=
 github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
 github.com/mitchellh/cli v1.1.0 h1:tEElEatulEHDeedTxwckzyYMA5c86fbmNIUL1hBIiTg=
 github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
@@ -591,6 +602,7 @@ github.com/mitchellh/go-testing-interface v1.14.0/go.mod h1:gfgS7OtZj6MA4U1UrDRp
 github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
 github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
 github.com/mitchellh/hashstructure v0.0.0-20170609045927-2bca23e0e452/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ=
+github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ=
 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
 github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
 github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
@@ -772,6 +784,7 @@ github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9Nz
 github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
 github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc=
 github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
+github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
 github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
 github.com/sirupsen/logrus v1.6.0 h1:UBcNElsrwanuuMsnGSlYmtmgbb23qDR5dG+6X6Oo89I=
 github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88=
@@ -840,6 +853,7 @@ github.com/transaction-wg/seata-golang v0.2.1-alpha h1:YT0jWEc0XxN53E9xb/N8eKQ0y
 github.com/transaction-wg/seata-golang v0.2.1-alpha/go.mod h1:L9vMoZxvLX4BuXQ13vFPCwFfXRLP0Bhr97z+6jm49Dw=
 github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8=
 github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
+github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U=
 github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
 github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
 github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
@@ -912,6 +926,7 @@ golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL
 golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
 golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek=
 golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY=
+golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
 golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw=
 golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
 golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
@@ -922,6 +937,7 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl
 golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
 golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
 golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
+golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs=
 golang.org/x/lint v0.0.0-20200302205851-738671d3881b h1:Wh+f8QHJXR411sJR8/vRBTZ7YapZaRvUcLFFJhusH0k=
 golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
 golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE=
@@ -934,6 +950,7 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
 golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
+golang.org/x/net v0.0.0-20180611182652-db08ff08e862/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -952,6 +969,7 @@ golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR
 golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks=
 golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
 golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
@@ -1007,6 +1025,7 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1070,7 +1089,10 @@ golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtn
 golang.org/x/tools v0.0.0-20191107010934-f79515f33823/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
 golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.0.0-20191216052735-49a3e744a425/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
+golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
 golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
 golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
 golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
@@ -1092,6 +1114,7 @@ google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E
 google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
 google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg=
 google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
+google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI=
 google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
 google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
 google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -1110,10 +1133,12 @@ google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98
 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
 google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8=
 google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
+google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc=
 google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
 google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884 h1:fiNLklpBwWK1mth30Hlwk+fcdBmIALlgF5iy77O37Ig=
 google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
 google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
+google.golang.org/genproto v0.0.0-20200806141610-86f49bd18e98/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
 google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
 google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
 google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -1131,8 +1156,10 @@ google.golang.org/grpc v1.26.0 h1:2dTRdpdFEEhJYQD8EMLB61nnrzSCTbG38PhqdhvOltg=
 google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
 google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
 google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
+google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
 google.golang.org/grpc v1.33.1 h1:DGeFlSan2f+WEtCERJ4J9GJWk15TxUi8QGagfI87Xyc=
 google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
+google.golang.org/grpc/examples v0.0.0-20210322221411-d26af8e39165/go.mod h1:Ly7ZA/ARzg8fnPU9TyZIxoz33sEUuWX7txiqs8lPTgE=
 google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
 google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
 google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -1142,6 +1169,7 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
 google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM=
 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
+google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
 google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
 gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
@@ -1168,6 +1196,7 @@ gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno=
 gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
 gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8=
 gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
+gopkg.in/resty.v1 v1.9.1/go.mod h1:vo52Hzryw9PnPHcJfPsBiFW62XhNx5OczbV9y+IMpgc=
 gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI=
 gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo=
 gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI=
diff --git a/start_integrate_test.sh b/start_integrate_test.sh
index 181d229..f7ca83f 100755
--- a/start_integrate_test.sh
+++ b/start_integrate_test.sh
@@ -50,7 +50,7 @@ array+=("filter/sentinel/go-server")
 array+=("general/dubbo/go-server")
 array+=("general/grpc/go-server")
 #array+=("general/jsonrpc/go-server")
-#array+=("general/rest/go-server")
+array+=("general/rest/go-server")
 
 # generic
 array+=("generic/go-server")

[dubbo-go-samples] 05/12: Feature/openzipkin (#119)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit c178568f70d25a984fae1d502391cc5f70947aa3
Author: phil <ph...@foxmail.com>
AuthorDate: Mon May 24 10:05:16 2021 +0800

    Feature/openzipkin (#119)
    
    * update: add opentrace example use zipkin & prometheus
    
    * update: add zipkin & prometheus in dubbo-go example
    
    * update: readme
    
    * update: update readme, and add more implementations
    
    * update: README
---
 .run/openzipkin/zipkin-go-client.run.xml           |  15 ++
 .run/openzipkin/zipkin-go-server-a.run.xml         |  16 ++
 .run/openzipkin/zipkin-go-server-b.run.xml         |  15 ++
 go.mod                                             |   5 +-
 go.sum                                             |  17 ++
 openzipkin/README.md                               | 174 ++++++++++++++++++++
 openzipkin/README_zh.md                            | 179 +++++++++++++++++++++
 openzipkin/doc/app_dependency.png                  | Bin 0 -> 32882 bytes
 openzipkin/doc/zipkin_trace.png                    | Bin 0 -> 319434 bytes
 openzipkin/docker-compose.yml                      |  58 +++++++
 openzipkin/go-client/cmd/client.go                 | 155 ++++++++++++++++++
 openzipkin/go-client/conf/client.yml               |  67 ++++++++
 openzipkin/go-client/conf/log.yml                  |  27 ++++
 openzipkin/go-client/pkg/user.go                   |  50 ++++++
 openzipkin/go-server-a/cmd/server.go               | 109 +++++++++++++
 openzipkin/go-server-a/conf/client.yml             |  59 +++++++
 openzipkin/go-server-a/conf/log.yml                |  27 ++++
 openzipkin/go-server-a/conf/server.yml             |  67 ++++++++
 openzipkin/go-server-a/docker/docker-compose.yml   |   9 ++
 openzipkin/go-server-a/pkg/user.go                 |  88 ++++++++++
 .../go-server-a/tests/integration/main_test.go     |  71 ++++++++
 .../tests/integration/userprovider_test.go         |  38 +++++
 openzipkin/go-server-b/cmd/server.go               | 107 ++++++++++++
 openzipkin/go-server-b/conf/client.yml             |  60 +++++++
 openzipkin/go-server-b/conf/log.yml                |  27 ++++
 openzipkin/go-server-b/conf/server.yml             |  57 +++++++
 openzipkin/go-server-b/docker/docker-compose.yml   |   9 ++
 openzipkin/go-server-b/pkg/user.go                 |  62 +++++++
 .../go-server-b/tests/integration/main_test.go     |  71 ++++++++
 .../tests/integration/userprovider_test.go         |  39 +++++
 .../prometheus/create-datasource-and-dashboard.sh  |  33 ++++
 openzipkin/prometheus/prometheus.yml               |  13 ++
 32 files changed, 1722 insertions(+), 2 deletions(-)

diff --git a/.run/openzipkin/zipkin-go-client.run.xml b/.run/openzipkin/zipkin-go-client.run.xml
new file mode 100644
index 0000000..8538c26
--- /dev/null
+++ b/.run/openzipkin/zipkin-go-client.run.xml
@@ -0,0 +1,15 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="openzipkin-go-client" type="GoApplicationRunConfiguration" factoryName="Go Application" folderName="openzipkin">
+    <module name="dubbo-go-samples" />
+    <working_directory value="$PROJECT_DIR$" />
+    <envs>
+      <env name="APP_LOG_CONF_FILE" value="$PROJECT_DIR$/openzipkin/go-client/conf/log.yml" />
+      <env name="CONF_CONSUMER_FILE_PATH" value="$PROJECT_DIR$/openzipkin/go-client/conf/client.yml" />
+    </envs>
+    <kind value="PACKAGE" />
+    <filePath value="$PROJECT_DIR$/openzipkin/go-client/cmd/client.go" />
+    <package value="github.com/apache/dubbo-go-samples/openzipkin/go-client/cmd" />
+    <directory value="$PROJECT_DIR$" />
+    <method v="2" />
+  </configuration>
+</component>
\ No newline at end of file
diff --git a/.run/openzipkin/zipkin-go-server-a.run.xml b/.run/openzipkin/zipkin-go-server-a.run.xml
new file mode 100644
index 0000000..268acbc
--- /dev/null
+++ b/.run/openzipkin/zipkin-go-server-a.run.xml
@@ -0,0 +1,16 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="openzipkin-go-server-a" type="GoApplicationRunConfiguration" factoryName="Go Application" folderName="openzipkin">
+    <module name="dubbo-go-samples" />
+    <working_directory value="$PROJECT_DIR$" />
+    <envs>
+      <env name="APP_LOG_CONF_FILE" value="$PROJECT_DIR$/openzipkin/go-server-a/conf/log.yml" />
+      <env name="CONF_PROVIDER_FILE_PATH" value="$PROJECT_DIR$/openzipkin/go-server-a/conf/server.yml" />
+      <env name="CONF_CONSUMER_FILE_PATH" value="$PROJECT_DIR$/openzipkin/go-server-a/conf/client.yml" />
+    </envs>
+    <kind value="PACKAGE" />
+    <filePath value="$PROJECT_DIR$/openzipkin/go-server-a/cmd/server.go" />
+    <package value="github.com/apache/dubbo-go-samples/openzipkin/go-server-a/cmd" />
+    <directory value="$PROJECT_DIR$" />
+    <method v="2" />
+  </configuration>
+</component>
\ No newline at end of file
diff --git a/.run/openzipkin/zipkin-go-server-b.run.xml b/.run/openzipkin/zipkin-go-server-b.run.xml
new file mode 100644
index 0000000..b6137d9
--- /dev/null
+++ b/.run/openzipkin/zipkin-go-server-b.run.xml
@@ -0,0 +1,15 @@
+<component name="ProjectRunConfigurationManager">
+  <configuration default="false" name="openzipkin-go-server-b" type="GoApplicationRunConfiguration" factoryName="Go Application" folderName="openzipkin">
+    <module name="dubbo-go-samples" />
+    <working_directory value="$PROJECT_DIR$" />
+    <envs>
+      <env name="APP_LOG_CONF_FILE" value="$PROJECT_DIR$/openzipkin/go-server-b/conf/log.yml" />
+      <env name="CONF_PROVIDER_FILE_PATH" value="$PROJECT_DIR$/openzipkin/go-server-b/conf/server.yml" />
+    </envs>
+    <kind value="PACKAGE" />
+    <filePath value="$PROJECT_DIR$/openzipkin/go-server-b/cmd/server.go" />
+    <package value="github.com/apache/dubbo-go-samples/openzipkin/go-server-b/cmd" />
+    <directory value="$PROJECT_DIR$" />
+    <method v="2" />
+  </configuration>
+</component>
\ No newline at end of file
diff --git a/go.mod b/go.mod
index 3885d92..629c7f9 100644
--- a/go.mod
+++ b/go.mod
@@ -2,6 +2,7 @@ module github.com/apache/dubbo-go-samples
 
 require (
 	cloud.google.com/go v0.50.0 // indirect
+	contrib.go.opencensus.io/exporter/prometheus v0.3.0
 	github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 // indirect
 	github.com/alibaba/sentinel-golang v1.0.2
 	github.com/apache/dubbo-getty v1.4.3
@@ -13,7 +14,6 @@ require (
 	github.com/emicklei/go-restful/v3 v3.4.0
 	github.com/golang/protobuf v1.4.3
 	github.com/gophercloud/gophercloud v0.3.0 // indirect
-	github.com/hashicorp/golang-lru v0.5.3 // indirect
 	github.com/imdario/mergo v0.3.9 // indirect
 	github.com/linode/linodego v0.10.0 // indirect
 	github.com/miekg/dns v1.1.27 // indirect
@@ -28,7 +28,8 @@ require (
 	github.com/transaction-wg/seata-golang v0.2.1-alpha
 	github.com/uber/jaeger-client-go v2.22.1+incompatible
 	github.com/uber/jaeger-lib v2.2.0+incompatible // indirect
-	google.golang.org/grpc v1.33.1
+	go.opencensus.io v0.23.0
+	google.golang.org/grpc v1.33.2
 	google.golang.org/grpc/examples v0.0.0-20210322221411-d26af8e39165 // indirect
 )
 
diff --git a/go.sum b/go.sum
index 6f9977b..96d650d 100644
--- a/go.sum
+++ b/go.sum
@@ -13,6 +13,8 @@ cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7
 cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
 cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
 cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw=
+contrib.go.opencensus.io/exporter/prometheus v0.3.0 h1:08FMdJYpItzsknogU6PiiNo7XQZg/25GjH236+YCwD0=
+contrib.go.opencensus.io/exporter/prometheus v0.3.0/go.mod h1:rpCPVQKhiyH8oomWgm34ZmgIdZa8OVYO5WAIygPbBBE=
 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
 github.com/Azure/azure-sdk-for-go v40.3.0+incompatible h1:NthZg3psrLxvQLN6rVm07pZ9mv2wvGNaBNGQ3fnPvLE=
 github.com/Azure/azure-sdk-for-go v40.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc=
@@ -77,9 +79,11 @@ github.com/abdullin/seq v0.0.0-20160510034733-d5467c17e7af/go.mod h1:5Jv4cbFiHJM
 github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw=
 github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c=
 github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
+github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
 github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
 github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
 github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
+github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d h1:UQZhZ2O0vMHr2cI+DC1Mbh0TJxzA3RcLoMsFw+aXw7E=
 github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
 github.com/alibaba/sentinel-golang v1.0.2 h1:Acopq74hOtZN4MV1v811MQ6QcqPFLDSczTrRXv9zpIg=
 github.com/alibaba/sentinel-golang v1.0.2/go.mod h1:QsB99f/z35D2AiMrAWwgWE85kDTkBUIkcmPrRt+61NI=
@@ -355,6 +359,8 @@ github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w=
 github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM=
 github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-querystring v0.0.0-20170111101155-53e6ce116135/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
 github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
 github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
@@ -480,6 +486,7 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
 github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
 github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk=
 github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
+github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
 github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
 github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
 github.com/hashicorp/hil v0.0.0-20160711231837-1e86c6b523c5 h1:uk280DXEbQiCOZgCOI3elFSeNxf8YIZiNsbr2pQLYD0=
@@ -762,6 +769,7 @@ github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod
 github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso=
 github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
 github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
+github.com/prometheus/client_golang v1.6.0/go.mod h1:ZLOG9ck3JLRdB5MgO8f+lLTe83AXG6ro35rLTxvnIl4=
 github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
 github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw=
 github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM=
@@ -779,6 +787,7 @@ github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
 github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
 github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
+github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
 github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
 github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4=
 github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
@@ -790,9 +799,12 @@ github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R
 github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
 github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
 github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
+github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
 github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
 github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4=
 github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
+github.com/prometheus/statsd_exporter v0.20.0 h1:M0hQphnq2WyWKS5CefQL8PqWwBOBPhiAkyLo5l4ZYvE=
+github.com/prometheus/statsd_exporter v0.20.0/go.mod h1:YL3FWCG8JBBtaUSxAg4Gz2ZYu22bS84XM89ZQXXTWmQ=
 github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
 github.com/rboyer/safeio v0.2.1/go.mod h1:Cq/cEPK+YXFn622lsQ0K4KsPZSPtaptHHEldsy7Fmig=
 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
@@ -940,6 +952,8 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU=
 go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
 go.opencensus.io v0.22.2 h1:75k/FF0Q2YM8QYo07VPddOLBslDt1MZOdEslOHvmzAs=
 go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
+go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
+go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
 go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
 go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
 go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
@@ -1036,6 +1050,7 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up
 golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
 golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI=
 golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0=
@@ -1095,6 +1110,7 @@ golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7w
 golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
 golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1238,6 +1254,7 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
 google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
 gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U=
+gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
 gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
 gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
diff --git a/openzipkin/README.md b/openzipkin/README.md
new file mode 100644
index 0000000..54ef3db
--- /dev/null
+++ b/openzipkin/README.md
@@ -0,0 +1,174 @@
+# Zipkin in Dubbo-go Example
+
+## Backend
+
+**Zipkin** is a distributed tracing system. It helps **Dubbo-go** gathering timing data which is used to troubleshoot latency problems in service architectures.
+
+## Introduction
+
+```markdown
+.
+├── README.md
+├── README_zh.md
+├── docker-compose.yml
+├── go-client
+├── go-server-a
+├── go-server-b
+└── prometheus
+```
+
+- go-client :The Service Consumer
+- go-server-a :The Service Provider A
+- go-server-b :The Service Provider B
+
+Client calls ProviderA , and then calls ProviderB,
+ProviderA also makes a request to ProviderB!
+
+dependencies :
+![dependency.png](doc/app_dependency.png)
+
+## Code
+
+register Zipkin. Reporter,Endpoint,Tracer,default sample `AlwaysSample` 
+
+```go
+func registerZipkin() {
+	// set up a span reporter
+	reporter := zipkinhttp.NewReporter("http://localhost:9411/api/v2/spans")
+
+	// create our local service endpoint
+	endpoint, err := zipkin.NewEndpoint("go-server-a", "localhost:80")
+	if err != nil {
+		gxlog.CError("unable to create local endpoint: %+v\n", err)
+	}
+
+    // set sampler , default AlwaysSample
+    // sampler := zipkin.NewModuloSampler(1)
+
+	// initialize our tracer
+	// nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint), zipkin.WithSampler(sampler))
+	nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint))
+	if err != nil {
+		gxlog.CError("unable to create tracer: %+v\n", err)
+	}
+
+	// use zipkin-go-opentracing to wrap our tracer
+	tracer := zipkinot.Wrap(nativeTracer)
+
+	// optionally set as Global OpenTracing tracer instance
+	opentracing.SetGlobalTracer(tracer)
+}
+```
+
+## Config
+
+Provider config filter:
+
+```yaml
+
+services:
+  ...
+filter: "tracing"
+
+```
+
+## Filter
+
+Dubbo-go supports `opentrace filter` 
+
+```go
+func (tf *tracingFilter) Invoke(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result {
+	var (
+		spanCtx context.Context
+		span    opentracing.Span
+	)
+	operationName := invoker.GetUrl().ServiceKey() + "#" + invocation.MethodName()
+
+	wiredCtx := ctx.Value(constant.TRACING_REMOTE_SPAN_CTX)
+	preSpan := opentracing.SpanFromContext(ctx)
+
+	if preSpan != nil {
+		// it means that someone already create a span to trace, so we use the span to be the parent span
+		span = opentracing.StartSpan(operationName, opentracing.ChildOf(preSpan.Context()))
+		spanCtx = opentracing.ContextWithSpan(ctx, span)
+
+	} else if wiredCtx != nil {
+
+		// it means that there has a remote span, usually from client side. so we use this as the parent
+		span = opentracing.StartSpan(operationName, opentracing.ChildOf(wiredCtx.(opentracing.SpanContext)))
+		spanCtx = opentracing.ContextWithSpan(ctx, span)
+	} else {
+		// it means that there is not any span, so we create a span as the root span.
+		span, spanCtx = opentracing.StartSpanFromContext(ctx, operationName)
+	}
+
+	defer func() {
+		span.Finish()
+	}()
+
+	result := invoker.Invoke(spanCtx, invocation)
+	span.SetTag(successKey, result.Error() == nil)
+	if result.Error() != nil {
+		span.LogFields(log.String(errorKey, result.Error().Error()))
+	}
+	return result
+}
+```
+
+## Install Zipkin
+
+First Way:
+
+Follow [Zipkin's quick start](https://zipkin.io/pages/quickstart.html) to install zipkin.
+
+```bash
+curl -sSL https://zipkin.io/quickstart.sh | bash -s
+```
+
+Zipkin supports various backend storages including Cassandra, ElasticSearch and MySQL. Here we use the simplest storage - in-memory for demo purpose.
+
+```bash
+java -jar zipkin.jar
+```
+
+Once the process starts, you can verify zipkin server works by access http://localhost:9411
+
+Or Use Docker:
+
+See [/dubbo-go-sample/zipkin/docker/docker-compose.yml](docker-compose.yml)
+
+```dockerfile
+services:
+  # The zipkin process services the UI, and also exposes a POST endpoint that
+  # instrumentation can send trace data to.
+  zipkin:
+    image: ghcr.io/openzipkin/zipkin-slim:${TAG:-latest}
+    container_name: zipkin
+    # Environment settings are defined here https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#environment-variables
+    environment:
+      - STORAGE_TYPE=mem
+      # Point the zipkin at the storage backend
+      - MYSQL_HOST=mysql
+      # Uncomment to enable self-tracing
+      # - SELF_TRACING_ENABLED=true
+      # Uncomment to increase heap size
+      # - JAVA_OPTS=-Xms128m -Xmx128m -XX:+ExitOnOutOfMemoryError
+    ports:
+      # Port used for the Zipkin UI and HTTP Api
+      - 9411:9411
+    # Uncomment to enable debug logging
+    # command: --logging.level.zipkin2=DEBUG
+```
+
+```bash
+docker-compose -f docker/docker-compose.yml up -d zipkin
+```
+
+### How To Run
+
+Refer to  [HOWTO.md](../HOWTO_zh.md) under the root directory to run this sample.
+
+## The End
+
+Trace :
+![zipkin_trace.png](doc/zipkin_trace.png)
diff --git a/openzipkin/README_zh.md b/openzipkin/README_zh.md
new file mode 100644
index 0000000..72d8ec3
--- /dev/null
+++ b/openzipkin/README_zh.md
@@ -0,0 +1,179 @@
+# Zipkin 在 Dubbo-go 应用示例
+
+# 背景
+
+Zipkin是一个分布式跟踪系统。它有助于收集解决 Dubbo-go 服务中的延迟问题所需的时序数据。
+包括该数据的收集和查找。
+
+# 介绍
+
+本示例演示了 Zipkin 在 Dubbo-go 应用程序中的基本用法。
+
+```markdown
+.
+├── README.md
+├── README_zh.md
+├── docker-compose.yml
+├── go-client
+├── go-server-a
+├── go-server-b
+└── prometheus
+```
+
+- go-client :服务消费者
+- go-server-a :服务提供者 A
+- go-server-b :服务提供者 B
+
+为了演示效果,示例中 Client 会同时对 ProviderA 与 ProviderB 发起请求,
+ProviderA 内部也会对 ProviderB 发起请求!
+
+依赖关系:
+![dependency.png](doc/app_dependency.png)
+
+
+## 代码说明
+
+服务启动时注册 Zipkin,包括 Reporter,Endpoint,Tracer,默认采样比例全采样 `AlwaysSample` ,可自行配置
+
+```go
+func registerZipkin() {
+	// set up a span reporter
+	reporter := zipkinhttp.NewReporter("http://localhost:9411/api/v2/spans")
+
+	// create our local service endpoint
+	endpoint, err := zipkin.NewEndpoint("go-server-a", "localhost:80")
+	if err != nil {
+		gxlog.CError("unable to create local endpoint: %+v\n", err)
+	}
+
+    // set sampler , default AlwaysSample
+    // sampler := zipkin.NewModuloSampler(1)
+
+	// initialize our tracer
+	// nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint), zipkin.WithSampler(sampler))
+	nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint))
+	if err != nil {
+		gxlog.CError("unable to create tracer: %+v\n", err)
+	}
+
+	// use zipkin-go-opentracing to wrap our tracer
+	tracer := zipkinot.Wrap(nativeTracer)
+
+	// optionally set as Global OpenTracing tracer instance
+	opentracing.SetGlobalTracer(tracer)
+}
+```
+
+## 配置
+
+服务提供者配置过滤器:
+
+```yaml
+
+services:
+  ...
+filter: "tracing"
+
+```
+
+## 过滤器
+
+Dubbo-go 提供 opentrace filter 实现,基于简单配置即可
+
+```go
+func (tf *tracingFilter) Invoke(ctx context.Context, invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result {
+	var (
+		spanCtx context.Context
+		span    opentracing.Span
+	)
+	operationName := invoker.GetUrl().ServiceKey() + "#" + invocation.MethodName()
+
+	wiredCtx := ctx.Value(constant.TRACING_REMOTE_SPAN_CTX)
+	preSpan := opentracing.SpanFromContext(ctx)
+
+	if preSpan != nil {
+		// it means that someone already create a span to trace, so we use the span to be the parent span
+		span = opentracing.StartSpan(operationName, opentracing.ChildOf(preSpan.Context()))
+		spanCtx = opentracing.ContextWithSpan(ctx, span)
+
+	} else if wiredCtx != nil {
+
+		// it means that there has a remote span, usually from client side. so we use this as the parent
+		span = opentracing.StartSpan(operationName, opentracing.ChildOf(wiredCtx.(opentracing.SpanContext)))
+		spanCtx = opentracing.ContextWithSpan(ctx, span)
+	} else {
+		// it means that there is not any span, so we create a span as the root span.
+		span, spanCtx = opentracing.StartSpanFromContext(ctx, operationName)
+	}
+
+	defer func() {
+		span.Finish()
+	}()
+
+	result := invoker.Invoke(spanCtx, invocation)
+	span.SetTag(successKey, result.Error() == nil)
+	if result.Error() != nil {
+		span.LogFields(log.String(errorKey, result.Error().Error()))
+	}
+	return result
+}
+```
+
+
+## 安装 Zipkin
+
+第一种:
+
+参考 [Zipkin's quick start](https://zipkin.io/pages/quickstart.html) 安装 Zopkin
+
+Follow [Zipkin's quick start](https://zipkin.io/pages/quickstart.html) to install zipkin.
+
+```bash
+curl -sSL https://zipkin.io/quickstart.sh | bash -s
+```
+
+Zipkin支持多种后端存储,包括Cassandra, ElasticSearch和MySQL。这里我们使用最简单的内存存储作为演示目的。
+
+
+```bash
+java -jar zipkin.jar
+```
+
+您可以通过访问 http://localhost:9411 验证安装效果
+
+或者使用 Docker :
+
+See [/dubbo-go-sample/zipkin/docker/docker-compose.yml](docker-compose.yml)
+
+```dockerfile
+version: '2.4'
+
+services:
+  # The zipkin process services the UI, and also exposes a POST endpoint that
+  # instrumentation can send trace data to.
+  zipkin:
+    image: ghcr.io/openzipkin/zipkin-slim:${TAG:-latest}
+    container_name: zipkin
+    # Environment settings are defined here https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#environment-variables
+    environment:
+      - STORAGE_TYPE=mem
+      # Point the zipkin at the storage backend
+      - MYSQL_HOST=mysql
+      # Uncomment to enable self-tracing
+      # - SELF_TRACING_ENABLED=true
+      # Uncomment to increase heap size
+      # - JAVA_OPTS=-Xms128m -Xmx128m -XX:+ExitOnOutOfMemoryError
+    ports:
+      # Port used for the Zipkin UI and HTTP Api
+      - 9411:9411
+    # Uncomment to enable debug logging
+    # command: --logging.level.zipkin2=DEBUG
+```
+
+## 如何运行
+请参阅根目录中的 [HOWTO.md](../HOWTO_zh.md) 来运行本例。
+
+## 效果
+
+链路:
+![zipkin_trace.png](doc/zipkin_trace.png)
diff --git a/openzipkin/doc/app_dependency.png b/openzipkin/doc/app_dependency.png
new file mode 100644
index 0000000..473387d
Binary files /dev/null and b/openzipkin/doc/app_dependency.png differ
diff --git a/openzipkin/doc/zipkin_trace.png b/openzipkin/doc/zipkin_trace.png
new file mode 100644
index 0000000..a43531a
Binary files /dev/null and b/openzipkin/doc/zipkin_trace.png differ
diff --git a/openzipkin/docker-compose.yml b/openzipkin/docker-compose.yml
new file mode 100644
index 0000000..5ee5798
--- /dev/null
+++ b/openzipkin/docker-compose.yml
@@ -0,0 +1,58 @@
+version: '2.4'
+
+services:
+  zipkin:
+    image: ghcr.io/openzipkin/zipkin-slim:${TAG:-latest}
+    container_name: zipkin
+    # Environment settings are defined here https://github.com/openzipkin/zipkin/blob/master/zipkin-server/README.md#environment-variables
+    environment:
+      - STORAGE_TYPE=mem
+      # Point the zipkin at the storage backend
+      - MYSQL_HOST=mysql
+      # Uncomment to enable self-tracing
+      # - SELF_TRACING_ENABLED=true
+      # Uncomment to increase heap size
+      # - JAVA_OPTS=-Xms128m -Xmx128m -XX:+ExitOnOutOfMemoryError
+    ports:
+      # Port used for the Zipkin UI and HTTP Api
+      - 9411:9411
+    # Uncomment to enable debug logging
+    # command: --logging.level.zipkin2=DEBUG
+  prometheus:
+    # Use a quay.io mirror to prevent build outages due to Docker Hub pull quotas
+    # Use latest from https://quay.io/repository/prometheus/prometheus?tab=tags
+    image: quay.io/prometheus/prometheus:latest
+    container_name: prometheus
+    ports:
+      - 9090:9090
+    depends_on:
+      - zipkin
+    volumes:
+      - ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
+
+  grafana:
+    # Use a quay.io mirror to prevent build outages due to Docker Hub pull quotas
+    # Use latest from https://quay.io/repository/app-sre/grafana?tab=tags
+    image: quay.io/app-sre/grafana:7.3.4
+#    image: quay.io/opencloudio/ibm-monitoring-grafana-operator:1.12.0
+    container_name: grafana
+    ports:
+      - 3000:3000
+    depends_on:
+      - prometheus
+    environment:
+      - GF_AUTH_ANONYMOUS_ENABLED=true
+      - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
+
+  setup_grafana_datasource:
+    # This is an arbitrary small image that has curl installed
+    # Use a quay.io mirror to prevent build outages due to Docker Hub pull quotas
+    # Use latest from https://quay.io/repository/quay.io/rackspace/curl?tab=tags
+    image: quay.io/rackspace/curl:7.70.0
+    container_name: setup_grafana_datasource
+    depends_on:
+      - grafana
+    volumes:
+      - ./prometheus/create-datasource-and-dashboard.sh:/tmp/create.sh:ro
+    working_dir: /tmp
+    entrypoint: /tmp/create.sh
\ No newline at end of file
diff --git a/openzipkin/go-client/cmd/client.go b/openzipkin/go-client/cmd/client.go
new file mode 100644
index 0000000..872ef8c
--- /dev/null
+++ b/openzipkin/go-client/cmd/client.go
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package main
+
+import (
+	"context"
+	"contrib.go.opencensus.io/exporter/prometheus"
+	"go.opencensus.io/stats/view"
+	"math/rand"
+	"os"
+	"time"
+)
+
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+	"github.com/dubbogo/gost/log"
+	// tracing zipkin & prometheus
+	"github.com/opentracing/opentracing-go"
+	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
+	"github.com/openzipkin/zipkin-go"
+	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/openzipkin/go-client/pkg"
+)
+
+var userProviderA = new(pkg.UserProviderA)
+var userProviderB = new(pkg.UserProviderB)
+
+func init() {
+	config.SetConsumerService(userProviderA)
+	config.SetConsumerService(userProviderB)
+	hessian.RegisterPOJO(&pkg.User{})
+}
+
+// need to setup environment variable "CONF_CONSUMER_FILE_PATH" to "conf/client.yml" before run
+func main() {
+
+	config.Load()
+
+	// register zipkin & prometheus exporter
+	registerZipkin()
+	registerPrometheus()
+
+	time.Sleep(3 * time.Second)
+
+	gxlog.CInfo("\n\n\nstart to test dubbo")
+
+	getUserAll(context.Background())
+}
+
+func getUserAll(ctx context.Context) {
+	span, ctx := opentracing.StartSpanFromContext(ctx, "getUserAll")
+
+	getUserA(ctx)
+	span.Finish()
+
+	getUserB(ctx)
+	span.Finish()
+
+	getUserA(ctx)
+	span.Finish()
+
+	getUserB(ctx)
+	span.Finish()
+}
+
+func getUserA(ctx context.Context) {
+
+	time.Sleep(time.Duration(rand.Intn(977)+300) * time.Millisecond)
+	user := &pkg.User{}
+	err := userProviderA.GetUser(ctx, []interface{}{"A001"}, user)
+	if err != nil {
+		gxlog.CError("error: %v\n", err)
+		os.Exit(1)
+		return
+	}
+	gxlog.CInfo("response result: %v\n", user)
+
+}
+func getUserB(ctx context.Context) {
+
+	time.Sleep(time.Duration(rand.Intn(977)+300) * time.Millisecond)
+	user := &pkg.User{}
+	err := userProviderB.GetUser(ctx, []interface{}{"A001"}, user)
+	if err != nil {
+		gxlog.CError("error: %v\n", err)
+		os.Exit(1)
+		return
+	}
+	gxlog.CInfo("response result: %v\n", user)
+}
+
+// zipkin / opentracing specific stuff
+func registerZipkin() {
+	// set up a span reporter
+	reporter := zipkinhttp.NewReporter("http://localhost:9411/api/v2/spans")
+
+	// create our local service endpoint
+	endpoint, err := zipkin.NewEndpoint("go-client", "localhost:80")
+	if err != nil {
+		gxlog.CError("unable to create local endpoint: %+v\n", err)
+	}
+
+	// set sampler , default AlwaysSample
+	//sampler := zipkin.NewModuloSampler(1)
+
+	// initialize our tracer
+	//nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint), zipkin.WithSampler(sampler))
+	nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint))
+
+	if err != nil {
+		gxlog.CError("unable to create tracer: %+v\n", err)
+	}
+
+	// use zipkin-go-opentracing to wrap our tracer
+	tracer := zipkinot.Wrap(nativeTracer)
+
+	// optionally set as Global OpenTracing tracer instance
+	opentracing.SetGlobalTracer(tracer)
+}
+
+// register prometheus exporter for zipkin
+func registerPrometheus() *prometheus.Exporter {
+	pe, err := prometheus.NewExporter(prometheus.Options{Namespace: "go-client"})
+	if err != nil {
+		gxlog.CError("Failed to create Prometheus exporter: %v", err)
+	}
+	view.RegisterExporter(pe)
+	return pe
+}
diff --git a/openzipkin/go-client/conf/client.yml b/openzipkin/go-client/conf/client.yml
new file mode 100644
index 0000000..79bd4ad
--- /dev/null
+++ b/openzipkin/go-client/conf/client.yml
@@ -0,0 +1,67 @@
+# dubbo client yaml configure file
+
+check: true
+# client
+request_timeout: "3s"
+# connect timeout
+connect_timeout: "3s"
+
+# application config
+application:
+  organization: "dubbo.io"
+  name: "UserInfoClient"
+  module: "dubbo-go user-info client"
+  version: "0.0.1"
+  environment: "dev"
+
+# registry config
+registries:
+  "demoZk":
+    protocol: "zookeeper"
+    timeout: "3s"
+    address: "127.0.0.1:2181"
+    username: ""
+    password: ""
+
+# reference config
+references:
+  "UserProviderA":
+    registry: "demoZk"
+    protocol: "dubbo"
+    interface: "org.apache.dubbo.UserProviderA"
+    cluster: "failover"
+    methods:
+      - name: "GetUser"
+        retries: 1
+  "UserProviderB":
+    registry: "demoZk"
+    protocol: "dubbo"
+    interface: "org.apache.dubbo.UserProviderB"
+    cluster: "failover"
+    methods:
+      - name: "GetUser"
+        retries: 1
+
+# protocol config
+protocol_conf:
+  dubbo:
+    reconnect_interval: 0
+    connection_number: 1
+    heartbeat_period: "5s"
+    session_timeout: "180s"
+    pool_size: 64
+    pool_ttl: 600
+    getty_session_param:
+      compress_encoding: false
+      tcp_no_delay: true
+      tcp_keep_alive: true
+      keep_alive_period: "120s"
+      tcp_r_buf_size: 262144
+      tcp_w_buf_size: 65536
+      pkg_rq_size: 1024
+      pkg_wq_size: 512
+      tcp_read_timeout: "1s"
+      tcp_write_timeout: "5s"
+      wait_timeout: "1s"
+      max_msg_len: 1024000
+      session_name: "client"
diff --git a/openzipkin/go-client/conf/log.yml b/openzipkin/go-client/conf/log.yml
new file mode 100644
index 0000000..2b6e93a
--- /dev/null
+++ b/openzipkin/go-client/conf/log.yml
@@ -0,0 +1,27 @@
+level: "debug"
+development: true
+disableCaller: false
+disableStacktrace: false
+sampling:
+encoding: "console"
+
+# encoder
+encoderConfig:
+  messageKey: "message"
+  levelKey: "level"
+  timeKey: "time"
+  nameKey: "logger"
+  callerKey: "caller"
+  stacktraceKey: "stacktrace"
+  lineEnding: ""
+  levelEncoder: "capital"
+  timeEncoder: "iso8601"
+  durationEncoder: "seconds"
+  callerEncoder: "short"
+  nameEncoder: ""
+
+outputPaths:
+  - "stderr"
+errorOutputPaths:
+  - "stderr"
+initialFields:
diff --git a/openzipkin/go-client/pkg/user.go b/openzipkin/go-client/pkg/user.go
new file mode 100644
index 0000000..47261a8
--- /dev/null
+++ b/openzipkin/go-client/pkg/user.go
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package pkg
+
+import (
+	"context"
+	"time"
+)
+
+type User struct {
+	ID   string
+	Name string
+	Age  int32
+	Time time.Time
+}
+
+type UserProviderA struct {
+	GetUser func(ctx context.Context, req []interface{}, rsp *User) error
+}
+
+func (u *UserProviderA) Reference() string {
+	return "UserProviderA"
+}
+
+type UserProviderB struct {
+	GetUser func(ctx context.Context, req []interface{}, rsp *User) error
+}
+
+func (u *UserProviderB) Reference() string {
+	return "UserProviderB"
+}
+
+func (User) JavaClassName() string {
+	return "org.apache.dubbo.User"
+}
diff --git a/openzipkin/go-server-a/cmd/server.go b/openzipkin/go-server-a/cmd/server.go
new file mode 100644
index 0000000..fc06874
--- /dev/null
+++ b/openzipkin/go-server-a/cmd/server.go
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package main
+
+import (
+	"fmt"
+	"os"
+	"os/signal"
+	"syscall"
+	"time"
+)
+
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
+	"github.com/apache/dubbo-go/common/logger"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+	gxlog "github.com/dubbogo/gost/log"
+
+	// tracing
+	"github.com/opentracing/opentracing-go"
+	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
+	"github.com/openzipkin/zipkin-go"
+	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/openzipkin/go-server-a/pkg"
+)
+
+var (
+	survivalTimeout = int(3e9)
+)
+
+// need to setup environment variable "CONF_PROVIDER_FILE_PATH" to "conf/server.yml" before run
+func main() {
+
+	hessian.RegisterPOJO(&pkg.User{})
+	config.Load()
+	registerZipkin()
+
+	initSignal()
+}
+
+func initSignal() {
+	signals := make(chan os.Signal, 1)
+	// It is not possible to block SIGKILL or syscall.SIGSTOP
+	signal.Notify(signals, os.Interrupt, os.Kill, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT)
+	for {
+		sig := <-signals
+		logger.Infof("get signal %s", sig.String())
+		switch sig {
+		case syscall.SIGHUP:
+			// reload()
+		default:
+			time.AfterFunc(time.Duration(survivalTimeout), func() {
+				logger.Warnf("app exit now by force...")
+				os.Exit(1)
+			})
+
+			// The program exits normally or timeout forcibly exits.
+			fmt.Println("provider app exit now...")
+			return
+		}
+	}
+}
+func registerZipkin() {
+	// set up a span reporter
+	reporter := zipkinhttp.NewReporter("http://localhost:9411/api/v2/spans")
+
+	// create our local service endpoint
+	endpoint, err := zipkin.NewEndpoint("go-server-a", "localhost:80")
+	if err != nil {
+		gxlog.CError("unable to create local endpoint: %+v\n", err)
+	}
+
+	// initialize our tracer
+	nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint))
+	if err != nil {
+		gxlog.CError("unable to create tracer: %+v\n", err)
+	}
+
+	// use zipkin-go-opentracing to wrap our tracer
+	tracer := zipkinot.Wrap(nativeTracer)
+
+	// optionally set as Global OpenTracing tracer instance
+	opentracing.SetGlobalTracer(tracer)
+}
diff --git a/openzipkin/go-server-a/conf/client.yml b/openzipkin/go-server-a/conf/client.yml
new file mode 100644
index 0000000..78c96f6
--- /dev/null
+++ b/openzipkin/go-server-a/conf/client.yml
@@ -0,0 +1,59 @@
+# dubbo client yaml configure file
+
+check: true
+# client
+request_timeout: "3s"
+# connect timeout
+connect_timeout: "3s"
+
+# application config
+application:
+  organization: "dubbo.io"
+  name: "UserInfoTest"
+  module: "dubbo-go user-info client"
+  version: "0.0.1"
+  environment: "dev"
+
+# registry config
+registries:
+  "demoZk":
+    protocol: "zookeeper"
+    timeout: "3s"
+    address: "127.0.0.1:2181"
+    username: ""
+    password: ""
+
+# reference config
+references:
+  "UserProviderB":
+    registry: "demoZk"
+    protocol: "dubbo"
+    interface: "org.apache.dubbo.UserProviderB"
+    cluster: "failover"
+    methods:
+      - name: "GetUser"
+        retries: 3
+
+# protocol config
+protocol_conf:
+  dubbo:
+    reconnect_interval: 0
+    connection_number: 1
+    heartbeat_period: "5s"
+    session_timeout: "180s"
+    pool_size: 64
+    pool_ttl: 600
+    getty_session_param:
+      compress_encoding: false
+      tcp_no_delay: true
+      tcp_keep_alive: true
+      keep_alive_period: "120s"
+      tcp_r_buf_size: 262144
+      tcp_w_buf_size: 65536
+      pkg_rq_size: 1024
+      pkg_wq_size: 512
+      tcp_read_timeout: "1s"
+      tcp_write_timeout: "5s"
+      wait_timeout: "1s"
+      max_msg_len: 1024000
+      session_name: "client"
diff --git a/openzipkin/go-server-a/conf/log.yml b/openzipkin/go-server-a/conf/log.yml
new file mode 100644
index 0000000..8c3f700
--- /dev/null
+++ b/openzipkin/go-server-a/conf/log.yml
@@ -0,0 +1,27 @@
+level: "info"
+development: true
+disableCaller: false
+disableStacktrace: false
+sampling:
+encoding: "console"
+
+# encoder
+encoderConfig:
+  messageKey: "message"
+  levelKey: "level"
+  timeKey: "time"
+  nameKey: "logger"
+  callerKey: "caller"
+  stacktraceKey: "stacktrace"
+  lineEnding: ""
+  levelEncoder: "capital"
+  timeEncoder: "iso8601"
+  durationEncoder: "seconds"
+  callerEncoder: "short"
+  nameEncoder: ""
+
+outputPaths:
+  - "stderr"
+errorOutputPaths:
+  - "stderr"
+initialFields:
diff --git a/openzipkin/go-server-a/conf/server.yml b/openzipkin/go-server-a/conf/server.yml
new file mode 100644
index 0000000..e5c965c
--- /dev/null
+++ b/openzipkin/go-server-a/conf/server.yml
@@ -0,0 +1,67 @@
+# dubbo server yaml configure file
+
+# application config
+application:
+  organization: "dubbo.io"
+  name: "UserInfoServer"
+  module: "dubbo-go user-info server"
+  version: "0.0.1"
+  environment: "dev"
+
+# registry config
+registries:
+  "demoZk":
+    protocol: "zookeeper"
+    timeout: "3s"
+    address: "127.0.0.1:2181"
+
+# service config
+services:
+  "UserProviderA":
+    registry: "demoZk"
+    protocol: "dubbo"
+    interface: "org.apache.dubbo.UserProviderA"
+    loadbalance: "random"
+    warmup: "100"
+    cluster: "failover"
+    methods:
+      - name: "GetUser"
+        retries: 1
+        loadbalance: "random"
+
+# reference config
+references:
+  "UserProviderB":
+    registry: "demoZk"
+    protocol: "dubbo"
+    interface: "org.apache.dubbo.UserProviderB"
+    cluster: "failover"
+    methods:
+      - name: "GetUser"
+        retries: 3
+
+filter: "tracing"
+
+# protocol config
+protocols:
+  "dubbo":
+    name: "dubbo"
+
+protocol_conf:
+  dubbo:
+    session_number: 700
+    session_timeout: "180s"
+    getty_session_param:
+      compress_encoding: false
+      tcp_no_delay: true
+      tcp_keep_alive: true
+      keep_alive_period: "120s"
+      tcp_r_buf_size: 262144
+      tcp_w_buf_size: 65536
+      pkg_rq_size: 1024
+      pkg_wq_size: 512
+      tcp_read_timeout: "1s"
+      tcp_write_timeout: "5s"
+      wait_timeout: "1s"
+      max_msg_len: 1024000
+      session_name: "server"
diff --git a/openzipkin/go-server-a/docker/docker-compose.yml b/openzipkin/go-server-a/docker/docker-compose.yml
new file mode 100644
index 0000000..8724179
--- /dev/null
+++ b/openzipkin/go-server-a/docker/docker-compose.yml
@@ -0,0 +1,9 @@
+version: '3'
+
+services:
+  zookeeper:
+    image: zookeeper
+    ports:
+      - 2181:2181
+    restart: on-failure
+
diff --git a/openzipkin/go-server-a/pkg/user.go b/openzipkin/go-server-a/pkg/user.go
new file mode 100644
index 0000000..d0ca328
--- /dev/null
+++ b/openzipkin/go-server-a/pkg/user.go
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package pkg
+
+import (
+	"context"
+	"math/rand"
+	"time"
+)
+
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	"github.com/apache/dubbo-go/config"
+	"github.com/dubbogo/gost/log"
+)
+
+var userProviderB = new(UserProviderB)
+
+func init() {
+	config.SetProviderService(new(UserProvider))
+	config.SetConsumerService(userProviderB)
+	hessian.RegisterPOJO(&User{})
+}
+
+type User struct {
+	ID   string
+	Name string
+	Age  int32
+	Time time.Time
+}
+
+type UserProvider struct {
+}
+
+func (u *UserProvider) GetUser(ctx context.Context, req []interface{}) (*User, error) {
+	gxlog.CInfo("req:%#v", req)
+	time.Sleep(time.Duration(rand.Intn(977)+300) * time.Millisecond)
+	rsp := User{"A001", "Alex Stocks In Group A", 18, time.Now()}
+	gxlog.CInfo("rsp:%#v", rsp)
+
+	gxlog.CInfo("request provider B , req:%#v", req)
+	getUserB(ctx)
+
+	return &rsp, nil
+}
+
+func getUserB(ctx context.Context) {
+
+	time.Sleep(time.Duration(rand.Intn(977)+300) * time.Millisecond)
+	user := &User{}
+	err := userProviderB.GetUser(ctx, []interface{}{"A001"}, user)
+	if err != nil {
+		gxlog.CError("error: %v\n", err)
+		return
+	}
+	gxlog.CInfo("response result: %v\n", user)
+}
+
+func (u *UserProvider) Reference() string {
+	return "UserProviderA"
+}
+
+func (u User) JavaClassName() string {
+	return "org.apache.dubbo.User"
+}
+
+type UserProviderB struct {
+	GetUser func(ctx context.Context, req []interface{}, rsp *User) error
+}
+
+func (u *UserProviderB) Reference() string {
+	return "UserProviderB"
+}
diff --git a/openzipkin/go-server-a/tests/integration/main_test.go b/openzipkin/go-server-a/tests/integration/main_test.go
new file mode 100644
index 0000000..4a75f7a
--- /dev/null
+++ b/openzipkin/go-server-a/tests/integration/main_test.go
@@ -0,0 +1,71 @@
+// +build integration
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package integration
+
+import (
+	"context"
+	"os"
+	"testing"
+	"time"
+)
+
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	"github.com/apache/dubbo-go/config"
+
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+)
+
+var userProvider = new(UserProvider)
+
+func TestMain(m *testing.M) {
+	config.SetConsumerService(userProvider)
+	hessian.RegisterPOJO(&User{})
+	config.Load()
+	time.Sleep(3 * time.Second)
+
+	os.Exit(m.Run())
+}
+
+type User struct {
+	ID   string
+	Name string
+	Age  int32
+	Time time.Time
+}
+
+type UserProvider struct {
+	GetUser func(ctx context.Context, req []interface{}, rsp *User) error
+}
+
+func (u *UserProvider) Reference() string {
+	return "UserProvider"
+}
+
+func (User) JavaClassName() string {
+	return "org.apache.dubbo.User"
+}
diff --git a/openzipkin/go-server-a/tests/integration/userprovider_test.go b/openzipkin/go-server-a/tests/integration/userprovider_test.go
new file mode 100644
index 0000000..3c4661a
--- /dev/null
+++ b/openzipkin/go-server-a/tests/integration/userprovider_test.go
@@ -0,0 +1,38 @@
+// +build integration
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package integration
+
+import (
+	"context"
+	"testing"
+)
+import (
+	"github.com/stretchr/testify/assert"
+)
+
+func TestGetUser(t *testing.T) {
+	user := &User{}
+	err := userProvider.GetUser(context.TODO(), []interface{}{"A001"}, user)
+	assert.Nil(t, err)
+	assert.Equal(t, "A001", user.ID)
+	assert.Equal(t, "Alex Stocks In Group A", user.Name)
+	assert.Equal(t, int32(18), user.Age)
+	assert.NotNil(t, user.Time)
+}
diff --git a/openzipkin/go-server-b/cmd/server.go b/openzipkin/go-server-b/cmd/server.go
new file mode 100644
index 0000000..17dfc6c
--- /dev/null
+++ b/openzipkin/go-server-b/cmd/server.go
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package main
+
+import (
+	"fmt"
+	"os"
+	"os/signal"
+	"syscall"
+	"time"
+)
+
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
+	"github.com/apache/dubbo-go/common/logger"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	"github.com/apache/dubbo-go/config"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+	gxlog "github.com/dubbogo/gost/log"
+	// trace: zipkin
+	"github.com/opentracing/opentracing-go"
+	zipkinot "github.com/openzipkin-contrib/zipkin-go-opentracing"
+	"github.com/openzipkin/zipkin-go"
+	zipkinhttp "github.com/openzipkin/zipkin-go/reporter/http"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/openzipkin/go-server-b/pkg"
+)
+
+var (
+	survivalTimeout = int(3e9)
+)
+
+// need to setup environment variable "CONF_PROVIDER_FILE_PATH" to "conf/server.yml" before run
+func main() {
+	hessian.RegisterPOJO(&pkg.User{})
+	config.Load()
+	registerZipkin()
+
+	initSignal()
+}
+
+func initSignal() {
+	signals := make(chan os.Signal, 1)
+	// It is not possible to block SIGKILL or syscall.SIGSTOP
+	signal.Notify(signals, os.Interrupt, os.Kill, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT)
+	for {
+		sig := <-signals
+		logger.Infof("get signal %s", sig.String())
+		switch sig {
+		case syscall.SIGHUP:
+			// reload()
+		default:
+			time.AfterFunc(time.Duration(survivalTimeout), func() {
+				logger.Warnf("app exit now by force...")
+				os.Exit(1)
+			})
+
+			// The program exits normally or timeout forcibly exits.
+			fmt.Println("provider app exit now...")
+			return
+		}
+	}
+}
+func registerZipkin() {
+	// set up a span reporter
+	reporter := zipkinhttp.NewReporter("http://localhost:9411/api/v2/spans")
+
+	// create our local service endpoint
+	endpoint, err := zipkin.NewEndpoint("go-server-b", "localhost:80")
+	if err != nil {
+		gxlog.CError("unable to create local endpoint: %+v\n", err)
+	}
+
+	// initialize our tracer
+	nativeTracer, err := zipkin.NewTracer(reporter, zipkin.WithLocalEndpoint(endpoint))
+	if err != nil {
+		gxlog.CError("unable to create tracer: %+v\n", err)
+	}
+
+	// use zipkin-go-opentracing to wrap our tracer
+	tracer := zipkinot.Wrap(nativeTracer)
+
+	// optionally set as Global OpenTracing tracer instance
+	opentracing.SetGlobalTracer(tracer)
+}
diff --git a/openzipkin/go-server-b/conf/client.yml b/openzipkin/go-server-b/conf/client.yml
new file mode 100644
index 0000000..735fb03
--- /dev/null
+++ b/openzipkin/go-server-b/conf/client.yml
@@ -0,0 +1,60 @@
+# dubbo client yaml configure file
+
+check: true
+# client
+request_timeout: "3s"
+# connect timeout
+connect_timeout: "3s"
+
+# application config
+application:
+  organization: "dubbo.io"
+  name: "UserInfoTest"
+  module: "dubbo-go user-info client"
+  version: "0.0.1"
+  environment: "dev"
+
+# registry config
+registries:
+  "demoZk":
+    protocol: "zookeeper"
+    timeout: "3s"
+    address: "127.0.0.1:2181"
+    username: ""
+    password: ""
+
+# reference config
+references:
+  "UserProvider":
+    registry: "demoZk"
+    protocol: "dubbo"
+    interface: "org.apache.dubbo.UserProvider"
+    group: "GroupB"
+    cluster: "failover"
+    methods:
+      - name: "GetUser"
+        retries: 3
+
+# protocol config
+protocol_conf:
+  dubbo:
+    reconnect_interval: 0
+    connection_number: 1
+    heartbeat_period: "5s"
+    session_timeout: "180s"
+    pool_size: 64
+    pool_ttl: 600
+    getty_session_param:
+      compress_encoding: false
+      tcp_no_delay: true
+      tcp_keep_alive: true
+      keep_alive_period: "120s"
+      tcp_r_buf_size: 262144
+      tcp_w_buf_size: 65536
+      pkg_rq_size: 1024
+      pkg_wq_size: 512
+      tcp_read_timeout: "1s"
+      tcp_write_timeout: "5s"
+      wait_timeout: "1s"
+      max_msg_len: 1024000
+      session_name: "client"
diff --git a/openzipkin/go-server-b/conf/log.yml b/openzipkin/go-server-b/conf/log.yml
new file mode 100644
index 0000000..970d988
--- /dev/null
+++ b/openzipkin/go-server-b/conf/log.yml
@@ -0,0 +1,27 @@
+level: "error"
+development: true
+disableCaller: false
+disableStacktrace: false
+sampling:
+encoding: "console"
+
+# encoder
+encoderConfig:
+  messageKey: "message"
+  levelKey: "level"
+  timeKey: "time"
+  nameKey: "logger"
+  callerKey: "caller"
+  stacktraceKey: "stacktrace"
+  lineEnding: ""
+  levelEncoder: "capital"
+  timeEncoder: "iso8601"
+  durationEncoder: "seconds"
+  callerEncoder: "short"
+  nameEncoder: ""
+
+outputPaths:
+  - "stderr"
+errorOutputPaths:
+  - "stderr"
+initialFields:
diff --git a/openzipkin/go-server-b/conf/server.yml b/openzipkin/go-server-b/conf/server.yml
new file mode 100644
index 0000000..c96d38a
--- /dev/null
+++ b/openzipkin/go-server-b/conf/server.yml
@@ -0,0 +1,57 @@
+# dubbo server yaml configure file
+
+# application config
+application:
+  organization: "dubbo.io"
+  name: "UserInfoServer"
+  module: "dubbo-go user-info server"
+  version: "0.0.1"
+  environment: "dev"
+
+# registry config
+registries:
+  "demoZk":
+    protocol: "zookeeper"
+    timeout: "3s"
+    address: "127.0.0.1:2181"
+
+# service config
+services:
+  "UserProviderB":
+    registry: "demoZk"
+    protocol: "dubbo"
+    interface: "org.apache.dubbo.UserProviderB"
+    loadbalance: "random"
+    warmup: "100"
+    cluster: "failover"
+    methods:
+      - name: "GetUser"
+        retries: 1
+        loadbalance: "random"
+
+#filter: "zipkin"
+filter: "tracing"
+
+# protocol config
+protocols:
+  "dubbo":
+    name: "dubbo"
+
+protocol_conf:
+  dubbo:
+    session_number: 700
+    session_timeout: "180s"
+    getty_session_param:
+      compress_encoding: false
+      tcp_no_delay: true
+      tcp_keep_alive: true
+      keep_alive_period: "120s"
+      tcp_r_buf_size: 262144
+      tcp_w_buf_size: 65536
+      pkg_rq_size: 1024
+      pkg_wq_size: 512
+      tcp_read_timeout: "1s"
+      tcp_write_timeout: "5s"
+      wait_timeout: "1s"
+      max_msg_len: 1024000
+      session_name: "server"
diff --git a/openzipkin/go-server-b/docker/docker-compose.yml b/openzipkin/go-server-b/docker/docker-compose.yml
new file mode 100644
index 0000000..8724179
--- /dev/null
+++ b/openzipkin/go-server-b/docker/docker-compose.yml
@@ -0,0 +1,9 @@
+version: '3'
+
+services:
+  zookeeper:
+    image: zookeeper
+    ports:
+      - 2181:2181
+    restart: on-failure
+
diff --git a/openzipkin/go-server-b/pkg/user.go b/openzipkin/go-server-b/pkg/user.go
new file mode 100644
index 0000000..aee528a
--- /dev/null
+++ b/openzipkin/go-server-b/pkg/user.go
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package pkg
+
+import (
+	"context"
+	"math/rand"
+	"time"
+)
+
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	"github.com/apache/dubbo-go/config"
+	"github.com/dubbogo/gost/log"
+)
+
+func init() {
+	config.SetProviderService(new(UserProvider))
+	// ------for hessian2------
+	hessian.RegisterPOJO(&User{})
+}
+
+type User struct {
+	ID   string
+	Name string
+	Age  int32
+	Time time.Time
+}
+
+type UserProvider struct {
+}
+
+func (u *UserProvider) GetUser(ctx context.Context, req []interface{}) (*User, error) {
+	gxlog.CInfo("req:%#v", req)
+	time.Sleep(time.Duration(rand.Intn(977)+300) * time.Millisecond)
+	rsp := User{"A001", "Alex Stocks In Provider B", 18, time.Now()}
+	gxlog.CInfo("rsp:%#v", rsp)
+	return &rsp, nil
+}
+
+func (u *UserProvider) Reference() string {
+	return "UserProviderB"
+}
+
+func (u User) JavaClassName() string {
+	return "org.apache.dubbo.User"
+}
diff --git a/openzipkin/go-server-b/tests/integration/main_test.go b/openzipkin/go-server-b/tests/integration/main_test.go
new file mode 100644
index 0000000..4a75f7a
--- /dev/null
+++ b/openzipkin/go-server-b/tests/integration/main_test.go
@@ -0,0 +1,71 @@
+// +build integration
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package integration
+
+import (
+	"context"
+	"os"
+	"testing"
+	"time"
+)
+
+import (
+	hessian "github.com/apache/dubbo-go-hessian2"
+	"github.com/apache/dubbo-go/config"
+
+	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
+	_ "github.com/apache/dubbo-go/cluster/loadbalance"
+	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
+	_ "github.com/apache/dubbo-go/filter/filter_impl"
+	_ "github.com/apache/dubbo-go/metadata/service/inmemory"
+	_ "github.com/apache/dubbo-go/protocol/dubbo"
+	_ "github.com/apache/dubbo-go/registry/protocol"
+	_ "github.com/apache/dubbo-go/registry/zookeeper"
+)
+
+var userProvider = new(UserProvider)
+
+func TestMain(m *testing.M) {
+	config.SetConsumerService(userProvider)
+	hessian.RegisterPOJO(&User{})
+	config.Load()
+	time.Sleep(3 * time.Second)
+
+	os.Exit(m.Run())
+}
+
+type User struct {
+	ID   string
+	Name string
+	Age  int32
+	Time time.Time
+}
+
+type UserProvider struct {
+	GetUser func(ctx context.Context, req []interface{}, rsp *User) error
+}
+
+func (u *UserProvider) Reference() string {
+	return "UserProvider"
+}
+
+func (User) JavaClassName() string {
+	return "org.apache.dubbo.User"
+}
diff --git a/openzipkin/go-server-b/tests/integration/userprovider_test.go b/openzipkin/go-server-b/tests/integration/userprovider_test.go
new file mode 100644
index 0000000..3726251
--- /dev/null
+++ b/openzipkin/go-server-b/tests/integration/userprovider_test.go
@@ -0,0 +1,39 @@
+// +build integration
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package integration
+
+import (
+	"context"
+	"testing"
+)
+
+import (
+	"github.com/stretchr/testify/assert"
+)
+
+func TestGetUser(t *testing.T) {
+	user := &User{}
+	err := userProvider.GetUser(context.TODO(), []interface{}{"A001"}, user)
+	assert.Nil(t, err)
+	assert.Equal(t, "A001", user.ID)
+	assert.Equal(t, "Alex Stocks In Group B", user.Name)
+	assert.Equal(t, int32(18), user.Age)
+	assert.NotNil(t, user.Time)
+}
diff --git a/openzipkin/prometheus/create-datasource-and-dashboard.sh b/openzipkin/prometheus/create-datasource-and-dashboard.sh
new file mode 100644
index 0000000..76b88cc
--- /dev/null
+++ b/openzipkin/prometheus/create-datasource-and-dashboard.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# Copyright 2015-2020 The OpenZipkin Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+# in compliance with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software distributed under the License
+# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# or implied. See the License for the specific language governing permissions and limitations under
+# the License.
+#
+
+set -xeuo pipefail
+
+if ! curl --retry 5 --retry-connrefused --retry-delay 0 -sf http://grafana:3000/api/datasources/name/prom; then
+    curl -sf -X POST -H "Content-Type: application/json" \
+         --data-binary '{"name":"prom","type":"prometheus","url":"http://prometheus:9090","access":"proxy","isDefault":true}' \
+         http://grafana:3000/api/datasources
+fi
+
+dashboard_id=1598
+last_revision=$(curl -sf https://grafana.com/api/dashboards/${dashboard_id}/revisions | grep '"revision":' | sed 's/ *"revision": \([0-9]*\),/\1/' | sort -n | tail -1)
+
+echo '{"dashboard": ' > data.json
+curl -s https://grafana.com/api/dashboards/${dashboard_id}/revisions/${last_revision}/download >> data.json
+echo ', "inputs": [{"name": "DS_PROMETHEUS", "pluginId": "prometheus", "type": "datasource", "value": "prom"}], "overwrite": false}' >> data.json
+curl --retry-connrefused --retry 5 --retry-delay 0 -sf \
+     -X POST -H "Content-Type: application/json" \
+     --data-binary @data.json \
+     http://grafana:3000/api/dashboards/import
diff --git a/openzipkin/prometheus/prometheus.yml b/openzipkin/prometheus/prometheus.yml
new file mode 100644
index 0000000..3c0c1bc
--- /dev/null
+++ b/openzipkin/prometheus/prometheus.yml
@@ -0,0 +1,13 @@
+global:
+  scrape_interval:     15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
+  evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
+
+scrape_configs:
+  - job_name: 'prometheus'
+    static_configs:
+      - targets: ['localhost:9090']
+  - job_name: 'zipkin'
+    scrape_interval: 5s
+    metrics_path: '/prometheus'
+    static_configs:
+      - targets: ['zipkin:9411']
\ No newline at end of file

[dubbo-go-samples] 03/12: Merge branch 'master' of https://github.com/apache/dubbo-go-samples

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit e5ff594d1f464ec5a39316d3c5900ee4b28e1cfc
Merge: b16311f d3073eb
Author: AlexStocks <al...@foxmail.com>
AuthorDate: Sun May 16 22:37:22 2021 +0800

    Merge branch 'master' of https://github.com/apache/dubbo-go-samples

 .run/seata/seata_client_app.run.xml                |  16 ++
 .run/seata/seata_order-svc_app.run.xml             |  16 ++
 .run/seata/seata_product-svc_app.run.xml           |  16 ++
 .run/version/version-go-client.run.xml             |  15 ++
 .run/version/version-go-server-v1.run.xml          |  15 ++
 .run/version/version-go-server-v2.run.xml          |  15 ++
 context/README_zh.md                               |   6 +-
 game/README.md                                     | 294 +++++++++++++++++++-
 game/README_zh.md                                  | 298 ++++++++++++++++++++-
 game/go-server-game/cmd/server.go                  |  12 +-
 game/go-server-game/conf/client.yml                |   8 -
 game/go-server-game/conf/server.yml                |  14 -
 game/go-server-game/pkg/consumer.go                |   4 +-
 game/go-server-game/pkg/main.go                    |  17 --
 game/go-server-game/pkg/provider.go                | 112 +++++---
 .../tests/integration/gameprovider_test.go         |  14 +-
 game/go-server-gate/cmd/server.go                  |  72 ++++-
 game/go-server-gate/conf/client.yml                |  13 -
 game/go-server-gate/conf/server.yml                |  11 -
 game/go-server-gate/pkg/consumer.go                |  17 +-
 game/go-server-gate/pkg/main.go                    |  17 --
 game/go-server-gate/pkg/provider.go                |  11 -
 game/pkg/consumer/game/basketball.go               |   6 +-
 game/pkg/consumer/game/jump.go                     |  16 --
 game/pkg/consumer/gate/jump.go                     |  14 -
 game/pkg/pojo/info.go                              |  10 +
 game/website/.DS_Store                             | Bin 0 -> 6148 bytes
 game/website/css/style.css                         |  54 ++++
 game/website/img/bac.png                           | Bin 0 -> 313830 bytes
 game/website/index.html                            |  56 ++++
 game/website/js/api.js                             |  64 +++++
 game/website/js/index.js                           | 130 +++++++++
 multi-registry/go-server/conf/client.yml           |   2 +-
 seata/client/app/svc/svc.go                        |  18 +-
 seata/order-svc/app/order_svc.go                   |   9 +-
 seata/product-svc/app/product_svc.go               |   9 +-
 start_integrate_test.sh                            |   9 +-
 version/README.md                                  | 139 ++++++++++
 version/README_zh.md                               | 130 +++++++++
 .../app/order_svc.go => version/go-api/pkg/user.go |  41 ++-
 version/go-client/cmd/client.go                    |  74 +++++
 version/go-client/conf/client.yml                  |  37 +++
 version/go-client/conf/log.yml                     |  28 ++
 version/go-server-v1/cmd/server.go                 |  87 ++++++
 .../go-server-v1}/conf/client.yml                  |  13 +-
 version/go-server-v1/conf/log.yml                  |  28 ++
 .../go-server-v1}/conf/server.yml                  |  27 +-
 version/go-server-v1/docker/docker-compose.yml     |   9 +
 .../go-server-v1/pkg/user.go                       |  36 ++-
 .../go-server-v1/tests/integration/main_test.go    |  71 +++++
 .../tests/integration/userprovider_test.go         |  43 ++-
 version/go-server-v2/cmd/server.go                 |  85 ++++++
 .../go-server-v2}/conf/client.yml                  |  13 +-
 version/go-server-v2/conf/log.yml                  |  28 ++
 .../go-server-v2}/conf/server.yml                  |  27 +-
 version/go-server-v2/docker/docker-compose.yml     |   9 +
 .../go-server-v2/pkg/user.go                       |  39 ++-
 .../go-server-v2/tests/integration/main_test.go    |  71 +++++
 .../tests/integration/userprovider_test.go         |  43 ++-
 59 files changed, 2100 insertions(+), 388 deletions(-)

[dubbo-go-samples] 06/12: update: add `openzipkin`, `version` intro to dubbo-go readme, fix quote of openzipkin readme (#120)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit 2bbf31fae179d47124b9471bdc7b488fa1996e49
Author: phil <ph...@foxmail.com>
AuthorDate: Sun May 30 16:25:50 2021 +0800

    update: add `openzipkin`,`version` intro to dubbo-go readme, fix quote of openzipkin readme (#120)
---
 README.md               | 4 +++-
 README_zh.md            | 4 +++-
 openzipkin/README.md    | 4 ++--
 openzipkin/README_zh.md | 2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 6b96b5e..9da44f2 100644
--- a/README.md
+++ b/README.md
@@ -22,12 +22,14 @@
 * multi-registry: Register services to different registry centers
 * multi-zone: Call Dubbo services from different zones
 * multi_registry: A multi-registry example
+* openzipkin: Zipkin in Dubbo-go example, It helps Dubbo-go gathering tracing data for troubleshoot latency problems
 * registry: uses of different registres, including kubernetes, nacos, etcd and service-discovery
 * router: router examples, including condition and tag
 * seata: A seata example
-* shopping-center: A complete shopping sample
+* shopping-order: A complete shopping sample
 * tls: Use TLS in Dubbo-go application
 * tracing: tracing example
+* version: multiple versions example
 
 ## How To Run
 
diff --git a/README_zh.md b/README_zh.md
index ed14a44..0c55925 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -21,12 +21,14 @@
 * metric: 在 Dubbo-go 中使用 metrics  
 * multi-registry: 多注册
 * multi-zone: 多区域  
+* openzipkin: Zipkin 在 Dubbo-go 应用示例,收集 Dubbo-go 服务中的延迟问题所需的链路时序数据
 * registry: 展示与不同注册中心的对接,包含了 nacos、etcd、kubernetes 和 servicediscovery
 * router: 展示了不同的路由,包含了 condition 和 tag
 * seata: 展示了与 seata 的对接
-* shopping-center: 一个在线商店的完整的例子
+* shopping-order: 一个在线商店的完整的例子
 * tls: 在 Dubbo-go 中使用 TLS
 * tracing: 链路追踪
+* version: 多版本服务调用示例
 
 ## 如何运行
 
diff --git a/openzipkin/README.md b/openzipkin/README.md
index 54ef3db..c7be740 100644
--- a/openzipkin/README.md
+++ b/openzipkin/README.md
@@ -135,7 +135,7 @@ Once the process starts, you can verify zipkin server works by access http://loc
 
 Or Use Docker:
 
-See [/dubbo-go-sample/zipkin/docker/docker-compose.yml](docker-compose.yml)
+See [/dubbo-go-sample/openzipkin/docker/docker-compose.yml](docker-compose.yml)
 
 ```dockerfile
 services:
@@ -166,7 +166,7 @@ docker-compose -f docker/docker-compose.yml up -d zipkin
 
 ### How To Run
 
-Refer to  [HOWTO.md](../HOWTO_zh.md) under the root directory to run this sample.
+Refer to  [HOWTO.md](../HOWTO.md) under the root directory to run this sample.
 
 ## The End
 
diff --git a/openzipkin/README_zh.md b/openzipkin/README_zh.md
index 72d8ec3..236feb8 100644
--- a/openzipkin/README_zh.md
+++ b/openzipkin/README_zh.md
@@ -143,7 +143,7 @@ java -jar zipkin.jar
 
 或者使用 Docker :
 
-See [/dubbo-go-sample/zipkin/docker/docker-compose.yml](docker-compose.yml)
+See [/dubbo-go-sample/openzipkin/docker/docker-compose.yml](docker-compose.yml)
 
 ```dockerfile
 version: '2.4'

[dubbo-go-samples] 07/12: fix: add grpc provider reference in codes generated by protoc-gen-dubbo (#127)

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit f19f6f61a2b7490415a0fe6c73a594e1c4fdeed4
Author: Laurence <45...@users.noreply.github.com>
AuthorDate: Fri Jun 11 19:14:01 2021 +0800

    fix: add grpc provider reference in codes generated by protoc-gen-dubbo (#127)
    
    * fix: add grpc provider reference
    
    * fix: fix grpc intergration test
---
 general/grpc/go-client/cmd/client.go               | 10 ++--
 general/grpc/go-client/conf/client.yml             |  2 +-
 general/grpc/go-client/pkg/hello.go                | 36 ---------------
 general/grpc/go-server/cmd/server.go               |  5 +-
 general/grpc/go-server/conf/client.yml             |  2 +-
 general/grpc/go-server/conf/server.yml             |  2 +-
 general/grpc/go-server/pkg/greeter.go              |  4 --
 .../go-server/tests/integration/greeter_test.go    | 10 +++-
 .../grpc/go-server/tests/integration/main_test.go  | 21 ++-------
 general/grpc/protobuf/helloworld.pb.go             |  8 +++-
 general/grpc/stream/go-client/app/client.go        |  7 ++-
 general/grpc/stream/go-client/app/hello.go         | 50 --------------------
 general/grpc/stream/go-client/app/helloworld.pb.go |  4 ++
 .../grpc/stream/go-client/profiles/dev/client.yml  | 46 +++++++++---------
 .../grpc/stream/go-client/profiles/test/client.yml | 42 ++++++++---------
 general/grpc/stream/go-server/app/greeter.go       |  4 --
 general/grpc/stream/go-server/app/helloworld.pb.go |  4 ++
 .../grpc/stream/go-server/profiles/dev/server.yml  | 36 +++++++--------
 .../stream/go-server/profiles/release/server.yml   | 35 +++++++-------
 .../grpc/stream/go-server/profiles/test/server.yml |  8 ++--
 general/grpc/unary/go-client/app/client.go         | 10 ++--
 general/grpc/unary/go-client/app/hello.go          | 43 -----------------
 general/grpc/unary/go-client/app/helloworld.pb.go  | 23 +++++----
 general/grpc/unary/go-client/app/helloworld.proto  |  4 +-
 .../grpc/unary/go-client/profiles/dev/client.yml   |  2 +-
 .../unary/go-client/profiles/release/client.yml    |  2 +-
 .../grpc/unary/go-client/profiles/test/client.yml  |  2 +-
 general/grpc/unary/go-server/app/greeter.go        | 15 ++----
 general/grpc/unary/go-server/app/helloworld.pb.go  | 54 ++++++++++++----------
 .../grpc/unary/go-server/profiles/dev/server.yml   |  2 +-
 .../unary/go-server/profiles/release/server.yml    |  2 +-
 .../grpc/unary/go-server/profiles/test/server.yml  |  2 +-
 go.sum                                             |  1 +
 33 files changed, 183 insertions(+), 315 deletions(-)

diff --git a/general/grpc/go-client/cmd/client.go b/general/grpc/go-client/cmd/client.go
index a22f23a..919c92c 100644
--- a/general/grpc/go-client/cmd/client.go
+++ b/general/grpc/go-client/cmd/client.go
@@ -19,9 +19,6 @@ package main
 
 import (
 	"context"
-	"github.com/apache/dubbo-go-samples/general/grpc/go-client/pkg"
-	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
-	"github.com/dubbogo/gost/log"
 	"time"
 )
 
@@ -35,9 +32,14 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/grpc"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+	"github.com/dubbogo/gost/log"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
 )
 
-var grpcGreeterImpl = new(pkg.GrpcGreeterImpl)
+var grpcGreeterImpl = new(protobuf.GreeterClientImpl)
 
 func init() {
 	config.SetConsumerService(grpcGreeterImpl)
diff --git a/general/grpc/go-client/conf/client.yml b/general/grpc/go-client/conf/client.yml
index e440222..9342221 100644
--- a/general/grpc/go-client/conf/client.yml
+++ b/general/grpc/go-client/conf/client.yml
@@ -25,7 +25,7 @@ registries:
 
 # reference config
 references:
-  "GrpcGreeterImpl":
+  "greeterImpl":
     registry: "demoZk"
     protocol: "grpc"
     interface: "org.apache.dubbo.GreeterGrpc$IGreeter"
diff --git a/general/grpc/go-client/pkg/hello.go b/general/grpc/go-client/pkg/hello.go
deleted file mode 100644
index d133e1f..0000000
--- a/general/grpc/go-client/pkg/hello.go
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package pkg
-
-import (
-	"context"
-	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
-	"google.golang.org/grpc"
-)
-
-type GrpcGreeterImpl struct {
-	SayHello func(ctx context.Context, in *protobuf.HelloRequest, out *protobuf.HelloReply) error
-}
-
-func (u *GrpcGreeterImpl) Reference() string {
-	return "GrpcGreeterImpl"
-}
-
-func (u *GrpcGreeterImpl) GetDubboStub(cc *grpc.ClientConn) protobuf.GreeterClient {
-	return protobuf.NewGreeterClient(cc)
-}
diff --git a/general/grpc/go-server/cmd/server.go b/general/grpc/go-server/cmd/server.go
index b4d9875..984fcc5 100644
--- a/general/grpc/go-server/cmd/server.go
+++ b/general/grpc/go-server/cmd/server.go
@@ -19,7 +19,6 @@ package main
 
 import (
 	"fmt"
-	"github.com/apache/dubbo-go-samples/general/grpc/go-server/pkg"
 	"os"
 	"os/signal"
 	"syscall"
@@ -38,6 +37,10 @@ import (
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
 )
 
+import(
+	"github.com/apache/dubbo-go-samples/general/grpc/go-server/pkg"
+)
+
 var (
 	survivalTimeout = int(3 * time.Second)
 )
diff --git a/general/grpc/go-server/conf/client.yml b/general/grpc/go-server/conf/client.yml
index 615cd74..53ac35c 100644
--- a/general/grpc/go-server/conf/client.yml
+++ b/general/grpc/go-server/conf/client.yml
@@ -25,7 +25,7 @@ registries:
 
 # reference config
 references:
-  "GrpcGreeterImpl":
+  "greeterImpl":
     registry: "demoZk"
     protocol: "grpc"
     interface: "org.apache.dubbo.GreeterGrpc$IGreeter"
diff --git a/general/grpc/go-server/conf/server.yml b/general/grpc/go-server/conf/server.yml
index 083bdd9..6cf6d5d 100644
--- a/general/grpc/go-server/conf/server.yml
+++ b/general/grpc/go-server/conf/server.yml
@@ -17,7 +17,7 @@ registries:
 
 # service config
 services:
-  "GrpcGreeterImpl":
+  "greeterImpl":
     registry: "zk"
     protocol: "grpc"
     interface: "org.apache.dubbo.GreeterGrpc$IGreeter"
diff --git a/general/grpc/go-server/pkg/greeter.go b/general/grpc/go-server/pkg/greeter.go
index 7f26eb0..154d35d 100644
--- a/general/grpc/go-server/pkg/greeter.go
+++ b/general/grpc/go-server/pkg/greeter.go
@@ -37,7 +37,3 @@ func (g *GreeterProvider) SayHello(ctx context.Context, req *protobuf.HelloReque
 	fmt.Printf("req: %v", req)
 	return &protobuf.HelloReply{Message: "this is message from reply"}, nil
 }
-
-func (g *GreeterProvider) Reference() string {
-	return "GrpcGreeterImpl"
-}
diff --git a/general/grpc/go-server/tests/integration/greeter_test.go b/general/grpc/go-server/tests/integration/greeter_test.go
index 23c30d5..45eccdd 100644
--- a/general/grpc/go-server/tests/integration/greeter_test.go
+++ b/general/grpc/go-server/tests/integration/greeter_test.go
@@ -21,11 +21,17 @@ package integration
 
 import (
 	"context"
-	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
-	"github.com/stretchr/testify/assert"
 	"testing"
 )
 
+import(
+	"github.com/stretchr/testify/assert"
+)
+
+import (
+	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
+)
+
 func TestGreeter(t *testing.T) {
 	reply := &protobuf.HelloReply{}
 	req := &protobuf.HelloRequest{
diff --git a/general/grpc/go-server/tests/integration/main_test.go b/general/grpc/go-server/tests/integration/main_test.go
index 909161a..74a9c4a 100644
--- a/general/grpc/go-server/tests/integration/main_test.go
+++ b/general/grpc/go-server/tests/integration/main_test.go
@@ -20,10 +20,6 @@
 package integration
 
 import (
-	"context"
-	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
-	"google.golang.org/grpc"
-
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -40,8 +36,11 @@ import (
 	"testing"
 	"time"
 )
+import (
+	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
+)
 
-var grpcGreeterImpl = new(GrpcGreeterImpl)
+var grpcGreeterImpl = new(protobuf.GreeterClientImpl)
 
 func TestMain(m *testing.M) {
 	config.SetConsumerService(grpcGreeterImpl)
@@ -50,15 +49,3 @@ func TestMain(m *testing.M) {
 
 	os.Exit(m.Run())
 }
-
-type GrpcGreeterImpl struct {
-	SayHello func(ctx context.Context, in *protobuf.HelloRequest, out *protobuf.HelloReply) error
-}
-
-func (u *GrpcGreeterImpl) Reference() string {
-	return "GrpcGreeterImpl"
-}
-
-func (u *GrpcGreeterImpl) GetDubboStub(cc *grpc.ClientConn) protobuf.GreeterClient {
-	return protobuf.NewGreeterClient(cc)
-}
diff --git a/general/grpc/protobuf/helloworld.pb.go b/general/grpc/protobuf/helloworld.pb.go
index fe0c3c8..8124c8f 100644
--- a/general/grpc/protobuf/helloworld.pb.go
+++ b/general/grpc/protobuf/helloworld.pb.go
@@ -243,6 +243,10 @@ func (s *GreeterProviderBase) GetProxyImpl() protocol.Invoker {
 	return s.proxyImpl
 }
 
+func (c *GreeterProviderBase) Reference() string {
+	return "greeterImpl"
+}
+
 func _DUBBO_Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(HelloRequest)
 	if err := dec(in); err != nil {
@@ -253,7 +257,7 @@ func _DUBBO_Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec f
 	args = append(args, in)
 	invo := invocation.NewRPCInvocation("SayHello", args, nil)
 	if interceptor == nil {
-		result := base.GetProxyImpl().Invoke(context.Background(), invo)
+		result := base.GetProxyImpl().Invoke(ctx, invo)
 		return result.Result(), result.Error()
 	}
 	info := &grpc.UnaryServerInfo{
@@ -261,7 +265,7 @@ func _DUBBO_Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec f
 		FullMethod: "/protobuf.Greeter/SayHello",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		result := base.GetProxyImpl().Invoke(context.Background(), invo)
+		result := base.GetProxyImpl().Invoke(ctx, invo)
 		return result.Result(), result.Error()
 	}
 	return interceptor(ctx, in, info, handler)
diff --git a/general/grpc/stream/go-client/app/client.go b/general/grpc/stream/go-client/app/client.go
index b2431b9..ede6be7 100644
--- a/general/grpc/stream/go-client/app/client.go
+++ b/general/grpc/stream/go-client/app/client.go
@@ -28,7 +28,6 @@ import (
 
 import (
 	_ "github.com/apache/dubbo-go/cluster/cluster_impl"
-	gxlog "github.com/dubbogo/gost/log"
 	_ "github.com/apache/dubbo-go/cluster/loadbalance"
 	"github.com/apache/dubbo-go/common/logger"
 	_ "github.com/apache/dubbo-go/common/proxy/proxy_factory"
@@ -38,11 +37,17 @@ import (
 	_ "github.com/apache/dubbo-go/protocol/grpc"
 	_ "github.com/apache/dubbo-go/registry/protocol"
 	_ "github.com/apache/dubbo-go/registry/zookeeper"
+	gxlog "github.com/dubbogo/gost/log"
 )
 
 var (
 	survivalTimeout int = 10e9
 )
+var grpcGreeterImpl = new(GreeterClientImpl)
+
+func init() {
+	config.SetConsumerService(grpcGreeterImpl)
+}
 
 // they are necessary:
 // 		export CONF_CONSUMER_FILE_PATH="xxx"
diff --git a/general/grpc/stream/go-client/app/hello.go b/general/grpc/stream/go-client/app/hello.go
deleted file mode 100644
index 1066565..0000000
--- a/general/grpc/stream/go-client/app/hello.go
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
-	"context"
-)
-
-import (
-	"google.golang.org/grpc"
-)
-
-import (
-	"github.com/apache/dubbo-go/config"
-)
-
-var grpcGreeterImpl = new(GrpcGreeterImpl)
-
-func init() {
-	config.SetConsumerService(grpcGreeterImpl)
-}
-
-type GrpcGreeterImpl struct {
-	SayHelloTwoSidesStream func(ctx context.Context) (Greeter_SayHelloTwoSidesStreamClient, error)
-	SayHelloClientStream   func(ctx context.Context) (Greeter_SayHelloClientStreamClient, error)
-	SayHelloServerStream   func(ctx context.Context, request *HelloRequest) (Greeter_SayHelloServerStreamClient, error)
-}
-
-func (u *GrpcGreeterImpl) Reference() string {
-	return "GrpcGreeterImpl"
-}
-
-func (u *GrpcGreeterImpl) GetDubboStub(cc *grpc.ClientConn) GreeterClient {
-	return NewGreeterClient(cc)
-}
diff --git a/general/grpc/stream/go-client/app/helloworld.pb.go b/general/grpc/stream/go-client/app/helloworld.pb.go
index 2183a4f..4bdfb1e 100644
--- a/general/grpc/stream/go-client/app/helloworld.pb.go
+++ b/general/grpc/stream/go-client/app/helloworld.pb.go
@@ -413,6 +413,10 @@ func (s *GreeterProviderBase) GetProxyImpl() protocol.Invoker {
 	return s.proxyImpl
 }
 
+func (c *GreeterProviderBase) Reference() string {
+	return "greeterImpl"
+}
+
 func _DUBBO_Greeter_SayHelloTwoSidesStream_Handler(srv interface{}, stream grpc.ServerStream) error {
 	_, ok := srv.(dgrpc.DubboGrpcService)
 	invo := invocation.NewRPCInvocation("SayHelloTwoSidesStream", nil, nil)
diff --git a/general/grpc/stream/go-client/profiles/dev/client.yml b/general/grpc/stream/go-client/profiles/dev/client.yml
index b2bc054..53ac35c 100644
--- a/general/grpc/stream/go-client/profiles/dev/client.yml
+++ b/general/grpc/stream/go-client/profiles/dev/client.yml
@@ -1,42 +1,40 @@
 # dubbo client yaml configure file
 
-
 check: true
 # client
-request_timeout : "3s"
+request_timeout: "3s"
 # connect timeout
-connect_timeout : "3s"
+connect_timeout: "3s"
 
 # application config
 application:
-  organization : "ikurento.com"
-  name  : "BDTService"
-  module : "dubbogo say-hello client"
-  version : "0.0.1"
-  owner : "ZX"
-  environment : "dev"
-
-registries :
-  "zk":
+  organization: "dubbo.io"
+  name: "GreeterGrpcTest"
+  module: "dubbo-go greeter grpc client"
+  version: "0.0.1"
+  environment: "dev"
+
+# registry config
+registries:
+  "demoZk":
     protocol: "zookeeper"
-    timeout	: "3s"
+    timeout: "3s"
     address: "127.0.0.1:2181"
     username: ""
     password: ""
 
-
+# reference config
 references:
-  "GrpcGreeterImpl":
-    # 可以指定多个registry,使用逗号隔开;不指定默认向所有注册中心注册
-    registry: "zk"
-    protocol : "grpc"
-    interface : "io.grpc.examples.helloworld.GreeterGrpc$IGreeter"
+  "greeterImpl":
+    registry: "demoZk"
+    protocol: "grpc"
+    interface: "org.apache.dubbo.GreeterGrpc$IGreeter"
     cluster: "failover"
-    methods :
-    - name: "SayHello"
-      retries: 3
-
+    methods:
+      - name: "SayHello"
+        retries: 3
 
+# protocol config
 protocol_conf:
   grpc:
     reconnect_interval: 0
@@ -58,4 +56,4 @@ protocol_conf:
       tcp_write_timeout: "5s"
       wait_timeout: "1s"
       max_msg_len: 10240
-      session_name: "client"
\ No newline at end of file
+      session_name: "client"
diff --git a/general/grpc/stream/go-client/profiles/test/client.yml b/general/grpc/stream/go-client/profiles/test/client.yml
index e0c0737..53ac35c 100644
--- a/general/grpc/stream/go-client/profiles/test/client.yml
+++ b/general/grpc/stream/go-client/profiles/test/client.yml
@@ -1,45 +1,40 @@
 # dubbo client yaml configure file
 
-
 check: true
 # client
-request_timeout : "3s"
+request_timeout: "3s"
 # connect timeout
-connect_timeout : "3s"
-
-config_center:
-  protocol: "zookeeper"
-  address: "127.0.0.1:2181"
+connect_timeout: "3s"
 
 # application config
 application:
-  organization : "ikurento.com"
-  name  : "BDTService"
-  module : "dubbogo say-hello client"
-  version : "0.0.1"
-  owner : "ZX"
-  environment : "dev"
-
-registries :
+  organization: "dubbo.io"
+  name: "GreeterGrpcTest"
+  module: "dubbo-go greeter grpc client"
+  version: "0.0.1"
+  environment: "dev"
+
+# registry config
+registries:
   "demoZk":
     protocol: "zookeeper"
-    timeout	: "3s"
+    timeout: "3s"
     address: "127.0.0.1:2181"
     username: ""
     password: ""
 
+# reference config
 references:
-  "GrpcGreeterImpl":
-    # 可以指定多个registry,使用逗号隔开;不指定默认向所有注册中心注册
+  "greeterImpl":
     registry: "demoZk"
-    protocol : "grpc"
-    interface : "io.grpc.examples.helloworld.GreeterGrpc$IGreeter"
+    protocol: "grpc"
+    interface: "org.apache.dubbo.GreeterGrpc$IGreeter"
     cluster: "failover"
-    methods :
+    methods:
       - name: "SayHello"
         retries: 3
 
-
+# protocol config
 protocol_conf:
   grpc:
     reconnect_interval: 0
@@ -55,9 +50,10 @@ protocol_conf:
       keep_alive_period: "120s"
       tcp_r_buf_size: 262144
       tcp_w_buf_size: 65536
+      pkg_rq_size: 1024
       pkg_wq_size: 512
       tcp_read_timeout: "1s"
       tcp_write_timeout: "5s"
       wait_timeout: "1s"
       max_msg_len: 10240
-      session_name: "client"
\ No newline at end of file
+      session_name: "client"
diff --git a/general/grpc/stream/go-server/app/greeter.go b/general/grpc/stream/go-server/app/greeter.go
index d043aa9..33972c9 100644
--- a/general/grpc/stream/go-server/app/greeter.go
+++ b/general/grpc/stream/go-server/app/greeter.go
@@ -97,7 +97,3 @@ func (g *GreeterProvider) SayHelloServerStream(req *HelloRequest, server Greeter
 	}
 	return nil
 }
-
-func (g *GreeterProvider) Reference() string {
-	return "GrpcGreeterImpl"
-}
diff --git a/general/grpc/stream/go-server/app/helloworld.pb.go b/general/grpc/stream/go-server/app/helloworld.pb.go
index 2183a4f..4bdfb1e 100644
--- a/general/grpc/stream/go-server/app/helloworld.pb.go
+++ b/general/grpc/stream/go-server/app/helloworld.pb.go
@@ -413,6 +413,10 @@ func (s *GreeterProviderBase) GetProxyImpl() protocol.Invoker {
 	return s.proxyImpl
 }
 
+func (c *GreeterProviderBase) Reference() string {
+	return "greeterImpl"
+}
+
 func _DUBBO_Greeter_SayHelloTwoSidesStream_Handler(srv interface{}, stream grpc.ServerStream) error {
 	_, ok := srv.(dgrpc.DubboGrpcService)
 	invo := invocation.NewRPCInvocation("SayHelloTwoSidesStream", nil, nil)
diff --git a/general/grpc/stream/go-server/profiles/dev/server.yml b/general/grpc/stream/go-server/profiles/dev/server.yml
index 2e61183..6cf6d5d 100644
--- a/general/grpc/stream/go-server/profiles/dev/server.yml
+++ b/general/grpc/stream/go-server/profiles/dev/server.yml
@@ -1,42 +1,40 @@
 # dubbo server yaml configure file
 
-
 # application config
 application:
-  organization : "ikurento.com"
-  name : "BDTService"
-  module : "dubbogo say-hello client"
-  version : "0.0.1"
-  owner : "ZX"
-  environment : "dev"
+  organization: "dubbo.io"
+  name: "GreeterGrpcServer"
+  module: "dubbo-go greeter grpc server"
+  version: "0.0.1"
+  environment: "dev"
 
-registries :
+# registry config
+registries:
   "zk":
     protocol: "zookeeper"
-    timeout	: "3s"
+    timeout: "3s"
     address: "127.0.0.1:2181"
 
+# service config
 services:
-  "GrpcGreeterImpl":
-    # 可以指定多个registry,使用逗号隔开;不指定默认向所有注册中心注册
+  "greeterImpl":
     registry: "zk"
-    protocol : "grpc"
-    # 相当于dubbo.xml中的interface
-    interface : "io.grpc.examples.helloworld.GreeterGrpc$IGreeter"
+    protocol: "grpc"
+    interface: "org.apache.dubbo.GreeterGrpc$IGreeter"
     loadbalance: "random"
     warmup: "100"
     cluster: "failover"
     methods:
-    - name: "SayHello"
-      retries: 1
-      loadbalance: "random"
+      - name: "SayHello"
+        retries: 1
+        loadbalance: "random"
 
+# protocol config
 protocols:
   "grpc":
     name: "grpc"
     port: 20000
 
-
 protocol_conf:
   grpc:
     session_number: 700
@@ -54,4 +52,4 @@ protocol_conf:
       tcp_write_timeout: "5s"
       wait_timeout: "1s"
       max_msg_len: 1024
-      session_name: "server"
+      session_name: "server"
\ No newline at end of file
diff --git a/general/grpc/stream/go-server/profiles/release/server.yml b/general/grpc/stream/go-server/profiles/release/server.yml
index 214aa14..6cf6d5d 100644
--- a/general/grpc/stream/go-server/profiles/release/server.yml
+++ b/general/grpc/stream/go-server/profiles/release/server.yml
@@ -1,25 +1,26 @@
 # dubbo server yaml configure file
+
+# application config
 application:
-  organization : "ikurento.com"
-  name : "BDTService"
-  module : "dubbogo say-hello client"
-  version : "0.0.1"
-  owner : "ZX"
-  environment : "dev"
+  organization: "dubbo.io"
+  name: "GreeterGrpcServer"
+  module: "dubbo-go greeter grpc server"
+  version: "0.0.1"
+  environment: "dev"
 
-registries :
-  "demoZk":
+# registry config
+registries:
+  "zk":
     protocol: "zookeeper"
-    timeout	: "3s"
+    timeout: "3s"
     address: "127.0.0.1:2181"
 
+# service config
 services:
-  "GrpcGreeterImpl":
-    # 可以指定多个registry,使用逗号隔开;不指定默认向所有注册中心注册
-    registry: "demoZk"
-    protocol : "grpc"
-    # 相当于dubbo.xml中的interface
-    interface : "io.grpc.examples.helloworld.GreeterGrpc$IGreeter"
+  "greeterImpl":
+    registry: "zk"
+    protocol: "grpc"
+    interface: "org.apache.dubbo.GreeterGrpc$IGreeter"
     loadbalance: "random"
     warmup: "100"
     cluster: "failover"
@@ -28,12 +29,12 @@ services:
         retries: 1
         loadbalance: "random"
 
+# protocol config
 protocols:
   "grpc":
     name: "grpc"
     port: 20000
 
-
 protocol_conf:
   grpc:
     session_number: 700
@@ -51,4 +52,4 @@ protocol_conf:
       tcp_write_timeout: "5s"
       wait_timeout: "1s"
       max_msg_len: 1024
-      session_name: "server"
+      session_name: "server"
\ No newline at end of file
diff --git a/general/grpc/stream/go-server/profiles/test/server.yml b/general/grpc/stream/go-server/profiles/test/server.yml
index 14e9ecb..6cf6d5d 100644
--- a/general/grpc/stream/go-server/profiles/test/server.yml
+++ b/general/grpc/stream/go-server/profiles/test/server.yml
@@ -10,15 +10,15 @@ application:
 
 # registry config
 registries:
-  "demoZk":
+  "zk":
     protocol: "zookeeper"
     timeout: "3s"
     address: "127.0.0.1:2181"
 
 # service config
 services:
-  "GrpcGreeterImpl":
-    registry: "demoZk"
+  "greeterImpl":
+    registry: "zk"
     protocol: "grpc"
     interface: "org.apache.dubbo.GreeterGrpc$IGreeter"
     loadbalance: "random"
@@ -52,4 +52,4 @@ protocol_conf:
       tcp_write_timeout: "5s"
       wait_timeout: "1s"
       max_msg_len: 1024
-      session_name: "server"
+      session_name: "server"
\ No newline at end of file
diff --git a/general/grpc/unary/go-client/app/client.go b/general/grpc/unary/go-client/app/client.go
index f39b32f..6dd2cc7 100644
--- a/general/grpc/unary/go-client/app/client.go
+++ b/general/grpc/unary/go-client/app/client.go
@@ -34,11 +34,7 @@ import (
 	gxlog "github.com/dubbogo/gost/log"
 )
 
-import (
-	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
-)
-
-var grpcGreeterImpl = new(GrpcGreeterImpl)
+var grpcGreeterImpl = new(GreeterClientImpl)
 
 func init() {
 	config.SetConsumerService(grpcGreeterImpl)
@@ -50,8 +46,8 @@ func main() {
 	time.Sleep(3 * time.Second)
 
 	gxlog.CInfo("\n\n\nstart to test dubbo")
-	reply := &protobuf.HelloReply{}
-	req := &protobuf.HelloRequest{
+	reply := &HelloReply{}
+	req := &HelloRequest{
 		Name: "xujianhai",
 	}
 	err := grpcGreeterImpl.SayHello(context.TODO(), req, reply)
diff --git a/general/grpc/unary/go-client/app/hello.go b/general/grpc/unary/go-client/app/hello.go
deleted file mode 100644
index 95b78c5..0000000
--- a/general/grpc/unary/go-client/app/hello.go
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-
-import (
-	"context"
-)
-
-import (
-	"google.golang.org/grpc"
-)
-
-import (
-	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
-)
-
-type GrpcGreeterImpl struct {
-	SayHello func(ctx context.Context, in *protobuf.HelloRequest, out *protobuf.HelloReply) error
-}
-
-func (u *GrpcGreeterImpl) Reference() string {
-	return "GrpcGreeterImpl"
-}
-
-func (u *GrpcGreeterImpl) GetDubboStub(cc *grpc.ClientConn) protobuf.GreeterClient {
-	return protobuf.NewGreeterClient(cc)
-}
diff --git a/general/grpc/unary/go-client/app/helloworld.pb.go b/general/grpc/unary/go-client/app/helloworld.pb.go
index 75e18b9..e0e9b31 100644
--- a/general/grpc/unary/go-client/app/helloworld.pb.go
+++ b/general/grpc/unary/go-client/app/helloworld.pb.go
@@ -4,14 +4,13 @@
 package main
 
 import (
-	"context"
-	"fmt"
-	"math"
-
-	"github.com/golang/protobuf/proto"
-	"google.golang.org/grpc"
-	"google.golang.org/grpc/codes"
-	"google.golang.org/grpc/status"
+	context "context"
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	grpc "google.golang.org/grpc"
+	codes "google.golang.org/grpc/codes"
+	status "google.golang.org/grpc/status"
+	math "math"
 )
 
 import (
@@ -244,6 +243,10 @@ func (s *GreeterProviderBase) GetProxyImpl() protocol.Invoker {
 	return s.proxyImpl
 }
 
+func (c *GreeterProviderBase) Reference() string {
+	return "greeterImpl"
+}
+
 func _DUBBO_Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(HelloRequest)
 	if err := dec(in); err != nil {
@@ -254,7 +257,7 @@ func _DUBBO_Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec f
 	args = append(args, in)
 	invo := invocation.NewRPCInvocation("SayHello", args, nil)
 	if interceptor == nil {
-		result := base.GetProxyImpl().Invoke(context.Background(), invo)
+		result := base.GetProxyImpl().Invoke(ctx, invo)
 		return result.Result(), result.Error()
 	}
 	info := &grpc.UnaryServerInfo{
@@ -262,7 +265,7 @@ func _DUBBO_Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec f
 		FullMethod: "/main.Greeter/SayHello",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		result := base.GetProxyImpl().Invoke(context.Background(), invo)
+		result := base.GetProxyImpl().Invoke(ctx, invo)
 		return result.Result(), result.Error()
 	}
 	return interceptor(ctx, in, info, handler)
diff --git a/general/grpc/unary/go-client/app/helloworld.proto b/general/grpc/unary/go-client/app/helloworld.proto
index 3a440cd..d68e1dd 100644
--- a/general/grpc/unary/go-client/app/helloworld.proto
+++ b/general/grpc/unary/go-client/app/helloworld.proto
@@ -14,11 +14,11 @@
 syntax = "proto3";
 
 option java_multiple_files = true;
-option java_package = "org.apache.dubbo";
+option java_package = "io.grpc.examples.helloworld";
 option java_outer_classname = "HelloWorldProto";
 option objc_class_prefix = "HLW";
 
-package protobuf;
+package main;
 
 // The greeting service definition.
 service Greeter {
diff --git a/general/grpc/unary/go-client/profiles/dev/client.yml b/general/grpc/unary/go-client/profiles/dev/client.yml
index d04a578..0fc1bb9 100644
--- a/general/grpc/unary/go-client/profiles/dev/client.yml
+++ b/general/grpc/unary/go-client/profiles/dev/client.yml
@@ -26,7 +26,7 @@ registries :
 
 
 references:
-  "GrpcGreeterImpl":
+  "greeterImpl":
     # 可以指定多个registry,使用逗号隔开;不指定默认向所有注册中心注册
     registry: "demoZk"
     protocol : "grpc"
diff --git a/general/grpc/unary/go-client/profiles/release/client.yml b/general/grpc/unary/go-client/profiles/release/client.yml
index 265654c..bc1bae2 100644
--- a/general/grpc/unary/go-client/profiles/release/client.yml
+++ b/general/grpc/unary/go-client/profiles/release/client.yml
@@ -26,7 +26,7 @@ registries :
 
 
 references:
-  "GrpcGreeterImpl":
+  "greeterImpl":
     # 可以指定多个registry,使用逗号隔开;不指定默认向所有注册中心注册
     registry: "demoZk"
     protocol : "grpc"
diff --git a/general/grpc/unary/go-client/profiles/test/client.yml b/general/grpc/unary/go-client/profiles/test/client.yml
index e0c0737..48d158b 100644
--- a/general/grpc/unary/go-client/profiles/test/client.yml
+++ b/general/grpc/unary/go-client/profiles/test/client.yml
@@ -29,7 +29,7 @@ registries :
     password: ""
 
 references:
-  "GrpcGreeterImpl":
+  "greeterImpl":
     # 可以指定多个registry,使用逗号隔开;不指定默认向所有注册中心注册
     registry: "demoZk"
     protocol : "grpc"
diff --git a/general/grpc/unary/go-server/app/greeter.go b/general/grpc/unary/go-server/app/greeter.go
index a659a28..e5471f3 100644
--- a/general/grpc/unary/go-server/app/greeter.go
+++ b/general/grpc/unary/go-server/app/greeter.go
@@ -22,25 +22,18 @@ import (
 	"fmt"
 )
 
-import (
-	"github.com/apache/dubbo-go-samples/general/grpc/protobuf"
-)
 
 type GreeterProvider struct {
-	*protobuf.GreeterProviderBase
+	*GreeterProviderBase
 }
 
 func NewGreeterProvider() *GreeterProvider {
 	return &GreeterProvider{
-		GreeterProviderBase: &protobuf.GreeterProviderBase{},
+		GreeterProviderBase: &GreeterProviderBase{},
 	}
 }
 
-func (g *GreeterProvider) SayHello(ctx context.Context, req *protobuf.HelloRequest) (reply *protobuf.HelloReply, err error) {
+func (g *GreeterProvider) SayHello(ctx context.Context, req *HelloRequest) (reply *HelloReply, err error) {
 	fmt.Printf("req: %v", req)
-	return &protobuf.HelloReply{Message: "this is message from reply"}, nil
-}
-
-func (g *GreeterProvider) Reference() string {
-	return "GrpcGreeterImpl"
+	return &HelloReply{Message: "this is message from reply"}, nil
 }
diff --git a/general/grpc/unary/go-server/app/helloworld.pb.go b/general/grpc/unary/go-server/app/helloworld.pb.go
index 3f17426..e0e9b31 100644
--- a/general/grpc/unary/go-server/app/helloworld.pb.go
+++ b/general/grpc/unary/go-server/app/helloworld.pb.go
@@ -111,35 +111,35 @@ func (m *HelloReply) GetMessage() string {
 }
 
 func init() {
-	proto.RegisterType((*HelloRequest)(nil), "protobuf.HelloRequest")
-	proto.RegisterType((*HelloReply)(nil), "protobuf.HelloReply")
+	proto.RegisterType((*HelloRequest)(nil), "main.HelloRequest")
+	proto.RegisterType((*HelloReply)(nil), "main.HelloReply")
 }
 
 func init() { proto.RegisterFile("helloworld.proto", fileDescriptor_17b8c58d586b62f2) }
 
 var fileDescriptor_17b8c58d586b62f2 = []byte{
-	// 183 bytes of a gzipped FileDescriptorProto
+	// 185 bytes of a gzipped FileDescriptorProto
 	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xc8, 0x48, 0xcd, 0xc9,
-	0xc9, 0x2f, 0xcf, 0x2f, 0xca, 0x49, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x00, 0x53,
-	0x49, 0xa5, 0x69, 0x4a, 0x4a, 0x5c, 0x3c, 0x1e, 0x20, 0xd9, 0xa0, 0xd4, 0xc2, 0xd2, 0xd4, 0xe2,
-	0x12, 0x21, 0x21, 0x2e, 0x96, 0xbc, 0xc4, 0xdc, 0x54, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20,
-	0x30, 0x5b, 0x49, 0x8d, 0x8b, 0x0b, 0xaa, 0xa6, 0x20, 0xa7, 0x52, 0x48, 0x82, 0x8b, 0x3d, 0x37,
-	0xb5, 0xb8, 0x38, 0x31, 0x1d, 0xa6, 0x08, 0xc6, 0x35, 0x72, 0xe5, 0x62, 0x77, 0x2f, 0x4a, 0x4d,
-	0x2d, 0x49, 0x2d, 0x12, 0xb2, 0xe2, 0xe2, 0x08, 0x4e, 0xac, 0x04, 0xeb, 0x12, 0x12, 0xd3, 0x83,
-	0xd9, 0xa6, 0x87, 0x6c, 0x95, 0x94, 0x08, 0x86, 0x78, 0x41, 0x4e, 0xa5, 0x12, 0x83, 0x93, 0x36,
-	0x97, 0x40, 0x7e, 0x51, 0xba, 0x5e, 0x62, 0x41, 0x62, 0x72, 0x46, 0xaa, 0x5e, 0x4a, 0x69, 0x52,
-	0x52, 0xbe, 0x13, 0x3f, 0x58, 0x45, 0x38, 0xc8, 0x0b, 0x01, 0x20, 0x4d, 0x01, 0x8c, 0x8b, 0x98,
-	0x98, 0x3d, 0x7c, 0xc2, 0x93, 0xd8, 0xc0, 0x66, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xde,
-	0x1e, 0xf0, 0xa3, 0xe4, 0x00, 0x00, 0x00,
+	0xc9, 0x2f, 0xcf, 0x2f, 0xca, 0x49, 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0xc9, 0x4d,
+	0xcc, 0xcc, 0x53, 0x52, 0xe2, 0xe2, 0xf1, 0x00, 0xc9, 0x04, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97,
+	0x08, 0x09, 0x71, 0xb1, 0xe4, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81,
+	0xd9, 0x4a, 0x6a, 0x5c, 0x5c, 0x50, 0x35, 0x05, 0x39, 0x95, 0x42, 0x12, 0x5c, 0xec, 0xb9, 0xa9,
+	0xc5, 0xc5, 0x89, 0xe9, 0x30, 0x45, 0x30, 0xae, 0x91, 0x2d, 0x17, 0xbb, 0x7b, 0x51, 0x6a, 0x6a,
+	0x49, 0x6a, 0x91, 0x90, 0x11, 0x17, 0x47, 0x70, 0x62, 0x25, 0x58, 0x97, 0x90, 0x90, 0x1e, 0xc8,
+	0x26, 0x3d, 0x64, 0x6b, 0xa4, 0x04, 0x50, 0xc4, 0x0a, 0x72, 0x2a, 0x95, 0x18, 0x9c, 0xcc, 0xb8,
+	0xa4, 0x33, 0xf3, 0xf5, 0xd2, 0x8b, 0x0a, 0x92, 0xf5, 0x52, 0x2b, 0x12, 0x73, 0x0b, 0x72, 0x52,
+	0x8b, 0xf5, 0x10, 0xae, 0x76, 0xe2, 0x07, 0x2b, 0x0e, 0x07, 0xb1, 0x03, 0x40, 0x1e, 0x08, 0x60,
+	0x5c, 0xc4, 0xc4, 0xec, 0xe1, 0x13, 0x9e, 0xc4, 0x06, 0xf6, 0x8f, 0x31, 0x20, 0x00, 0x00, 0xff,
+	0xff, 0xd2, 0x16, 0x5f, 0x34, 0xe3, 0x00, 0x00, 0x00,
 }
 
 // Reference imports to suppress errors if they are not otherwise used.
 var _ context.Context
-var _ grpc.ClientConnInterface
+var _ grpc.ClientConn
 
 // This is a compile-time assertion to ensure that this generated file
 // is compatible with the grpc package it is being compiled against.
-const _ = grpc.SupportPackageIsVersion6
+const _ = grpc.SupportPackageIsVersion4
 
 // GreeterClient is the client API for Greeter service.
 //
@@ -150,16 +150,16 @@ type GreeterClient interface {
 }
 
 type greeterClient struct {
-	cc grpc.ClientConnInterface
+	cc *grpc.ClientConn
 }
 
-func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient {
+func NewGreeterClient(cc *grpc.ClientConn) GreeterClient {
 	return &greeterClient{cc}
 }
 
 func (c *greeterClient) SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error) {
 	out := new(HelloReply)
-	err := c.cc.Invoke(ctx, "/protobuf.Greeter/SayHello", in, out, opts...)
+	err := c.cc.Invoke(ctx, "/main.Greeter/SayHello", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
@@ -194,7 +194,7 @@ func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(in
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/protobuf.Greeter/SayHello",
+		FullMethod: "/main.Greeter/SayHello",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 		return srv.(GreeterServer).SayHello(ctx, req.(*HelloRequest))
@@ -203,7 +203,7 @@ func _Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(in
 }
 
 var _Greeter_serviceDesc = grpc.ServiceDesc{
-	ServiceName: "protobuf.Greeter",
+	ServiceName: "main.Greeter",
 	HandlerType: (*GreeterServer)(nil),
 	Methods: []grpc.MethodDesc{
 		{
@@ -243,6 +243,10 @@ func (s *GreeterProviderBase) GetProxyImpl() protocol.Invoker {
 	return s.proxyImpl
 }
 
+func (c *GreeterProviderBase) Reference() string {
+	return "greeterImpl"
+}
+
 func _DUBBO_Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(HelloRequest)
 	if err := dec(in); err != nil {
@@ -253,15 +257,15 @@ func _DUBBO_Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec f
 	args = append(args, in)
 	invo := invocation.NewRPCInvocation("SayHello", args, nil)
 	if interceptor == nil {
-		result := base.GetProxyImpl().Invoke(context.Background(), invo)
+		result := base.GetProxyImpl().Invoke(ctx, invo)
 		return result.Result(), result.Error()
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/protobuf.Greeter/SayHello",
+		FullMethod: "/main.Greeter/SayHello",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		result := base.GetProxyImpl().Invoke(context.Background(), invo)
+		result := base.GetProxyImpl().Invoke(ctx, invo)
 		return result.Result(), result.Error()
 	}
 	return interceptor(ctx, in, info, handler)
@@ -269,7 +273,7 @@ func _DUBBO_Greeter_SayHello_Handler(srv interface{}, ctx context.Context, dec f
 
 func (s *GreeterProviderBase) ServiceDesc() *grpc.ServiceDesc {
 	return &grpc.ServiceDesc{
-		ServiceName: "protobuf.Greeter",
+		ServiceName: "main.Greeter",
 		HandlerType: (*GreeterServer)(nil),
 		Methods: []grpc.MethodDesc{
 			{
diff --git a/general/grpc/unary/go-server/profiles/dev/server.yml b/general/grpc/unary/go-server/profiles/dev/server.yml
index 2e61183..df37534 100644
--- a/general/grpc/unary/go-server/profiles/dev/server.yml
+++ b/general/grpc/unary/go-server/profiles/dev/server.yml
@@ -17,7 +17,7 @@ registries :
     address: "127.0.0.1:2181"
 
 services:
-  "GrpcGreeterImpl":
+  "greeterImpl":
     # 可以指定多个registry,使用逗号隔开;不指定默认向所有注册中心注册
     registry: "zk"
     protocol : "grpc"
diff --git a/general/grpc/unary/go-server/profiles/release/server.yml b/general/grpc/unary/go-server/profiles/release/server.yml
index 214aa14..8c9b2db 100644
--- a/general/grpc/unary/go-server/profiles/release/server.yml
+++ b/general/grpc/unary/go-server/profiles/release/server.yml
@@ -14,7 +14,7 @@ registries :
     address: "127.0.0.1:2181"
 
 services:
-  "GrpcGreeterImpl":
+  "greeterImpl":
     # 可以指定多个registry,使用逗号隔开;不指定默认向所有注册中心注册
     registry: "demoZk"
     protocol : "grpc"
diff --git a/general/grpc/unary/go-server/profiles/test/server.yml b/general/grpc/unary/go-server/profiles/test/server.yml
index da146ad..49674e3 100644
--- a/general/grpc/unary/go-server/profiles/test/server.yml
+++ b/general/grpc/unary/go-server/profiles/test/server.yml
@@ -17,7 +17,7 @@ registries :
     address: "127.0.0.1:2181"
 
 services:
-  "GrpcGreeterImpl":
+  "greeterImpl":
     # 可以指定多个registry,使用逗号隔开;不指定默认向所有注册中心注册
     registry: "demoZk"
     protocol : "grpc"
diff --git a/go.sum b/go.sum
index 96d650d..a92f848 100644
--- a/go.sum
+++ b/go.sum
@@ -1050,6 +1050,7 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up
 golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
 golang.org/x/net v0.0.0-20201021035429-f5854403a974 h1:IX6qOQeG5uLjB/hjjwjedwfjND0hgjPMMyO1RoIXQNI=
 golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201110031124-69a78807bb2b h1:uwuIcX0g4Yl1NC5XAz37xsr2lTtcqevgzYNVt49waME=
 golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=

[dubbo-go-samples] 12/12: add test ppt file

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit dcc91f494a3a09b68236923dc22b39d7c428528e
Author: zhaoyunxing <zh...@apache.org>
AuthorDate: Sat Sep 4 11:47:17 2021 +0800

    add test ppt file
---
 .DS_Store | Bin 0 -> 6148 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..a1d33b9
Binary files /dev/null and b/.DS_Store differ

[dubbo-go-samples] 01/12: upgrade dubbo-go & dubbo-go-hessian2 version

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaoyunxing pushed a commit to branch compress
in repository https://gitbox.apache.org/repos/asf/dubbo-go-samples.git

commit b16311f33dee5a98c23c3f45f93f47844db2f1a5
Author: AlexStocks <al...@foxmail.com>
AuthorDate: Sun May 16 22:04:48 2021 +0800

    upgrade dubbo-go & dubbo-go-hessian2 version
---
 go.mod | 4 ++--
 go.sum | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/go.mod b/go.mod
index 3885d92..e8ae5c3 100644
--- a/go.mod
+++ b/go.mod
@@ -5,8 +5,8 @@ require (
 	github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5 // indirect
 	github.com/alibaba/sentinel-golang v1.0.2
 	github.com/apache/dubbo-getty v1.4.3
-	github.com/apache/dubbo-go v1.5.6
-	github.com/apache/dubbo-go-hessian2 v1.9.1
+	github.com/apache/dubbo-go v1.5.7-rc1
+	github.com/apache/dubbo-go-hessian2 v1.9.2
 	github.com/bwmarrin/snowflake v0.3.0
 	github.com/docker/go-connections v0.4.0 // indirect
 	github.com/dubbogo/gost v1.11.2
diff --git a/go.sum b/go.sum
index 6f9977b..357b231 100644
--- a/go.sum
+++ b/go.sum
@@ -95,10 +95,14 @@ github.com/apache/dubbo-go v1.5.6-rc2 h1:e9ziyPQx65n/dyGrA0/ce263jV2+nnSzzpdu9Lb
 github.com/apache/dubbo-go v1.5.6-rc2/go.mod h1:wLJvPWbnrf6/bhoohBT404QK4t2JoNcckMw+/fJ9P+c=
 github.com/apache/dubbo-go v1.5.6 h1:iTMrXo8jB6DxKOhM83NKDnGA8c9ZPnofCOos/GvKyF8=
 github.com/apache/dubbo-go v1.5.6/go.mod h1:wLJvPWbnrf6/bhoohBT404QK4t2JoNcckMw+/fJ9P+c=
+github.com/apache/dubbo-go v1.5.7-rc1 h1:PBK/Ox35L8QH85eBmHAqsg/EL2SnO+xwcCw67lQ4z4Q=
+github.com/apache/dubbo-go v1.5.7-rc1/go.mod h1:wLJvPWbnrf6/bhoohBT404QK4t2JoNcckMw+/fJ9P+c=
 github.com/apache/dubbo-go-hessian2 v1.8.2 h1:CQq2Mmlrk6Fqmudwl9Dqps8drTrBFnmXRlzgOjj0FqA=
 github.com/apache/dubbo-go-hessian2 v1.8.2/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE=
 github.com/apache/dubbo-go-hessian2 v1.9.1 h1:ceSsU/9z/gv3hzUpl8GceEhQvF3i0BionfdHUGMmjHU=
 github.com/apache/dubbo-go-hessian2 v1.9.1/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE=
+github.com/apache/dubbo-go-hessian2 v1.9.2 h1:XuI8KvENSfKiAhiCBS4RNihmQDoPNmGWKT3gTui0p9A=
+github.com/apache/dubbo-go-hessian2 v1.9.2/go.mod h1:xQUjE7F8PX49nm80kChFvepA/AvqAZ0oh/UaB6+6pBE=
 github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
 github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
 github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA=