fmt.Errorf()

This commit is contained in:
Nan Deng 2014-07-08 17:30:35 -07:00
parent d8acc13240
commit c1ecbc94a6

View File

@ -74,8 +74,7 @@ func HandleRequest(m manager.Manager, w http.ResponseWriter, r *http.Request) er
decoder := json.NewDecoder(r.Body)
err := decoder.Decode(&query)
if err != nil && err != io.EOF {
fmt.Fprintf(w, "unable to decode the json value: ", err)
return err
return fmt.Errorf("unable to decode the json value: ", err)
}
// Get the container.
cont, err := m.GetContainerInfo(containerName, &query)