diff options
author | Clark Laughlin <clark.laughlin@linaro.org> | 2015-11-21 21:54:35 -0500 |
---|---|---|
committer | Clark Laughlin <clark.laughlin@linaro.org> | 2015-11-21 21:54:35 -0500 |
commit | 218ae0cee050aefb6bd98bbb83f6ffdbb3d32e0c (patch) | |
tree | 2644847b3c23a5e71f54d2179a4113cf4fb91695 | |
parent | 289ab45eccfa1282583d2a913bd129820dedf810 (diff) |
server.go: fixed misc errors
-rw-r--r-- | registry-browser/server.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/registry-browser/server.go b/registry-browser/server.go index 387a74b..5ddcdde 100644 --- a/registry-browser/server.go +++ b/registry-browser/server.go @@ -102,7 +102,7 @@ func authenticateWithRegistry(url, user, password string) (string, error) { return tokenData["token"], nil } -func retrieveRegistryCatalog(url, user, password string) (string, error) { +func makeRegistryRequest(url, user, password string) (string, error) { token, err := authenticateWithRegistry(url, user, password) if err != nil { @@ -123,7 +123,6 @@ func retrieveRegistryCatalog(url, user, password string) (string, error) { } - func Handle_Distribution_AllRepos(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") @@ -136,7 +135,7 @@ func Handle_Distribution_AllRepos(w http.ResponseWriter, r *http.Request) { // url1 := fmt.Sprintf("%s/v2/_catalog", *registryServer) - content, err := retrieveRegistryCatalog(url1, *user, *password) + content, err := makeRegistryRequest(url1, *user, *password) if err != nil { log.Fatal(err) } @@ -157,7 +156,7 @@ func Handle_Distribution_AllRepos(w http.ResponseWriter, r *http.Request) { for _, each := range repositories.Repositories { url2 := fmt.Sprintf("%s/v2/%s/tags/list", *registryServer, each) - content, err := MakeHttpRequest(url2) + content, err := makeRegistryRequest(url2) if err != nil { log.Fatal(err) } @@ -217,3 +216,4 @@ func main() { log.Fatal("http.ListenAndServe: ", err) } } + |