ShiningRush commented on a change in pull request #1063:
URL: https://github.com/apache/apisix-dashboard/pull/1063#discussion_r548796489



##########
File path: api/internal/core/store/store.go
##########
@@ -54,7 +54,7 @@ type GenericStore struct {
 type GenericStoreOption struct {
        BasePath   string
        ObjType    reflect.Type
-       KeyFunc    func(obj interface{}) string
+       KeyFunc    func(obj interface{}, key string) string

Review comment:
       Wow, this is not a good way, `KeyFunc` is responsible to ensure resource 
key, not the place to do compatible logic.
   We can do it in `StringToObjPtr`.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to