Create WikiService

Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
Vartan Benohanian
2020-09-03 23:25:16 -04:00
parent ffcc906c07
commit 9d5132f15c
7 changed files with 523 additions and 34 deletions
-8
View File
@@ -81,16 +81,8 @@ type inboxThings struct {
Messages []*Message
}
// init initializes or clears the listing.
func (t *inboxThings) init() {
t.Comments = make([]*Message, 0)
t.Messages = make([]*Message, 0)
}
// UnmarshalJSON implements the json.Unmarshaler interface.
func (t *inboxThings) UnmarshalJSON(b []byte) error {
t.init()
var things []inboxThing
if err := json.Unmarshal(b, &things); err != nil {
return err