DataDog / datadog-go

go dogstatsd client library for datadog
MIT License
353 stars 132 forks source link

Client Support IPv6 address #275

Open jack-at-circle opened 1 year ago

jack-at-circle commented 1 year ago

The current New function supports taking an IPv4 address, but not an IPv6 address for initialization i.e.

func TestIPv6(t *testing.T) {
    // passes
    _, err := statsd.New("127.0.0.1")
    assert.NoError(t, err)

    // fails
    _, err = statsd.New("::1")
    assert.NoError(t, err)
}

It would be really nice if the New function would support IPv6 addresses in the same way to make service migrations to IPv6 not require code changes : )