prometheus/client_golang — pull request #12 by bernerdschaefer (2013-04-19 12:31:28+00:00)
Title: Refactor/reduce marshaling complexity

* Drop `AsMarshallable()` from the Metric interface. Use
`json.Marshaler` and `MarshalJSON()`, and leverage JSON struct tags
where possible.

* Add `MarshalJSON()` to Registry and remove `dumpToWriter`, which
makes the registry handler much simpler.

* Some general cleanup.

In addition to simplifying some of the marshalling behavior, this also
has the nice side effect of cutting down the number of
`map[string]interface{}` instances.