From 96973a17b3e2301bb3d9f3b1d3f3c1b80f918fb1 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Tue, 25 Mar 2014 16:04:45 +0100 Subject: Documenting the new chat package. Also fixing access rights --- chat/messages.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'chat/messages.go') 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"` -- cgit v1.2.3-70-g09d2