diff --git a/collector/collectorPerconaExtensions.go b/collector/collectorPerconaExtensions.go index b095b5e12a..ace605e666 100644 --- a/collector/collectorPerconaExtensions.go +++ b/collector/collectorPerconaExtensions.go @@ -17,8 +17,8 @@ package collector import ( "fmt" - "github.com/go-kit/log" - "gopkg.in/alecthomas/kingpin.v2" + kingpin "github.com/alecthomas/kingpin/v2" + log "github.com/go-kit/log" ) func RegisterCollectorPublic(collector string, isDefaultEnabled bool, factory func(logger log.Logger) (Collector, error)) { diff --git a/go.mod b/go.mod index 1dd5e60097..7fdbffd3e5 100644 --- a/go.mod +++ b/go.mod @@ -28,6 +28,7 @@ require ( github.com/prometheus/exporter-toolkit v0.11.0 github.com/prometheus/procfs v0.14.0 github.com/safchain/ethtool v0.3.0 + github.com/stretchr/testify v1.8.4 golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f golang.org/x/sys v0.19.0 howett.net/plist v1.0.1 @@ -59,4 +60,5 @@ require ( google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.33.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/node_exporter.go b/node_exporter.go index dc33a076aa..a48c3df2bf 100644 --- a/node_exporter.go +++ b/node_exporter.go @@ -26,8 +26,8 @@ import ( "github.com/prometheus/common/promlog" "github.com/prometheus/common/promlog/flag" - "github.com/alecthomas/kingpin/v2" - "github.com/go-kit/log" + kingpin "github.com/alecthomas/kingpin/v2" + log "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" promcollectors "github.com/prometheus/client_golang/prometheus/collectors" diff --git a/percona/perconacollector/textfile.directory.go b/percona/perconacollector/textfile.directory.go index d04fc199a9..6f9258fa30 100644 --- a/percona/perconacollector/textfile.directory.go +++ b/percona/perconacollector/textfile.directory.go @@ -25,13 +25,13 @@ import ( "strings" "time" - "github.com/go-kit/log" + kingpin "github.com/alecthomas/kingpin/v2" + log "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" "github.com/prometheus/common/expfmt" cl "github.com/prometheus/node_exporter/collector" - kingpin "gopkg.in/alecthomas/kingpin.v2" ) var ( diff --git a/percona/tests/upstream_update/env_prepare_test.go b/percona/tests/upstream_update/env_prepare_test.go index b966defc92..8a4bc5f6b5 100644 --- a/percona/tests/upstream_update/env_prepare_test.go +++ b/percona/tests/upstream_update/env_prepare_test.go @@ -1,3 +1,16 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package perconatests import ( diff --git a/percona/tests/upstream_update/metrics_test.go b/percona/tests/upstream_update/metrics_test.go index 55d6bf5a2b..60b484613f 100644 --- a/percona/tests/upstream_update/metrics_test.go +++ b/percona/tests/upstream_update/metrics_test.go @@ -1,3 +1,16 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package perconatests import ( @@ -7,8 +20,6 @@ import ( "sort" "strings" "testing" - - "github.com/pkg/errors" ) var dumpMetricsFlag = flag.Bool("dumpMetrics", false, "") diff --git a/percona/tests/upstream_update/performance_test.go b/percona/tests/upstream_update/performance_test.go index 8d30242900..bbef6dc9e6 100644 --- a/percona/tests/upstream_update/performance_test.go +++ b/percona/tests/upstream_update/performance_test.go @@ -1,3 +1,16 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package perconatests import ( @@ -9,10 +22,7 @@ import ( "testing" "time" - "github.com/montanaflynn/stats" - "github.com/pkg/errors" "github.com/stretchr/testify/assert" - "github.com/tklauser/go-sysconf" ) const ( diff --git a/percona/tests/upstream_update/utils_test.go b/percona/tests/upstream_update/utils_test.go index 5a530461d0..bfef3402ce 100644 --- a/percona/tests/upstream_update/utils_test.go +++ b/percona/tests/upstream_update/utils_test.go @@ -1,3 +1,16 @@ +// Copyright 2015 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + package perconatests import ( @@ -12,7 +25,6 @@ import ( "strings" "time" - "github.com/pkg/errors" "golang.org/x/sys/unix" )