Migrate references to consolidated v2 package
Routes and errors are now all referenced from a single v2 package. This packages exports are acceptable for use in the server side as well as integration into docker core.
This commit is contained in:
parent
5abfc91021
commit
d08f0edcf1
13 changed files with 82 additions and 83 deletions
4
tags.go
4
tags.go
|
@ -4,7 +4,7 @@ import (
|
|||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
"github.com/docker/docker-registry/api/errors"
|
||||
"github.com/docker/docker-registry/api/v2"
|
||||
"github.com/docker/docker-registry/storage"
|
||||
"github.com/gorilla/handlers"
|
||||
)
|
||||
|
@ -40,7 +40,7 @@ func (th *tagsHandler) GetTags(w http.ResponseWriter, r *http.Request) {
|
|||
switch err := err.(type) {
|
||||
case storage.ErrUnknownRepository:
|
||||
w.WriteHeader(404)
|
||||
th.Errors.Push(errors.ErrorCodeNameUnknown, map[string]string{"name": th.Name})
|
||||
th.Errors.Push(v2.ErrorCodeNameUnknown, map[string]string{"name": th.Name})
|
||||
default:
|
||||
th.Errors.PushErr(err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue