diff options
Diffstat (limited to 'chat/messages.go')
-rw-r--r-- | chat/messages.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/chat/messages.go b/chat/messages.go index 793fc6c..f03eae0 100644 --- a/chat/messages.go +++ b/chat/messages.go @@ -5,6 +5,7 @@ import ( "errors" ) +// MsgType describes the purpose of a message type MsgType int const ( @@ -26,6 +27,7 @@ func (mt *MsgType) MarshalJSON() ([]byte, error) { return nil, errors.New("Unknown message type") } +// Message represents a message that can be sent to a buddy. The Text field has no meaning, if Type != MsgChat. type Message struct { Type MsgType `json:"type"` User string `json:"user"` |