More if undos.
This commit is contained in:
parent
1bdbb73c0e
commit
f3c92c381a
@ -46,7 +46,8 @@ var supportedApiVersions map[string]struct{} = map[string]struct{}{
|
||||
|
||||
func RegisterHandlers(m manager.Manager) error {
|
||||
http.HandleFunc(apiResource, func(w http.ResponseWriter, r *http.Request) {
|
||||
if err := handleRequest(m, w, r); err != nil {
|
||||
err := handleRequest(m, w, r)
|
||||
if err != nil {
|
||||
fmt.Fprintf(w, "%s", err)
|
||||
}
|
||||
})
|
||||
@ -170,7 +171,8 @@ func getContainerInfoRequest(body io.ReadCloser) (*info.ContainerInfoRequest, er
|
||||
query.NumStats = 64
|
||||
|
||||
decoder := json.NewDecoder(body)
|
||||
if err := decoder.Decode(&query); err != nil && err != io.EOF {
|
||||
err := decoder.Decode(&query)
|
||||
if err != nil && err != io.EOF {
|
||||
return nil, fmt.Errorf("unable to decode the json value: %s", err)
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,8 @@ func TestUpdateSubcontainers(t *testing.T) {
|
||||
nil,
|
||||
)
|
||||
|
||||
if err := cd.updateSubcontainers(); err != nil {
|
||||
err := cd.updateSubcontainers()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
@ -423,7 +423,8 @@ func (self *manager) watchForNewContainers(quit chan error) error {
|
||||
}
|
||||
|
||||
// There is a race between starting the watch and new container creation so we do a detection before we read new containers.
|
||||
if err := self.detectSubcontainers("/"); err != nil {
|
||||
err := self.detectSubcontainers("/")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user