You should use pointer to message, not a message.
func (m *message) SetSender(sender string) {
m.sender = sender
}
func main() {
var msg Message
msg = new(Join)
msg.SetSender("Jim")
fmt.Printf("%s", msg)
}
It will change the structure. Function on message
changes copy of the object, function on pointer to message
changes the object.
http://golangtutorials.blogspot.com/2011/06/methods-on-structs.html