fixes to buffered client, adds floats and delta gauges

I fixed the make() len/cap bug, and removed the FQDN hostname truncation. I left the Hostname exported so clients can truncate it themselves. The rest is the same as the previous pull request.

I started using your statsd package. I found the buffered client didn't support %HOST%, so I fixed that. I found there was a typo in buffered gauges.

Then I realized that gauges needed two APIS, one for absolute valued gauges, and one for deltas. So I split the gauge API into the regular gauge (Gauge() and FGauge()) and deltas (GaugeDelta() and FGaugeDelta()). That let me handle negative gauge values correctly.

You can pick and choose whatever you like (especially since the GaugeDelta() change breaks the API --- the existing API is that a regular Gauge() is delta, while a buffered gauge is absolute for + values, and delta for negative values, which is somewhat broken)

-Nicolas Dade
Oh sorry I meant to do that.

-N

On Wed, Nov 12, 2014 at 2:15 AM, Lorenzo Alberton <notifications@github.com>
wrote:

> In client.go:
>
> >
> >  func init() {
> >  	host, err := os.Hostname()
> > -	if nil == err {
> > -		hostname = host
> > -	}
>
> sorry, one last change. Can you restore the default, and add a
> setHostname() function to override it, rather than forcing everyone to
> define the variable? Thanks!
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/quipo/statsd/pull/5/files#r20210740>.
>