Skip to content

Commit

Permalink
Add field length test. Props @gstro
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Mann committed Oct 18, 2017
1 parent 04e9004 commit 391bcee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ func (c *Client) getClientKey(ctx context.Context, clientID string) (PublicKey,
func (c *Client) readRaw(ctx context.Context, recordID string, fields []string) (*Record, error) {
path := fmt.Sprintf("%s/v1/storage/records/%s", c.apiURL(), recordID)

if fields != nil {
if fields != nil && len(fields) > 0 {
mappedFields := make([]string, len(fields))
for i, v := range fields {
mappedFields[i] = fmt.Sprintf("field=%s", url.QueryEscape(v))
Expand Down

0 comments on commit 391bcee

Please sign in to comment.