robotLJW commented on a change in pull request #1205:
URL:
https://github.com/apache/servicecomb-service-center/pull/1205#discussion_r779972829
##########
File path: client/set.go
##########
@@ -20,11 +24,33 @@ type Set struct {
// NewSetForConfig dial grpc connection and create all grpc clients
func NewSetForConfig(c SetConfig) (*Set, error) {
- conn, err := grpc.Dial(c.Addr, grpc.WithInsecure())
+ if len(c.Addr) <= 0 {
+ return nil, errors.New("addr is empty")
Review comment:
这个errors.New("addr is empty"),可以抽成一个 var ErrAddrEmpty = errors.New("addr
is empty")
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]