Skip to content

deref multi-levels if interface is satisfied by pointer#22

Merged
tigrato merged 1 commit intomasterfrom
tigrato/fix-multi-interface
Jun 24, 2025
Merged

deref multi-levels if interface is satisfied by pointer#22
tigrato merged 1 commit intomasterfrom
tigrato/fix-multi-interface

Conversation

@tigrato
Copy link

@tigrato tigrato commented Jun 24, 2025

If the underlying type is an interface satisfied by a pointer, we need to deref it multiple times until we reach to the struct value.

This PR does that by calling val.Elem() multiple times while val.Kind() is an interface or pointer.

If the underlying type is an interface satisfied by a pointer, we need
to deref it multiple times until we reach to the struct value.

This PR does that by calling `val.Elem()` multiple times while
`val.Kind()` is an interface or pointer.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
@tigrato tigrato merged commit 7bfedfa into master Jun 24, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants