s/EncodReadResponse/EncodeReadResponse/

This commit is contained in:
Tom Wilkie 2017-09-16 11:15:03 +02:00
parent febed48703
commit 758d64ffd9
2 changed files with 3 additions and 3 deletions

View file

@ -45,8 +45,8 @@ func DecodeReadRequest(r *http.Request) (*ReadRequest, error) {
return &req, nil
}
// EncodReadResponse writes a remote.Response to a http.ResponseWriter.
func EncodReadResponse(resp *ReadResponse, w http.ResponseWriter) error {
// EncodeReadResponse writes a remote.Response to a http.ResponseWriter.
func EncodeReadResponse(resp *ReadResponse, w http.ResponseWriter) error {
data, err := proto.Marshal(resp)
if err != nil {
return err

View file

@ -489,7 +489,7 @@ func (api *API) remoteRead(w http.ResponseWriter, r *http.Request) {
}))
}
if err := remote.EncodReadResponse(&resp, w); err != nil {
if err := remote.EncodeReadResponse(&resp, w); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}