Last active
December 10, 2015 02:39
-
-
Save tenntenn/4369409 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 Message struct { | |
// 著者(送り主) | |
Author string `json:"author"` | |
// メッセージ本文 | |
Body string `json:"body"` | |
} | |
func (self *Message) String() string { | |
return self.Author + " says " + self.Body | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment