FAQ
For my problem, I hope to capture all reads and writes to a structure, and
perform some checkpointing-specific code to log changes etc.

I'm wanting to do something along the lines of automatic code generation,
to maybe hide these fields (or not), and generate custom getter- and
setters for these, to handle the logging.

Could this be achieved with reflection, or would I have to create a
compiler of sorts to wrap the object?

--
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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Tamás Gulácsi at Nov 29, 2013 at 3:48 pm
    You can use reflext, but why do't you just hise all the fields and provide acentralized get/set? You can roll it by hand, if it won't change too often.

    --
    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+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedNov 29, '13 at 12:24p
activeNov 29, '13 at 3:48p
posts2
users2
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase