Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
sadbox committed Feb 19, 2014
1 parent b1e8de2 commit cefd123
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,11 @@ type Query struct {

// UnmarshalJSON is used to unmarshal the mediawiki pages in to a list
func (q *Query) UnmarshalJSON(b []byte) error {
tempData := struct{ Pages map[string]Page }{make(map[string]Page)}
tempData := struct{ Pages map[string]Page }{}
err := json.Unmarshal(b, &tempData)
if err != nil {
return err
}
q.Pages = []Page{}
for _, page := range tempData.Pages {
q.Pages = append(q.Pages, page)
}
Expand Down

0 comments on commit cefd123

Please sign in to comment.