• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: set value of map1 and map2 through a reflector pointer

Resolved: set value of map1 and map2 through a reflector pointer

0
By Isaac Tonny on 15/03/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve set value of map1 and map2 through a reflector pointer

Question:

test my exemple code: https://go.dev/play/p/G7LxjDNjNAn
terminal result:
how i want output from example terminal
my code in project:
I’m here because I don’t even know how to research this.
have change in A and B. whoever helped me with the “Set” function sent a code. Hope you send too. For some reason it worked, now it doesn’t.
I can’t assign to the map, because this function was made in such a way that I cannot even know if the value comes from an array if it is a variable or a map tag
the “Set” function works for different types https://go.dev/play/p/TggxPxF5kx9
one way i’m sure would work is to create a pointer pointer, not being a map pointer, a pointer that points to the pointer that points to the value of the 2 maps
the “Set” function is based on setting the pointer to the other pointer. I think the error is that I’m pointing to the wrong pointer

Best Answer:

I conceived, when creating the value I create two pointers to that value, that is ** and that way to change. thanks: @JimB

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

go interface pointers struct
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Shopware 400 Status Error “This value is too long. It should have 255 character or less.” When I Try Updating Database Table

01/04/2023

Resolved: Using AWK to count multiple patterns in a file

01/04/2023

Resolved: significance letter above bar graphic in wrong order

01/04/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.