Drop debugging left over.
This commit is contained in:
parent
9a0818c3f5
commit
5920fdae04
6
page.go
6
page.go
@ -209,7 +209,7 @@ type packageData struct {
|
|||||||
Synopsis string
|
Synopsis string
|
||||||
}
|
}
|
||||||
|
|
||||||
// SearchResults is used with the GDDO (godoc.org) search API
|
// SearchResults is used with the godoc.org search API
|
||||||
type SearchResults struct {
|
type SearchResults struct {
|
||||||
Results []struct {
|
Results []struct {
|
||||||
Path string `json:"path"`
|
Path string `json:"path"`
|
||||||
@ -257,9 +257,7 @@ func renderPackagePage(resp http.ResponseWriter, req *http.Request, repo *Repo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// retrieve synopsis
|
// retrieve synopsis
|
||||||
str := `http://api.godoc.org/search?q=` + url.QueryEscape(repo.GopkgPath())
|
searchResp, err := http.Get("http://api.godoc.org/search?q=" + url.QueryEscape(repo.GopkgPath()))
|
||||||
fmt.Println(str)
|
|
||||||
searchResp, err := http.Get(str)
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
searchResults := &SearchResults{}
|
searchResults := &SearchResults{}
|
||||||
err = json.NewDecoder(searchResp.Body).Decode(&searchResults)
|
err = json.NewDecoder(searchResp.Body).Decode(&searchResults)
|
||||||
|
Loading…
Reference in New Issue
Block a user