go-utils
go-utils copied to clipboard
Cut down on ganglia boilerplate
gmetric.MetricSender takes a value string
which has led to a lot of line noise in the places we use it. That could be cut way down by making value an interface{}; a type switch that handles string, fmt.Stringer and the various int types would get rid of the excess of String() and strconv.*() calls. Floats are trickier since the appropriate rendering varies, but I guess we could supply a default like %.3f; callers can obviously still do their own sprintfing when necessary. Thoughts?
:+1:
We should also consider refactoring go-utils at some point so that the API isn't so all over the place.
It would make make my life better.