chore: switch to go.yaml.in/yaml/v3 (#2196)

This commit is contained in:
Jan-Otto Kröpke
2025-09-04 23:50:27 +02:00
committed by GitHub
parent 6289499dee
commit 4171ec17a5
6 changed files with 8 additions and 5 deletions

3
go.mod
View File

@@ -12,8 +12,8 @@ require (
github.com/prometheus/common v0.65.0
github.com/prometheus/exporter-toolkit v0.14.0
github.com/stretchr/testify v1.10.0
go.yaml.in/yaml/v3 v3.0.4
golang.org/x/sys v0.35.0
gopkg.in/yaml.v3 v3.0.1
)
require (
@@ -37,4 +37,5 @@ require (
golang.org/x/text v0.28.0 // indirect
google.golang.org/protobuf v1.36.7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

2
go.sum
View File

@@ -67,6 +67,8 @@ github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8
github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
go.yaml.in/yaml/v3 v3.0.4 h1:tfq32ie2Jv2UxXFdLJdh3jXuOzWiL1fo0bu/FbuKpbc=
go.yaml.in/yaml/v3 v3.0.4/go.mod h1:DhzuOOF2ATzADvBadXxruRBLzYTpT36CKvDb3+aBEFg=
golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=

View File

@@ -32,7 +32,7 @@ import (
"github.com/prometheus-community/windows_exporter/internal/pdh"
"github.com/prometheus-community/windows_exporter/internal/types"
"github.com/prometheus/client_golang/prometheus"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
)
const Name = "performancecounter"

View File

@@ -19,7 +19,7 @@ package performancecounter
import (
"github.com/prometheus-community/windows_exporter/internal/pdh"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
)
type Object struct {

View File

@@ -26,7 +26,7 @@ import (
"github.com/alecthomas/kingpin/v2"
"github.com/prometheus-community/windows_exporter/pkg/collector"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
)
// configFile represents the structure of the windows_exporter configuration file,

View File

@@ -21,7 +21,7 @@ import (
"reflect"
"testing"
"gopkg.in/yaml.v3"
"go.yaml.in/yaml/v3"
)
// Unmarshal good configuration file and confirm data is flattened correctly.