Re: [go-nuts] Question About Interface Field in a Structure

2025-05-24 Thread Mikk Margus
I couldn't figure out how to change the struct definition to make it clear I'm passing a pointer. I've spent an embarrassing amount of time on this without getting anywhere so I appreciate any suggestions. Jon On Saturday, May 24, 2025 at 8:39:11 AM UTC-7 Mikk Margus wrote: As far a

Re: [go-nuts] Question About Interface Field in a Structure

2025-05-24 Thread Mikk Margus
As far as I can tell, they're asking for a way for `var help`/`var fish` etc. to get updated alongside the attribute `i_t.arg` in the update methods. This example accomplishes this. https://go.dev/play/p/7y5COCLU5EP Do note that it crashes and burns if the pointer is not of the expected type, a

Re: [go-nuts] Compiler Hiccup with Map Iteration

2025-04-20 Thread Mikk Margus
Oh, whoops, I did not realize the attachments contained examples... I suppose you could delay the commandRegistry assignment to be within `func init()` Attached is an example of this. On 4/20/25 23:55, Wilgnert wrote: Hey there! So, I was about to file a GitHub issue, but the prompt suggested

Re: [go-nuts] Compiler Hiccup with Map Iteration

2025-04-20 Thread Mikk Margus
What is the actual error the compiler is reporting? Are you perhaps trying to iterate over a pointer to a map or something like that? On 4/20/25 23:55, Wilgnert wrote: Hey there! So, I was about to file a GitHub issue, but the prompt suggested checking here first to avoid duplicates. I did a qu