Skip to content

Commit

Permalink
Remove extra func
Browse files Browse the repository at this point in the history
  • Loading branch information
Vorkytaka committed Apr 19, 2017
1 parent b8e757f commit 735093e
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions easyvk/vk.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,6 @@ func (vk *VK) Request(method string, params map[string]string) ([]byte, error) {
return body, nil
}

// ResponseWithCount helps to work with specific response type
func (vk *VK) ResponseWithCount(body []byte) ([]byte, uint, error) {
var response struct {
Response []interface{}
}

err := json.Unmarshal(body, &response)
if err != nil {
return nil, 0, err
}

byteArray, err := json.Marshal(response.Response[1:])
if err != nil {
return nil, 0, err
}

return byteArray, uint(response.Response[0].(float64)), nil
}

type response struct {
Response int `json:"response"`
}

0 comments on commit 735093e

Please sign in to comment.