sfreiberg/gotwilio — pull request #6 by metcalf (2014-09-24 22:10:57+00:00)
Title: Don't pass empty voice callback parameters.

Currently when optional `CallbackParameters` are blank, they are passed to the Twilio API as an empty string. Twilio interprets these as invalid parameters (e.g. the empty string is an invalid HTTP method). This change only sets non-empty parameters on the form.

We use a similar technique for optional parameters [in the stripe-go bindings](https://github.com/stripe/stripe-go/blob/master/token/client.go#L32). In that case we use a `len` check instead of an `== ""` -- I'm reasonably indifferent between those approaches.