address CR comments

pull/189/head
vaikas-google 9 years ago
parent ee30166348
commit 120ea92816

@ -295,11 +295,7 @@ func getDownloadURLs(tName string) []string {
if err := json.Unmarshal([]byte(resp), &u); err != nil {
panic(fmt.Errorf("Failed to parse JSON response from service: %s", resp))
}
urls := []string{}
for _, url := range u {
urls = append(urls, url)
}
return urls
return u
}
func loadTemplate(args []string) *common.Template {

@ -80,6 +80,9 @@ func init() {
routes = append(routes, deployments...)
var credentialProvider common.CredentialProvider
if *credentialFile != "" {
if *credentialSecrets {
panic(fmt.Errorf("Both credentialFile and credentialSecrets are set"))
}
var err error
credentialProvider, err = registry.NewFilebasedCredentialProvider(*credentialFile)
if err != nil {
@ -427,7 +430,7 @@ func getDownloadURLsHandlerFunc(w http.ResponseWriter, r *http.Request) {
return
}
var urls = []string{}
urls := []string{}
for _, u := range c {
urls = append(urls, u.String())
}

@ -124,10 +124,6 @@ func (g GithubPackageRegistry) GetDownloadURLs(t Type) ([]*url.URL, error) {
}
}
}
for _, ll := range downloadURLs {
log.Printf("Found DOWNLOAD URL AS: %#v", ll.String())
}
return downloadURLs, nil
}

Loading…
Cancel
Save