Commit 0964a06a by Torkel Ödegaard

Merge branch 'master' of github.com:grafana/grafana

parents 3e50ee61 da98f475
......@@ -15,14 +15,16 @@ var IoHelper m.IoUtil = IoUtilImp{}
func ListAllPlugins(repoUrl string) (m.PluginRepo, error) {
fullUrl := repoUrl + "/repo"
res, _ := goreq.Request{Uri: fullUrl, MaxRedirects: 3}.Do()
res, err := goreq.Request{Uri: fullUrl, MaxRedirects: 3}.Do()
if err != nil {
return m.PluginRepo{}, err
}
if res.StatusCode != 200 {
return m.PluginRepo{}, fmt.Errorf("Could not access %s statuscode %v", fullUrl, res.StatusCode)
}
var resp m.PluginRepo
err := res.Body.FromJsonTo(&resp)
err = res.Body.FromJsonTo(&resp)
if err != nil {
return m.PluginRepo{}, errors.New("Could not load plugin data")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment