Correctly assert and dereference in GetObject to return valid data. (#8)
Correctly assert and dereference in GetObject to return valid data. (#8)

* Correctly assert and dereference in GetObject to return valid data.

Previously, the value of `respData.RespValue` was asserted to be of type
[]byte, when the type was actually *[]byte. The assertion failed, but the
"failed assertion" boolean was discarded with _ and never
checked for an invalid cast (which it was). This did not cause a
compiler error because the explicit type of `respData.RespValue` was
interface{}. The method would return an empty []byte when a valid object
was requested, because the assertion was failing and therefore the `res`
variable was empty.

This commit changes the assertion to type *[]byte,
which is successful and then dereferences it for the return for type []byte.
This results in the object's data being correctly returned from
the Client.GetObject method.

* Add error checking to assert to remove future regression.

The boolean returned by the assert to signify whether the assert was
successful is now stored in a variable called `ok`. This is to prevent
returning empty data to the user and to reduce the chance of future
regression.

joyent/gomanta