chickenlj commented on code in PR #2447:
URL: https://github.com/apache/dubbo-go/pull/2447#discussion_r1356648664
##########
protocol/options.go:
##########
@@ -42,11 +41,13 @@ func NewOptions(opts ...Option) *Options {
opt(defOpts)
}
- if defOpts.Protocol.Name == "" {
- panic(fmt.Sprintf("Please specify registry, eg. WithTriple()"))
- }
if defOpts.ID == "" {
- defOpts.ID = defOpts.Protocol.Name
+ if defOpts.Protocol.Name == "" {
Review Comment:
I think it's better to leave `defOpts.Protocol` as it is. To let framework
to decide which protocol to use based on it's default protocol policy.
`defOpts.Protocol.ID` is a special case here, it needs to be set to work as
the mapping key.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]