Change type to []byte

This commit is contained in:
Daniel Smith
2014-06-20 15:24:56 -07:00
parent a9d9bb9d47
commit fb991fb84e
8 changed files with 16 additions and 14 deletions

View File

@@ -69,9 +69,9 @@ func (storage *SimpleRESTStorage) Delete(id string) (<-chan interface{}, error)
return storage.channel, storage.err
}
func (storage *SimpleRESTStorage) Extract(body string) (interface{}, error) {
func (storage *SimpleRESTStorage) Extract(body []byte) (interface{}, error) {
var item Simple
json.Unmarshal([]byte(body), &item)
json.Unmarshal(body, &item)
return item, storage.err
}