ssshr-66 opened a new issue, #1127:
URL: https://github.com/apache/incubator-seata-go/issues/1127
**What would you like to be added:**
In `pkg/discovery/init.go`, `InitRegistry` should return an error for
unimplemented registry types (`NACOS`, `EUREKA`, `REDIS`, `ZK`, `CONSUL`,
`SOFA`) instead of storing a `nil` instance.
```go
case NACOS, EUREKA, REDIS, ZK, CONSUL, SOFA:
err = fmt.Errorf("registry type %s is not implemented yet",
registryConfig.Type)
```
**Why is this needed:**
Configuring these types stores `nil`, and the crash only appears later as a
nil-pointer panic in `getAvailServerList` (`Lookup` on nil), hiding the real
cause. Failing fast at init gives a clear message.
--
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]