signalfx / signalfx-go

Go client library and instrumentation bindings for SignalFx
https://www.signalfx.com
Apache License 2.0
14 stars 51 forks source link

Adjust type of source's value, can be string or slice #22

Closed cory-signalfx closed 5 years ago

cory-signalfx commented 5 years ago

Summary

Implements a custom JSON unmarshaller for source.value.

Motivation

In #21 I "fixed" the problem in #18. Turns out it can be either a string or an array of strings. The API documentation doesn't state this, but after doing some digging I found it in the API source.

Notes

I left in a string and an array of strings version to qualify that this does the job.