diff --git a/Makefile b/Makefile index 92fc1a05..670487d3 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ all: lint test .PHONY: test test: @go test -race $(PKGS) - @go test github.com/newrelic/infra-integrations-sdk/jmx > /dev/null # TODO: fix race for jmx package + @go test github.com/newrelic/infra-integrations-sdk/v3/jmx > /dev/null # TODO: fix race for jmx package .PHONY: clean clean: diff --git a/args/args_test.go b/args/args_test.go index fddf1a46..95aea9c6 100644 --- a/args/args_test.go +++ b/args/args_test.go @@ -6,7 +6,7 @@ import ( "reflect" "testing" - sdk_args "github.com/newrelic/infra-integrations-sdk/args" + sdk_args "github.com/newrelic/infra-integrations-sdk/v3/args" "github.com/stretchr/testify/assert" ) diff --git a/data/event/event.go b/data/event/event.go index a7abb58d..c176bcbd 100644 --- a/data/event/event.go +++ b/data/event/event.go @@ -1,6 +1,6 @@ package event -import "github.com/newrelic/infra-integrations-sdk/data/attribute" +import "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" const ( // NotificationEventCategory category for notification events. diff --git a/data/event/event_test.go b/data/event/event_test.go index 318037bd..84d96bb4 100644 --- a/data/event/event_test.go +++ b/data/event/event_test.go @@ -3,7 +3,7 @@ package event import ( "testing" - "github.com/newrelic/infra-integrations-sdk/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" "github.com/stretchr/testify/assert" ) diff --git a/data/metric/metrics.go b/data/metric/metrics.go index 097df185..3b1247ab 100644 --- a/data/metric/metrics.go +++ b/data/metric/metrics.go @@ -8,8 +8,8 @@ import ( "sort" "strconv" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/persist" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/persist" ) const ( diff --git a/data/metric/metrics_test.go b/data/metric/metrics_test.go index 3bb5ceb3..c85effa1 100644 --- a/data/metric/metrics_test.go +++ b/data/metric/metrics_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/log" - "github.com/newrelic/infra-integrations-sdk/persist" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/log" + "github.com/newrelic/infra-integrations-sdk/v3/persist" "github.com/stretchr/testify/assert" ) diff --git a/data/metric/set_marshal_test.go b/data/metric/set_marshal_test.go index b59ecb98..70c03423 100644 --- a/data/metric/set_marshal_test.go +++ b/data/metric/set_marshal_test.go @@ -3,8 +3,8 @@ package metric import ( "testing" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/persist" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/persist" "github.com/stretchr/testify/assert" ) diff --git a/docs/toolset/examples/persist.go b/docs/toolset/examples/persist.go index 7dcb31aa..6edb3a26 100644 --- a/docs/toolset/examples/persist.go +++ b/docs/toolset/examples/persist.go @@ -4,8 +4,8 @@ import ( "fmt" "os" - "github.com/newrelic/infra-integrations-sdk/log" - "github.com/newrelic/infra-integrations-sdk/persist" + "github.com/newrelic/infra-integrations-sdk/v3/log" + "github.com/newrelic/infra-integrations-sdk/v3/persist" ) type Topping string diff --git a/docs/tutorial-code/multiple-entities/redis-multi.go b/docs/tutorial-code/multiple-entities/redis-multi.go index 4286e350..e56c138e 100644 --- a/docs/tutorial-code/multiple-entities/redis-multi.go +++ b/docs/tutorial-code/multiple-entities/redis-multi.go @@ -6,10 +6,10 @@ import ( "strconv" "strings" - sdkArgs "github.com/newrelic/infra-integrations-sdk/args" - "github.com/newrelic/infra-integrations-sdk/data/event" - "github.com/newrelic/infra-integrations-sdk/data/metric" - "github.com/newrelic/infra-integrations-sdk/integration" + sdkArgs "github.com/newrelic/infra-integrations-sdk/v3/args" + "github.com/newrelic/infra-integrations-sdk/v3/data/event" + "github.com/newrelic/infra-integrations-sdk/v3/data/metric" + "github.com/newrelic/infra-integrations-sdk/v3/integration" ) type argumentList struct { diff --git a/docs/tutorial-code/single-entity/redis.go b/docs/tutorial-code/single-entity/redis.go index 4e44f7cd..e3efc90a 100644 --- a/docs/tutorial-code/single-entity/redis.go +++ b/docs/tutorial-code/single-entity/redis.go @@ -6,10 +6,10 @@ import ( "strconv" "strings" - sdkArgs "github.com/newrelic/infra-integrations-sdk/args" - "github.com/newrelic/infra-integrations-sdk/data/event" - "github.com/newrelic/infra-integrations-sdk/data/metric" - "github.com/newrelic/infra-integrations-sdk/integration" + sdkArgs "github.com/newrelic/infra-integrations-sdk/v3/args" + "github.com/newrelic/infra-integrations-sdk/v3/data/event" + "github.com/newrelic/infra-integrations-sdk/v3/data/metric" + "github.com/newrelic/infra-integrations-sdk/v3/integration" ) type argumentList struct { diff --git a/go.mod b/go.mod index a651b5a8..2808635f 100644 --- a/go.mod +++ b/go.mod @@ -1,22 +1,11 @@ -module github.com/newrelic/infra-integrations-sdk +module github.com/newrelic/infra-integrations-sdk/v3 go 1.23 require github.com/stretchr/testify v1.9.0 require ( - github.com/AlekSi/gocov-xml v1.1.0 // indirect - github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect - github.com/axw/gocov v1.1.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect - github.com/nicksnyder/go-i18n v1.10.3 // indirect - github.com/pelletier/go-toml v1.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect - golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 // indirect - gopkg.in/alecthomas/gometalinter.v2 v2.0.12 // indirect - gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20191105091915-95d230a53780 // indirect - gopkg.in/yaml.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index a723c7fa..60ce688a 100644 --- a/go.sum +++ b/go.sum @@ -1,52 +1,10 @@ -github.com/AlekSi/gocov-xml v1.1.0 h1:iElWGi7s/MuL8/d8WDtI2fOAsN3ap9x8nK5RrAhaDng= -github.com/AlekSi/gocov-xml v1.1.0/go.mod h1:g1dRVOCHjKkMtlPfW6BokJ/qxoeZ1uPNAK7A/ii3CUo= -github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 h1:t3eaIm0rUkzbrIewtiFmMK5RXHej2XnoXNhxVsAYUfg= -github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30/go.mod h1:fvzegU4vN3H1qMT+8wDmzjAcDONcgo2/SZ/TyfdUOFs= -github.com/axw/gocov v1.1.0 h1:y5U1krExoJDlb/kNtzxyZQmNRprFOFCutWbNjcQvmVM= -github.com/axw/gocov v1.1.0/go.mod h1:H9G4tivgdN3pYSSVrTFBr6kGDCmAkgbJhtxFzAvgcdw= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= -github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= -github.com/nicksnyder/go-i18n v1.10.3 h1:0U60fnLBNrLBVt8vb8Q67yKNs+gykbQuLsIkiesJL+w= -github.com/nicksnyder/go-i18n v1.10.3/go.mod h1:hvLG5HTlZ4UfSuVLSRuX7JRUomIaoKQM19hm6f+no7o= -github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= -golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7 h1:EBZoQjiKKPaLbPrbpssUfuHtwM6KV/vb4U85g/cigFY= -golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gopkg.in/alecthomas/gometalinter.v2 v2.0.12 h1:/xBWwtjmOmVxn8FXfIk9noV8m2E2Id9jFfUY/Mh9QAI= -gopkg.in/alecthomas/gometalinter.v2 v2.0.12/go.mod h1:NDRytsqEZyolNuAgTzJkZMkSQM7FIKyzVzGhjB/qfYo= -gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20191105091915-95d230a53780 h1:CEBpW6C191eozfEuWdUmIAHn7lwlLxJ7HVdr2e2Tsrw= -gopkg.in/alecthomas/kingpin.v3-unstable v3.0.0-20191105091915-95d230a53780/go.mod h1:3HH7i1SgMqlzxCcBmUHW657sD4Kvv9sC3HpL3YukzwA= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/http/client_test.go b/http/client_test.go index 1db92cba..b6546579 100644 --- a/http/client_test.go +++ b/http/client_test.go @@ -19,7 +19,7 @@ import ( "testing" "time" - httpSDK "github.com/newrelic/infra-integrations-sdk/http" + httpSDK "github.com/newrelic/infra-integrations-sdk/v3/http" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/integration/entity.go b/integration/entity.go index 93631738..34d281b7 100644 --- a/integration/entity.go +++ b/integration/entity.go @@ -4,11 +4,11 @@ import ( "errors" "sync" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/data/event" - "github.com/newrelic/infra-integrations-sdk/data/inventory" - "github.com/newrelic/infra-integrations-sdk/data/metric" - "github.com/newrelic/infra-integrations-sdk/persist" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/data/event" + "github.com/newrelic/infra-integrations-sdk/v3/data/inventory" + "github.com/newrelic/infra-integrations-sdk/v3/data/metric" + "github.com/newrelic/infra-integrations-sdk/v3/persist" ) // Entity is the producer of the data. Entity could be a host, a container, a pod, or whatever unit of meaning. diff --git a/integration/entity_test.go b/integration/entity_test.go index a9fccf5b..868e6215 100644 --- a/integration/entity_test.go +++ b/integration/entity_test.go @@ -8,10 +8,10 @@ import ( "encoding/json" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/data/event" - "github.com/newrelic/infra-integrations-sdk/data/metric" - "github.com/newrelic/infra-integrations-sdk/persist" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/data/event" + "github.com/newrelic/infra-integrations-sdk/v3/data/metric" + "github.com/newrelic/infra-integrations-sdk/v3/persist" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/integration/integration.go b/integration/integration.go index c19cae6d..72c81252 100644 --- a/integration/integration.go +++ b/integration/integration.go @@ -12,9 +12,9 @@ import ( "strings" "sync" - "github.com/newrelic/infra-integrations-sdk/args" - "github.com/newrelic/infra-integrations-sdk/log" - "github.com/newrelic/infra-integrations-sdk/persist" + "github.com/newrelic/infra-integrations-sdk/v3/args" + "github.com/newrelic/infra-integrations-sdk/v3/log" + "github.com/newrelic/infra-integrations-sdk/v3/persist" ) // Custom attribute keys: diff --git a/integration/integration_test.go b/integration/integration_test.go index e0c9a6f1..23825c57 100644 --- a/integration/integration_test.go +++ b/integration/integration_test.go @@ -10,12 +10,12 @@ import ( "github.com/stretchr/testify/require" - "github.com/newrelic/infra-integrations-sdk/data/attribute" - "github.com/newrelic/infra-integrations-sdk/data/event" + "github.com/newrelic/infra-integrations-sdk/v3/data/attribute" + "github.com/newrelic/infra-integrations-sdk/v3/data/event" - sdk_args "github.com/newrelic/infra-integrations-sdk/args" - "github.com/newrelic/infra-integrations-sdk/data/metric" - "github.com/newrelic/infra-integrations-sdk/log" + sdk_args "github.com/newrelic/infra-integrations-sdk/v3/args" + "github.com/newrelic/infra-integrations-sdk/v3/data/metric" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/stretchr/testify/assert" ) diff --git a/integration/options.go b/integration/options.go index 9fb3e3ed..e28ba9dc 100644 --- a/integration/options.go +++ b/integration/options.go @@ -3,8 +3,8 @@ package integration import ( "io" - "github.com/newrelic/infra-integrations-sdk/log" - "github.com/newrelic/infra-integrations-sdk/persist" + "github.com/newrelic/infra-integrations-sdk/v3/log" + "github.com/newrelic/infra-integrations-sdk/v3/persist" ) // Option sets an option on integration level. diff --git a/integration/options_test.go b/integration/options_test.go index fb8bb941..870dc40e 100644 --- a/integration/options_test.go +++ b/integration/options_test.go @@ -12,9 +12,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/newrelic/infra-integrations-sdk/args" - "github.com/newrelic/infra-integrations-sdk/log" - "github.com/newrelic/infra-integrations-sdk/persist" + "github.com/newrelic/infra-integrations-sdk/v3/args" + "github.com/newrelic/infra-integrations-sdk/v3/log" + "github.com/newrelic/infra-integrations-sdk/v3/persist" ) func TestWriter(t *testing.T) { diff --git a/jmx/jmx.go b/jmx/jmx.go index 7eaa7558..5eae0707 100644 --- a/jmx/jmx.go +++ b/jmx/jmx.go @@ -19,7 +19,7 @@ import ( "sync" "time" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/log" ) const ( diff --git a/jmx/jmx_test.go b/jmx/jmx_test.go index 85e699cc..0532c6cf 100644 --- a/jmx/jmx_test.go +++ b/jmx/jmx_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/persist/store_path.go b/persist/store_path.go index f6642e1e..7feb9d06 100644 --- a/persist/store_path.go +++ b/persist/store_path.go @@ -6,7 +6,7 @@ import ( "path/filepath" "time" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/log" ) const ( diff --git a/persist/store_path_test.go b/persist/store_path_test.go index 5fe7afac..329ed02b 100644 --- a/persist/store_path_test.go +++ b/persist/store_path_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/stretchr/testify/assert" ) diff --git a/persist/storer.go b/persist/storer.go index 0a106b16..5b2032f2 100644 --- a/persist/storer.go +++ b/persist/storer.go @@ -11,7 +11,7 @@ import ( "sync" "time" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/log" ) const ( diff --git a/persist/storer_test.go b/persist/storer_test.go index ef3a1205..6d282e50 100644 --- a/persist/storer_test.go +++ b/persist/storer_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/newrelic/infra-integrations-sdk/log" + "github.com/newrelic/infra-integrations-sdk/v3/log" "github.com/stretchr/testify/assert" )