Created
July 30, 2010 20:18
-
-
Save allengeorge/501239 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type MessageBase struct { | |
| val1, val2 uint64 | |
| } | |
| type Message1 struct { | |
| MessageBase | |
| } | |
| func (m *MessageBase) String() string { | |
| return fmt.Sprintf("%s{Val1: %d Val2: %d}", ???, m.val1, m.val2) | |
| /// where I'd like ??? to be the name of the _enclosing_ struct | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment