Skip to content

Instantly share code, notes, and snippets.

@allengeorge
Created July 30, 2010 20:18
Show Gist options
  • Select an option

  • Save allengeorge/501239 to your computer and use it in GitHub Desktop.

Select an option

Save allengeorge/501239 to your computer and use it in GitHub Desktop.
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