From 7314554c1c9d8e8ece5dcf421a18a9e05f046d94 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Wed, 22 Feb 2017 15:51:03 +0000 Subject: [PATCH] Comment struct fields (specifically map keys) --- .../go-neb/services/wikipedia/wikipedia.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/github.com/matrix-org/go-neb/services/wikipedia/wikipedia.go b/src/github.com/matrix-org/go-neb/services/wikipedia/wikipedia.go index 39d9fab..ac9a1f2 100644 --- a/src/github.com/matrix-org/go-neb/services/wikipedia/wikipedia.go +++ b/src/github.com/matrix-org/go-neb/services/wikipedia/wikipedia.go @@ -23,22 +23,22 @@ var httpClient = &http.Client{} // Search results (returned by search query) type wikipediaSearchResults struct { - Query wikipediaQuery `json:"query"` + Query wikipediaQuery `json:"query"` // Containter for the query response } // Wikipeda pages returned in search results type wikipediaQuery struct { - Pages map[string]wikipediaPage `json:"pages"` + Pages map[string]wikipediaPage `json:"pages"` // Map of wikipedia page IDs to page objects } // Representation of an individual wikipedia page type wikipediaPage struct { - PageID int64 `json:"pageid"` - NS int `json:"ns"` - Title string `json:"title"` - Touched string `json:"touched"` - LastRevID int64 `json:"lastrevid"` - Extract string `json:"extract"` + PageID int64 `json:"pageid"` // Unique ID for the wikipedia page + NS int `json:"ns"` // Namespace ID + Title string `json:"title"` // Page title text + Touched string `json:"touched"` // Date that the page was last touched / modified + LastRevID int64 `json:"lastrevid"` // + Extract string `json:"extract"` // Page extract text } // Service contains the Config fields for the Wikipedia service.