Skip to content

Commit 6ed1dc3

Browse files
author
Alan Braithwaite
committed
stats: use recommended major version format for modules
Following this guide: https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher Module major versions should include the path component in the module declaration to accompany the properly formatted tag.
1 parent 808b3ac commit 6ed1dc3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+96
-83
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ collection platforms.
101101
package main
102102

103103
import (
104-
"github.com/segmentio/stats"
105-
"github.com/segmentio/stats/datadog"
104+
"github.com/segmentio/stats/v4"
105+
"github.com/segmentio/stats/v4/datadog"
106106
)
107107

108108
func main() {
@@ -132,8 +132,8 @@ func main() {
132132
package main
133133

134134
import (
135-
"github.com/segmentio/stats"
136-
"github.com/segmentio/stats/datadog"
135+
"github.com/segmentio/stats/v4"
136+
"github.com/segmentio/stats/v4/datadog"
137137
)
138138

139139
func main() {
@@ -192,8 +192,8 @@ Here's an example of how to use the collector:
192192
package main
193193

194194
import (
195-
"github.com/segmentio/stats/datadog"
196-
"github.com/segmentio/stats/procstats"
195+
"github.com/segmentio/stats/v4/datadog"
196+
"github.com/segmentio/stats/v4/procstats"
197197
)
198198

199199

@@ -239,8 +239,8 @@ package main
239239
import (
240240
"net/http"
241241

242-
"github.com/segmentio/stats/datadog"
243-
"github.com/segmentio/stats/httpstats"
242+
"github.com/segmentio/stats/v4/datadog"
243+
"github.com/segmentio/stats/v4/httpstats"
244244
)
245245

246246
func main() {
@@ -272,8 +272,8 @@ package main
272272
import (
273273
"net/http"
274274

275-
"github.com/segmentio/stats/datadog"
276-
"github.com/segmentio/stats/httpstats"
275+
"github.com/segmentio/stats/v4/datadog"
276+
"github.com/segmentio/stats/v4/httpstats"
277277
)
278278

279279
func main() {
@@ -300,8 +300,8 @@ package main
300300
import (
301301
"net/http"
302302

303-
"github.com/segmentio/stats/datadog"
304-
"github.com/segmentio/stats/httpstats"
303+
"github.com/segmentio/stats/v4/datadog"
304+
"github.com/segmentio/stats/v4/httpstats"
305305
)
306306

307307
func main() {
@@ -333,7 +333,7 @@ package main
333333

334334
import (
335335
"github.com/segmentio/redis-go"
336-
"github.com/segmentio/stats/redisstats"
336+
"github.com/segmentio/stats/v4/redisstats"
337337
)
338338

339339
func main() {
@@ -356,7 +356,7 @@ package main
356356

357357
import (
358358
"github.com/segmentio/redis-go"
359-
"github.com/segmentio/stats/redisstats"
359+
"github.com/segmentio/stats/v4/redisstats"
360360
)
361361

362362
func main() {

cmd/dogstatsd/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import (
1212
"strings"
1313
"time"
1414

15-
"github.com/segmentio/stats"
16-
"github.com/segmentio/stats/datadog"
15+
"github.com/segmentio/stats/v4"
16+
"github.com/segmentio/stats/v4/datadog"
1717
)
1818

1919
func main() {

datadog/append.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"strconv"
55
"strings"
66

7-
"github.com/segmentio/stats"
7+
"github.com/segmentio/stats/v4"
88
)
99

1010
func appendMetric(b []byte, m Metric) []byte {

datadog/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"syscall"
1010
"time"
1111

12-
"github.com/segmentio/stats"
12+
"github.com/segmentio/stats/v4"
1313
)
1414

1515
const (

datadog/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"testing"
1111
"time"
1212

13-
"github.com/segmentio/stats"
13+
"github.com/segmentio/stats/v4"
1414
)
1515

1616
func TestClient(t *testing.T) {

datadog/event.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package datadog
33
import (
44
"fmt"
55

6-
"github.com/segmentio/stats"
6+
"github.com/segmentio/stats/v4"
77
)
88

99
// EventPriority is an enumeration providing the available datadog event

datadog/event_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package datadog
22

33
import (
4-
"github.com/segmentio/stats"
4+
"github.com/segmentio/stats/v4"
55
)
66

77
var testEvents = []struct {

datadog/measure.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"math"
55
"strconv"
66

7-
"github.com/segmentio/stats"
7+
"github.com/segmentio/stats/v4"
88
)
99

1010
// AppendMeasure is a formatting routine to append the dogstatsd protocol

datadog/measure_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"testing"
55
"time"
66

7-
"github.com/segmentio/stats"
7+
"github.com/segmentio/stats/v4"
88
)
99

1010
var (

datadog/metric.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"sync"
66

7-
"github.com/segmentio/stats"
7+
"github.com/segmentio/stats/v4"
88
)
99

1010
// MetricType is an enumeration providing symbols to represent the different

datadog/metric_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package datadog
33
import (
44
"testing"
55

6-
"github.com/segmentio/stats"
6+
"github.com/segmentio/stats/v4"
77
)
88

99
var testMetrics = []struct {

datadog/parse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"strconv"
66
"strings"
77

8-
"github.com/segmentio/stats"
8+
"github.com/segmentio/stats/v4"
99
)
1010

1111
// Adapted from https://github.com/DataDog/datadog-agent/blob/6789e98a1e41e98700fa1783df62238bb23cb454/pkg/dogstatsd/parser.go#L141

datadog/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"testing"
88
"time"
99

10-
"github.com/segmentio/stats"
10+
"github.com/segmentio/stats/v4"
1111
)
1212

1313
func TestServer(t *testing.T) {

engine_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/segmentio/stats"
12-
"github.com/segmentio/stats/datadog"
13-
"github.com/segmentio/stats/influxdb"
14-
"github.com/segmentio/stats/prometheus"
15-
"github.com/segmentio/stats/statstest"
11+
"github.com/segmentio/stats/v4"
12+
"github.com/segmentio/stats/v4/datadog"
13+
"github.com/segmentio/stats/v4/influxdb"
14+
"github.com/segmentio/stats/v4/prometheus"
15+
"github.com/segmentio/stats/v4/statstest"
1616
)
1717

1818
func TestEngine(t *testing.T) {

go.mod

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/segmentio/stats
1+
module github.com/segmentio/stats/v4
22

33
require (
44
github.com/google/go-cmp v0.2.0 // indirect
@@ -8,6 +8,9 @@ require (
88
github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e
99
github.com/segmentio/objconv v1.0.1
1010
github.com/segmentio/taskstats v0.0.0-20180727163836-237d1d6b109d
11+
github.com/stretchr/testify v1.4.0
1112
golang.org/x/net v0.0.0-20190206173232-65e2d4e15006 // indirect
1213
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952 // indirect
1314
)
15+
16+
go 1.13

go.sum

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2+
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
13
github.com/google/go-cmp v0.2.0 h1:+dTQ8DZQJz0Mb/HjFlkptS1FeQ4cWSnN941F8aEG4SQ=
24
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
35
github.com/mdlayher/genetlink v0.0.0-20181016160152-e97704c1b795 h1:2uvgdCvQ/MUubxqVhOFkeTaI0EZLcjPLVIwgZGWPgxs=
@@ -6,15 +8,23 @@ github.com/mdlayher/netlink v0.0.0-20181210160939-e069752bc835 h1:WpZONc7LNdfPrl
68
github.com/mdlayher/netlink v0.0.0-20181210160939-e069752bc835/go.mod h1:a3TlQHkJH2m32RF224Z7LhD5N4mpyR8eUbCoYHywrwg=
79
github.com/mdlayher/taskstats v0.0.0-20190204141439-073d099bf511 h1:LgBrT7rp0H7FEzu4TeUuvLJftmO3BzXRr7na5NSwZFc=
810
github.com/mdlayher/taskstats v0.0.0-20190204141439-073d099bf511/go.mod h1:MnJpzX3tKwNHx1lNjupG9azS8ji8YeSyuZzJX+ZaJ9o=
11+
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
12+
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
913
github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e h1:uO75wNGioszjmIzcY/tvdDYKRLVvzggtAmmJkn9j4GQ=
1014
github.com/segmentio/fasthash v0.0.0-20180216231524-a72b379d632e/go.mod h1:tm/wZFQ8e24NYaBGIlnO2WGCAi67re4HHuOm0sftE/M=
1115
github.com/segmentio/objconv v1.0.1 h1:QjfLzwriJj40JibCV3MGSEiAoXixbp4ybhwfTB8RXOM=
1216
github.com/segmentio/objconv v1.0.1/go.mod h1:auayaH5k3137Cl4SoXTgrzQcuQDmvuVtZgS0fb1Ahys=
1317
github.com/segmentio/taskstats v0.0.0-20180727163836-237d1d6b109d h1:At14Wjg8G5836YGdynaJyoYLa5tiP9CgAZ/m2XgXSLs=
1418
github.com/segmentio/taskstats v0.0.0-20180727163836-237d1d6b109d/go.mod h1:RRsP8O2UBzJhn2Et6+04bTn263Lf71PLEN13YcehPF0=
19+
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
20+
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
21+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
1522
golang.org/x/net v0.0.0-20190206173232-65e2d4e15006 h1:bfLnR+k0tq5Lqt6dflRLcZiz6UaXCMt3vhYJ1l4FQ80=
1623
golang.org/x/net v0.0.0-20190206173232-65e2d4e15006/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
1724
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952 h1:FDfvYgoVsA7TTZSbgiqjAbfPbK47CNHdWl3h/PJtii0=
1825
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
26+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
1927
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
2028
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
29+
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
30+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

grafana/grafanatest/annotations.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package grafanatest
22

3-
import "github.com/segmentio/stats/grafana"
3+
import "github.com/segmentio/stats/v4/grafana"
44

55
// AnnotationsResponse is an implementation of the grafana.AnnotationsResponse
66
// interface which captures the values passed to its method calls.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package grafanatest
22

3-
import "github.com/segmentio/stats/grafana"
3+
import "github.com/segmentio/stats/v4/grafana"
44

55
var _ grafana.AnnotationsResponse = (*AnnotationsResponse)(nil)

grafana/grafanatest/query.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package grafanatest
33
import (
44
"time"
55

6-
"github.com/segmentio/stats/grafana"
6+
"github.com/segmentio/stats/v4/grafana"
77
)
88

99
// QueryResponse is an implementation of the grafana.QueryResponse interface

grafana/grafanatest/query_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package grafanatest
22

3-
import "github.com/segmentio/stats/grafana"
3+
import "github.com/segmentio/stats/v4/grafana"
44

55
var _ grafana.QueryResponse = (*QueryResponse)(nil)

grafana/grafanatest/search_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package grafanatest
22

3-
import "github.com/segmentio/stats/grafana"
3+
import "github.com/segmentio/stats/v4/grafana"
44

55
var _ grafana.SearchResponse = (*SearchResponse)(nil)

handler_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"testing"
55
"time"
66

7-
"github.com/segmentio/stats"
8-
"github.com/segmentio/stats/statstest"
7+
"github.com/segmentio/stats/v4"
8+
"github.com/segmentio/stats/v4/statstest"
99
)
1010

1111
func TestMultiHandler(t *testing.T) {

httpstats/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package httpstats
33
import (
44
"net/http"
55

6-
"github.com/segmentio/stats"
6+
"github.com/segmentio/stats/v4"
77
)
88

99
// RequestWithTags returns a shallow copy of req with its context updated to

httpstats/context_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net/http/httptest"
77
"testing"
88

9-
"github.com/segmentio/stats"
9+
"github.com/segmentio/stats/v4"
1010
"github.com/stretchr/testify/assert"
1111
)
1212

httpstats/handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net/http"
77
"time"
88

9-
"github.com/segmentio/stats"
9+
"github.com/segmentio/stats/v4"
1010
)
1111

1212
// NewHandler wraps h to produce metrics on the default engine for every request

httpstats/handler_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import (
77
"strings"
88
"testing"
99

10-
"github.com/segmentio/stats"
11-
"github.com/segmentio/stats/statstest"
10+
"github.com/segmentio/stats/v4"
11+
"github.com/segmentio/stats/v4/statstest"
1212
)
1313

1414
func TestHandler(t *testing.T) {

httpstats/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"sync"
1111
"time"
1212

13-
"github.com/segmentio/stats"
13+
"github.com/segmentio/stats/v4"
1414
)
1515

1616
func init() {

httpstats/metrics_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"strings"
99
"testing"
1010

11-
"github.com/segmentio/stats/iostats"
11+
"github.com/segmentio/stats/v4/iostats"
1212
)
1313

1414
func TestResponseStatusBucket(t *testing.T) {

httpstats/transport.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"net/http"
55
"time"
66

7-
"github.com/segmentio/stats"
7+
"github.com/segmentio/stats/v4"
88
)
99

1010
// NewTransport wraps t to produce metrics on the default engine for every request

httpstats/transport_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"strings"
99
"testing"
1010

11-
"github.com/segmentio/stats"
12-
"github.com/segmentio/stats/statstest"
11+
"github.com/segmentio/stats/v4"
12+
"github.com/segmentio/stats/v4/statstest"
1313
)
1414

1515
func TestTransport(t *testing.T) {

influxdb/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"time"
1515

1616
"github.com/segmentio/objconv/json"
17-
"github.com/segmentio/stats"
17+
"github.com/segmentio/stats/v4"
1818
)
1919

2020
const (

influxdb/client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"testing"
99
"time"
1010

11-
"github.com/segmentio/stats"
11+
"github.com/segmentio/stats/v4"
1212
)
1313

1414
func TestClient(t *testing.T) {

0 commit comments

Comments
 (0)