segmentio / stats

Go package for abstracting stats collection
https://godoc.org/github.com/segmentio/stats
MIT License
208 stars 32 forks source link

tag: add json struct tags #107

Closed abraithwaite closed 5 years ago

abraithwaite commented 5 years ago

While not strictly necessary, these would be nice to have. Currently pulling in these tags to log in my app as well and would rather not loop over them to marshal them with "proper" (lowercase) json tags.

abraithwaite commented 5 years ago

I actually don't like this strategy. I updated my local code to iterate over it anyway to have a clean tag map: map[string]string in JSON (instead of []Tag).