-
-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type cast panic when using RPC #1475
Comments
paskal
added a commit
that referenced
this issue
Sep 28, 2022
Fixes the following conversion problem for BlockedUser: panic: interface conversion: interface {} is map[string]interface {},not store.BlockedUser [recovered] Resolves #1475.
paskal
added a commit
that referenced
this issue
Sep 28, 2022
Fixes the following conversion problem for BlockedUser: ``` panic: interface conversion: interface {} is map[string]interface {}, not store.BlockedUser [recovered] ``` Resolves #1475.
paskal
added a commit
that referenced
this issue
Sep 28, 2022
Fixes the following conversion problem for BlockedUser: ``` panic: interface conversion: interface {} is map[string]interface {}, not store.BlockedUser [recovered] ``` Resolves #1475.
paskal
added a commit
that referenced
this issue
Sep 28, 2022
Fixes the following conversion problem for BlockedUser: ``` panic: interface conversion: interface {} is map[string]interface {}, not store.BlockedUser [recovered] ``` Resolves #1475.
paskal
added a commit
that referenced
this issue
Sep 28, 2022
Fixes the following conversion problem for BlockedUser: ``` panic: interface conversion: interface {} is map[string]interface {}, not store.BlockedUser [recovered] ``` Resolves #1475.
paskal
added a commit
that referenced
this issue
Sep 28, 2022
Fixes the following conversion problem for BlockedUser: ``` panic: interface conversion: interface {} is map[string]interface {}, not store.BlockedUser [recovered] ``` Resolves #1475.
umputun
pushed a commit
that referenced
this issue
Sep 29, 2022
Fixes the following conversion problem for BlockedUser: ``` panic: interface conversion: interface {} is map[string]interface {}, not store.BlockedUser [recovered] ``` Resolves #1475.
itzomen
pushed a commit
to traleor/comments
that referenced
this issue
Apr 16, 2023
Fixes the following conversion problem for BlockedUser: ``` panic: interface conversion: interface {} is map[string]interface {}, not store.BlockedUser [recovered] ``` Resolves umputun#1475.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'd like to develop a custom RPC backend but the
ListFlags
method inremote.go
unmarshals the response as a generic[]interface{}
. This causes problems when the callers ofListFlags
try to downcast the result to either[]string
or[]store.BlockedUser
.The
memory_store
example backend has the same problem.I tried to fix that method with:
Method generics help a bit but they require Go 1.18
Probably there is a better approach to solve this issue, I'm not a Go developer.
Thanks
The text was updated successfully, but these errors were encountered: