This question is intended to assist implementation of a Go workalike for the Python Cmd library. This workalike will be made publicly available,
The attached program lists Inner id as expected - that is, the fieldnames of the Outer structure. But ListFields is a method of Inner. In the attached program, I would like to be able to remove the &x argument from ListFields. That is, I want the Inner code to be able to reflect on the Outer instance without having to be fed the address of the Outer instance explicitly. I specifically do *not* want to move the method to Outer - reflection from within Inner is the point of the exercise. Is there a way for a struct instance to get its own address through the runtime? The application would be to walk through the user-defined methods of a Cmd-like interpreter instance. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
innerclass.go
Description: Binary data