mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-27 03:06:19 -04:00
remove unused
Signed-off-by: Jess Frazelle <acidburn@google.com>
This commit is contained in:
parent
e7825db8a0
commit
183c0d5ba3
2 changed files with 2 additions and 28 deletions
|
@ -82,33 +82,6 @@ func (rc *registryController) repositoriesHandler(w http.ResponseWriter, r *http
|
|||
}
|
||||
}
|
||||
|
||||
func (rc *registryController) tagHandler(w http.ResponseWriter, r *http.Request) {
|
||||
log.WithFields(log.Fields{
|
||||
"func": "tag",
|
||||
"URL": r.URL,
|
||||
"method": r.Method,
|
||||
}).Info("fetching tag")
|
||||
|
||||
vars := mux.Vars(r)
|
||||
repo := vars["repo"]
|
||||
tag := vars["tag"]
|
||||
|
||||
if repo == "" {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
fmt.Fprint(w, "Empty repo")
|
||||
return
|
||||
}
|
||||
|
||||
if tag == "" {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
fmt.Fprint(w, "Empty tag")
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Fprintf(w, "Repo: %s Tag: %s ", repo, tag)
|
||||
return
|
||||
}
|
||||
|
||||
func (rc *registryController) tagsHandler(w http.ResponseWriter, r *http.Request) {
|
||||
log.WithFields(log.Fields{
|
||||
"func": "tags",
|
||||
|
|
|
@ -177,7 +177,8 @@ func main() {
|
|||
staticHandler := http.FileServer(http.Dir(staticDir))
|
||||
mux.Handle("/static/", http.StripPrefix("/static/", staticHandler))
|
||||
mux.HandleFunc("/repo/{repo}", rc.tagsHandler)
|
||||
mux.HandleFunc("/repo/{repo}/{tag}", rc.tagHandler)
|
||||
mux.HandleFunc("/repo/{repo}/{tag}", rc.vulnerabilitiesHandler)
|
||||
mux.HandleFunc("/repo/{repo}/{tag}/", rc.vulnerabilitiesHandler)
|
||||
mux.HandleFunc("/repo/{repo}/{tag}/vulns", rc.vulnerabilitiesHandler)
|
||||
mux.HandleFunc("/", rc.repositoriesHandler)
|
||||
|
||||
|
|
Loading…
Reference in a new issue