ctx.go
func (ctx *ResCtx) Result(v interface{}) error {
	if !ctx.Success {
		return errors.New("ctx: cannot read result data since server returned an error")
	}
	if ctx.result == nil {
		return errors.New("ctx: server did not return any response data")
	}

	if err := json.Unmarshal(ctx.result, v); err != nil {
		return fmt.Errorf("ctx: cannot deserialize response result: %v", err)
	}
	return nil
}
func (ctx *ResCtx) Result(v interface{}) error {
	if !ctx.Success {
		return errors.New("ctx: cannot read result data since server returned an error")
	}
	if ctx.result == nil {
		return errors.New("ctx: server did not return any response data")
	}

	if err := json.Unmarshal(ctx.result, v); err != nil {
		return fmt.Errorf("ctx: cannot deserialize response result: %v", err)
	}
	return nil
}
func ( ctx * ResCtx ) Result ( v interface { } ) error { if ! ctx . Success { return errors . New ( " " ) } if ctx . result == nil { return errors . New ( " " ) } if err := json . Unmarshal ( ctx . result , v ) ; err != nil { return fmt . Errorf ( " " , err ) } return nil }
// Result reads response result data into given object.
// Object should be passed by reference.
Result reads response result data into given object . Object should be passed by reference .